Skip to content

Commit a3f1543

Browse files
author
Alex Sakhartchouk
committed
Fixing uint32 size_t mismatches.
Change-Id: I5263158f5855472db6317a52c209fe4e273f3368
1 parent c43a979 commit a3f1543

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

libs/rs/driver/rsdAllocation.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ int32_t rsdAllocationInitSurfaceTexture(const Context *rsc, const Allocation *al
388388

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

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

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

413413
uint32_t eSize = alloc->mHal.state.elementSizeBytes;

libs/rs/driver/rsdProgram.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ using namespace android;
3434
using namespace android::renderscript;
3535

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

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

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

libs/rs/driver/rsdShader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ using namespace android;
3030
using namespace android::renderscript;
3131

3232
RsdShader::RsdShader(const Program *p, uint32_t type,
33-
const char * shaderText, uint32_t shaderLength) {
33+
const char * shaderText, size_t shaderLength) {
3434

3535
mUserShader.setTo(shaderText, shaderLength);
3636
mRSProgram = p;

libs/rs/rs_hal.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,15 @@ typedef struct {
119119

120120
void (*data1D)(const Context *rsc, const Allocation *alloc,
121121
uint32_t xoff, uint32_t lod, uint32_t count,
122-
const void *data, uint32_t sizeBytes);
122+
const void *data, size_t sizeBytes);
123123
void (*data2D)(const Context *rsc, const Allocation *alloc,
124124
uint32_t xoff, uint32_t yoff, uint32_t lod,
125125
RsAllocationCubemapFace face, uint32_t w, uint32_t h,
126-
const void *data, uint32_t sizeBytes);
126+
const void *data, size_t sizeBytes);
127127
void (*data3D)(const Context *rsc, const Allocation *alloc,
128128
uint32_t xoff, uint32_t yoff, uint32_t zoff,
129129
uint32_t lod, RsAllocationCubemapFace face,
130-
uint32_t w, uint32_t h, uint32_t d, const void *data, uint32_t sizeBytes);
130+
uint32_t w, uint32_t h, uint32_t d, const void *data, size_t sizeBytes);
131131

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

153153
void (*elementData1D)(const Context *rsc, const Allocation *alloc, uint32_t x,
154-
const void *data, uint32_t elementOff, uint32_t sizeBytes);
154+
const void *data, uint32_t elementOff, size_t sizeBytes);
155155
void (*elementData2D)(const Context *rsc, const Allocation *alloc, uint32_t x, uint32_t y,
156-
const void *data, uint32_t elementOff, uint32_t sizeBytes);
156+
const void *data, uint32_t elementOff, size_t sizeBytes);
157157

158158

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

173173
struct {
174174
bool (*init)(const Context *rsc, const ProgramVertex *pv,
175-
const char* shader, uint32_t shaderLen);
175+
const char* shader, size_t shaderLen);
176176
void (*setActive)(const Context *rsc, const ProgramVertex *pv);
177177
void (*destroy)(const Context *rsc, const ProgramVertex *pv);
178178
} vertex;
179179

180180
struct {
181181
bool (*init)(const Context *rsc, const ProgramFragment *pf,
182-
const char* shader, uint32_t shaderLen);
182+
const char* shader, size_t shaderLen);
183183
void (*setActive)(const Context *rsc, const ProgramFragment *pf);
184184
void (*destroy)(const Context *rsc, const ProgramFragment *pf);
185185
} fragment;

0 commit comments

Comments
 (0)