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

Commit f0690c4f authored by Jason Sams's avatar Jason Sams
Browse files

Cleanup of signed/unsigned

Make all functions overloadable.

Change-Id: I443c83afcf9a7acfae394585201f081681f309db

Update examples.

Change-Id: I100d6fa8dd1af376bcee0b2c42c5aabe9c03bb6e

force rebuild of all .rs files to pick up core header changes.

Change-Id: I6231a8a024388481ca231507e83b108ebdbc3500
parent 8f5d160c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -67,6 +67,7 @@ $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libequalizerte
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libreverb_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libreverbtest_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/soundfx/)
$(call add-clean-step, find . -type f -name "*.rs" -print0 | xargs -0 touch)

# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ import android.util.Log;


public class FountainRS {
    public static final int PART_COUNT = 20000;
    public static final int PART_COUNT = 50000;

    public FountainRS() {
    }
+1 −2
Original line number Diff line number Diff line
@@ -292,12 +292,11 @@ public class ImageProcessingActivity extends Activity
                mRS.finish();
            } else {
                javaFilter();
                mDisplayView.invalidate();
            }

            t = java.lang.System.currentTimeMillis() - t;
            android.util.Log.v("Img", "Renderscript frame time core ms " + t);

            mDisplayView.invalidate();
        }
    }

+11 −34
Original line number Diff line number Diff line
@@ -184,17 +184,9 @@ static int64_t SC_uptimeMillis()
    return nanoseconds_to_milliseconds(systemTime(SYSTEM_TIME_MONOTONIC));
}

static int64_t SC_startTimeMillis()
static int64_t SC_uptimeNanos()
{
    GET_TLS();
    return sc->mEnviroment.mStartTimeMillis;
}

static int64_t SC_elapsedTimeMillis()
{
    GET_TLS();
    return nanoseconds_to_milliseconds(systemTime(SYSTEM_TIME_MONOTONIC))
            - sc->mEnviroment.mStartTimeMillis;
    return systemTime(SYSTEM_TIME_MONOTONIC);
}

