Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a66b759a authored by Jason Sams's avatar Jason Sams Committed by Android Git Automerger
Browse files

am bd08c7c0: Merge "Clean up RS samples for SDK, bug 2943369 Fix bug 3403965...

am bd08c7c0: Merge "Clean up RS samples for SDK, bug 2943369 Fix bug 3403965 rsgSyncAll would not mark constants as changed found by inspection." into honeycomb

* commit 'bd08c7c0':
  Clean up RS samples for SDK, bug 2943369 Fix bug 3403965 rsgSyncAll would not mark constants as changed found by inspection.
parents 359113b4 bd08c7c0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ int root(int launchID) {
    rsgProgramVertexLoadModelMatrix(&robot2Ptr->globalMat);
    rsgDrawMesh(gTestMesh);

    color(0.3f, 0.3f, 0.3f, 1.0f);
    //color(0.3f, 0.3f, 0.3f, 1.0f);
    rsgDrawText("Renderscript transform test", 30, 695);

    rsgBindFont(gItalic);
+0 −1
Original line number Diff line number Diff line
@@ -44,7 +44,6 @@ int root(int launchID) {

    rsgFontColor(0.9f, 0.9f, 0.9f, 1.0f);
    rsgBindFont(gItalic);
    color(0.2, 0.2, 0.2, 0);

    rs_allocation listAlloc;
    rsSetObject(&listAlloc, rsGetAllocation(gList));
+4 −4
Original line number Diff line number Diff line
@@ -407,7 +407,7 @@ static void setupCustomShaderLights() {
    gVSConstants->light1_Diffuse = 1.0f;
    gVSConstants->light1_Specular = 0.7f;
    gVSConstants->light1_CosinePower = 25.0f;
    rsAllocationMarkDirty(rsGetAllocation(gVSConstants));
    rsgAllocationSyncAll(rsGetAllocation(gVSConstants));

    gVSConstants2->light_Posision[0] = light0Pos;
    gVSConstants2->light_Diffuse[0] = 1.0f;
@@ -417,7 +417,7 @@ static void setupCustomShaderLights() {
    gVSConstants2->light_Diffuse[1] = 1.0f;
    gVSConstants2->light_Specular[1] = 0.7f;
    gVSConstants2->light_CosinePower[1] = 25.0f;
    rsAllocationMarkDirty(rsGetAllocation(gVSConstants2));
    rsgAllocationSyncAll(rsGetAllocation(gVSConstants2));

    // Update fragmetn shader constants
    // Set light 0 colors
@@ -426,14 +426,14 @@ static void setupCustomShaderLights() {
    // Set light 1 colors
    gFSConstants->light1_DiffuseColor = light1DiffCol;
    gFSConstants->light1_SpecularColor = light1SpecCol;
    rsAllocationMarkDirty(rsGetAllocation(gFSConstants));
    rsgAllocationSyncAll(rsGetAllocation(gFSConstants));

    gFSConstants2->light_DiffuseColor[0] = light0DiffCol;
    gFSConstants2->light_SpecularColor[0] = light0SpecCol;
    // Set light 1 colors
    gFSConstants2->light_DiffuseColor[1] = light1DiffCol;
    gFSConstants2->light_SpecularColor[1] = light1SpecCol;
    rsAllocationMarkDirty(rsGetAllocation(gFSConstants2));
    rsgAllocationSyncAll(rsGetAllocation(gFSConstants2));
}

static void displayCustomShaderSamples() {
+0 −1
Original line number Diff line number Diff line
@@ -45,7 +45,6 @@ int root(int launchID) {

    rsgFontColor(0.9f, 0.9f, 0.9f, 1.0f);
    rsgBindFont(gFont);
    color(0.2, 0.2, 0.2, 0);

    rs_allocation listAlloc;
    rsSetObject(&listAlloc, rsGetAllocation(gList));
+1 −0
Original line number Diff line number Diff line
@@ -679,6 +679,7 @@ static void mip(const Adapter2D &out, const Adapter2D &in) {
void rsi_AllocationSyncAll(Context *rsc, RsAllocation va, RsAllocationUsageType src) {
    Allocation *a = static_cast<Allocation *>(va);
    a->syncAll(rsc, src);
    a->sendDirty();
}

void rsi_AllocationGenerateMipmaps(Context *rsc, RsAllocation va) {
Loading