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

Commit a3f15432 authored by Alex Sakhartchouk's avatar Alex Sakhartchouk
Browse files

Fixing uint32 size_t mismatches.

Change-Id: I5263158f5855472db6317a52c209fe4e273f3368
parent c43a9793
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -388,7 +388,7 @@ int32_t rsdAllocationInitSurfaceTexture(const Context *rsc, const Allocation *al

void rsdAllocationData1D(const Context *rsc, const Allocation *alloc,
                         uint32_t xoff, uint32_t lod, uint32_t count,
                         const void *data, uint32_t sizeBytes) {
                         const void *data, size_t sizeBytes) {
    DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;

    const uint32_t eSize = alloc->mHal.state.type->getElementSizeBytes();
@@ -407,7 +407,7 @@ void rsdAllocationData1D(const Context *rsc, const Allocation *alloc,

void rsdAllocationData2D(const Context *rsc, const Allocation *alloc,
                         uint32_t xoff, uint32_t yoff, uint32_t lod, RsAllocationCubemapFace face,
                         uint32_t w, uint32_t h, const void *data, uint32_t sizeBytes) {
                         uint32_t w, uint32_t h, const void *data, size_t sizeBytes) {
    DrvAllocation *drv = (DrvAllocation *)alloc->mHal.drv;

    uint32_t eSize = alloc->mHal.state.elementSizeBytes;
+2 −2
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ using namespace android;
using namespace android::renderscript;

bool rsdProgramVertexInit(const Context *rsc, const ProgramVertex *pv,
                          const char* shader, uint32_t shaderLen) {
                          const char* shader, size_t shaderLen) {
    RsdShader *drv = new RsdShader(pv, GL_VERTEX_SHADER, shader, shaderLen);
    pv->mHal.drv = drv;

@@ -78,7 +78,7 @@ void rsdProgramVertexDestroy(const Context *rsc, const ProgramVertex *pv) {
}

bool rsdProgramFragmentInit(const Context *rsc, const ProgramFragment *pf,
                          const char* shader, uint32_t shaderLen) {
                          const char* shader, size_t shaderLen) {
    RsdShader *drv = new RsdShader(pf, GL_FRAGMENT_SHADER, shader, shaderLen);
    pf->mHal.drv = drv;

+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ using namespace android;
using namespace android::renderscript;

RsdShader::RsdShader(const Program *p, uint32_t type,
                       const char * shaderText, uint32_t shaderLength) {
                       const char * shaderText, size_t shaderLength) {

    mUserShader.setTo(shaderText, shaderLength);
    mRSProgram = p;
+7 −7
Original line number Diff line number Diff line
@@ -119,15 +119,15 @@ typedef struct {

        void (*data1D)(const Context *rsc, const Allocation *alloc,
                       uint32_t xoff, uint32_t lod, uint32_t count,
                       const void *data, uint32_t sizeBytes);
                       const void *data, size_t sizeBytes);
        void (*data2D)(const Context *rsc, const Allocation *alloc,
                       uint32_t xoff, uint32_t yoff, uint32_t lod,
                       RsAllocationCubemapFace face, uint32_t w, uint32_t h,
                       const void *data, uint32_t sizeBytes);
                       const void *data, size_t sizeBytes);
        void (*data3D)(const Context *rsc, const Allocation *alloc,
                       uint32_t xoff, uint32_t yoff, uint32_t zoff,
                       uint32_t lod, RsAllocationCubemapFace face,
                       uint32_t w, uint32_t h, uint32_t d, const void *data, uint32_t sizeBytes);
                       uint32_t w, uint32_t h, uint32_t d, const void *data, size_t sizeBytes);

        // Allocation to allocation copies
        void (*allocData1D)(const Context *rsc,
@@ -151,9 +151,9 @@ typedef struct {
                            uint32_t srcLod, RsAllocationCubemapFace srcFace);

        void (*elementData1D)(const Context *rsc, const Allocation *alloc, uint32_t x,
                              const void *data, uint32_t elementOff, uint32_t sizeBytes);
                              const void *data, uint32_t elementOff, size_t sizeBytes);
        void (*elementData2D)(const Context *rsc, const Allocation *alloc, uint32_t x, uint32_t y,
                              const void *data, uint32_t elementOff, uint32_t sizeBytes);
                              const void *data, uint32_t elementOff, size_t sizeBytes);


    } allocation;
@@ -172,14 +172,14 @@ typedef struct {

    struct {
        bool (*init)(const Context *rsc, const ProgramVertex *pv,
                     const char* shader, uint32_t shaderLen);
                     const char* shader, size_t shaderLen);
        void (*setActive)(const Context *rsc, const ProgramVertex *pv);
        void (*destroy)(const Context *rsc, const ProgramVertex *pv);
    } vertex;

    struct {
        bool (*init)(const Context *rsc, const ProgramFragment *pf,
                     const char* shader, uint32_t shaderLen);
                     const char* shader, size_t shaderLen);
        void (*setActive)(const Context *rsc, const ProgramFragment *pf);
        void (*destroy)(const Context *rsc, const ProgramFragment *pf);
    } fragment;