static float SC_getDt()
@@ -400,7 +392,6 @@ static ScriptCState::SymbolTable_t gSyms[] = {
    { "_Z14rsGetElementAt13rs_allocationjj", (void *)&SC_getElementAtXY },
    { "_Z14rsGetElementAt13rs_allocationjjj", (void *)&SC_getElementAtXYZ },


    // Debug
    { "_Z7rsDebugPKcf", (void *)&SC_debugF },
    { "_Z7rsDebugPKcDv2_f", (void *)&SC_debugFv2 },
@@ -409,8 +400,6 @@ static ScriptCState::SymbolTable_t gSyms[] = {
    { "_Z7rsDebugPKci", (void *)&SC_debugI32 },
    { "_Z7rsDebugPKcj", (void *)&SC_debugU32 },
    { "_Z7rsDebugPKcPKv", (void *)&SC_debugP },
    //extern void __attribute__((overloadable))rsDebug(const char *, const void *);


    // RS Math
    { "_Z6rsRandi", (void *)&SC_randi },
@@ -420,27 +409,15 @@ static ScriptCState::SymbolTable_t gSyms[] = {
    { "_Z6rsFracf", (void *)&SC_frac },

    // time
    { "_Z8rsSecond", (void *)&SC_second },
    { "_Z8rsMinute", (void *)&SC_minute },
    { "_Z6rsHour", (void *)&SC_hour },
    { "_Z5rsDay", (void *)&SC_day },
    { "_Z7rsMonth", (void *)&SC_month },
    { "_Z6rsYear", (void *)&SC_year },
    { "_Z14rsUptimeMillis", (void*)&SC_uptimeMillis },
    { "_Z17rsStartTimeMillis", (void*)&SC_startTimeMillis },
    { "_Z19rsElapsedTimeMillis", (void*)&SC_elapsedTimeMillis },
    { "_Z7rsGetDt", (void*)&SC_getDt },

    { "rsSecond", (void *)&SC_second },
    { "rsMinute", (void *)&SC_minute },
    { "rsHour", (void *)&SC_hour },
    { "rsDay", (void *)&SC_day },
    { "rsMonth", (void *)&SC_month },
    { "rsYear", (void *)&SC_year },
    { "rsUptimeMillis", (void*)&SC_uptimeMillis },
    { "rsStartTimeMillis", (void*)&SC_startTimeMillis },
    { "rsElapsedTimeMillis", (void*)&SC_elapsedTimeMillis },
    { "rsGetDt", (void*)&SC_getDt },
    { "_Z8rsSecondv", (void *)&SC_second },
    { "_Z8rsMinutev", (void *)&SC_minute },
    { "_Z6rsHourv", (void *)&SC_hour },
    { "_Z5rsDayv", (void *)&SC_day },
    { "_Z7rsMonthv", (void *)&SC_month },
    { "_Z6rsYearv", (void *)&SC_year },
    { "_Z14rsUptimeMillisv", (void*)&SC_uptimeMillis },
    { "_Z13rsUptimeNanosv", (void*)&SC_uptimeNanos },
    { "_Z7rsGetDtv", (void*)&SC_getDt },

    { "_Z14rsSendToClienti", (void *)&SC_toClient },
    { "_Z14rsSendToClientiPKvj", (void *)&SC_toClient2 },
+23 −24
Original line number Diff line number Diff line
@@ -354,44 +354,43 @@ static void SC_BindFont(RsFont font)
//                 ::= d  # double

static ScriptCState::SymbolTable_t gSyms[] = {
    { "rsgBindProgramFragment", (void *)&SC_bindProgramFragment },
    { "rsgBindProgramStore", (void *)&SC_bindProgramStore },
    { "rsgBindProgramVertex", (void *)&SC_bindProgramVertex },
    { "rsgBindProgramRaster", (void *)&SC_bindProgramRaster },
    { "rsgBindSampler", (void *)&SC_bindSampler },
    { "rsgBindTexture", (void *)&SC_bindTexture },
    { "_Z22rsgBindProgramFragment19rs_program_fragment", (void *)&SC_bindProgramFragment },
    { "_Z19rsgBindProgramStore16rs_program_store", (void *)&SC_bindProgramStore },
    { "_Z20rsgBindProgramVertex17rs_program_vertex", (void *)&SC_bindProgramVertex },
    { "_Z20rsgBindProgramRaster17rs_program_raster", (void *)&SC_bindProgramRaster },
    { "_Z14rsgBindSampler19rs_program_fragmentj10rs_sampler", (void *)&SC_bindSampler },
    { "_Z14rsgBindTexture19rs_program_fragmentj13rs_allocation", (void *)&SC_bindTexture },

    { "rsgProgramVertexLoadProjectionMatrix", (void *)&SC_vpLoadProjectionMatrix },
    { "rsgProgramVertexLoadModelMatrix", (void *)&SC_vpLoadModelMatrix },
    { "rsgProgramVertexLoadTextureMatrix", (void *)&SC_vpLoadTextureMatrix },
    { "_Z36rsgProgramVertexLoadProjectionMatrixPK12rs_matrix4x4", (void *)&SC_vpLoadProjectionMatrix },
    { "_Z31rsgProgramVertexLoadModelMatrixPK12rs_matrix4x4", (void *)&SC_vpLoadModelMatrix },
    { "_Z33rsgProgramVertexLoadTextureMatrixPK12rs_matrix4x4", (void *)&SC_vpLoadTextureMatrix },

    { "rsgGetWidth", (void *)&SC_getWidth },
    { "rsgGetHeight", (void *)&SC_getHeight },
    { "_Z11rsgGetWidthv", (void *)&SC_getWidth },
    { "_Z12rsgGetHeightv", (void *)&SC_getHeight },

    { "_Z18rsgUploadToTexture13rs_allocationi", (void *)&SC_uploadToTexture2 },
    { "_Z18rsgUploadToTexture13rs_allocationj", (void *)&SC_uploadToTexture2 },
    { "_Z18rsgUploadToTexture13rs_allocation", (void *)&SC_uploadToTexture },
    { "rsgUploadToBufferObject", (void *)&SC_uploadToBufferObject },
    { "_Z23rsgUploadToBufferObject13rs_allocation", (void *)&SC_uploadToBufferObject },

    { "rsgDrawRect", (void *)&SC_drawRect },
    { "rsgDrawQuad", (void *)&SC_drawQuad },
    { "rsgDrawQuadTexCoords", (void *)&SC_drawQuadTexCoords },
    //{ "drawSprite", (void *)&SC_drawSprite },
    { "rsgDrawSpriteScreenspace", (void *)&SC_drawSpriteScreenspace },
    { "_Z11rsgDrawRectfffff", (void *)&SC_drawRect },
    { "_Z11rsgDrawQuadffffffffffff", (void *)&SC_drawQuad },
    { "_Z20rsgDrawQuadTexCoordsffffffffffffffffffff", (void *)&SC_drawQuadTexCoords },
    { "_Z24rsgDrawSpriteScreenspacefffff", (void *)&SC_drawSpriteScreenspace },

    { "_Z11rsgDrawMesh7rs_mesh", (void *)&SC_drawMesh },
    { "_Z11rsgDrawMesh7rs_meshi", (void *)&SC_drawMeshPrimitive },
    { "_Z11rsgDrawMesh7rs_meshiii", (void *)&SC_drawMeshPrimitiveRange },
    { "_Z11rsgDrawMesh7rs_meshj", (void *)&SC_drawMeshPrimitive },
    { "_Z11rsgDrawMesh7rs_meshjjj", (void *)&SC_drawMeshPrimitiveRange },

    { "rsgClearColor", (void *)&SC_ClearColor },
    { "rsgClearDepth", (void *)&SC_ClearDepth },
    { "_Z13rsgClearColorffff", (void *)&SC_ClearColor },
    { "_Z13rsgClearDepthf", (void *)&SC_ClearDepth },

    { "_Z11rsgDrawTextPKcii", (void *)&SC_DrawText },
    { "_Z11rsgDrawText13rs_allocationii", (void *)&SC_DrawTextAlloc },

    { "rsgBindFont", (void *)&SC_BindFont },
    { "_Z11rsgBindFont7rs_font", (void *)&SC_BindFont },

    // misc
    { "color", (void *)&SC_color },
    { "_Z5colorffff", (void *)&SC_color },

    { NULL, NULL }
};
Loading