Skip to content

Commit 6be1636

Browse files
Alex SakhartchoukAndroid (Google) Code Review
authored andcommitted
Merge "Fixing uint32 size_t mismatches."
2 parents 54546f2 + a3f1543 commit 6be1636

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
@@ -481,7 +481,7 @@ void rsdAllocationIoReceive(const Context *rsc, Allocation *alloc) {
481481

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

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

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

506506
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
@@ -125,15 +125,15 @@ typedef struct {
125125

126126
void (*data1D)(const Context *rsc, const Allocation *alloc,
127127
uint32_t xoff, uint32_t lod, uint32_t count,
128-
const void *data, uint32_t sizeBytes);
128+
const void *data, size_t sizeBytes);
129129
void (*data2D)(const Context *rsc, const Allocation *alloc,
130130
uint32_t xoff, uint32_t yoff, uint32_t lod,
131131
RsAllocationCubemapFace face, uint32_t w, uint32_t h,
132-
const void *data, uint32_t sizeBytes);
132+
const void *data, size_t sizeBytes);
133133
void (*data3D)(const Context *rsc, const Allocation *alloc,
134134
uint32_t xoff, uint32_t yoff, uint32_t zoff,
135135
uint32_t lod, RsAllocationCubemapFace face,
136-
uint32_t w, uint32_t h, uint32_t d, const void *data, uint32_t sizeBytes);
136+
uint32_t w, uint32_t h, uint32_t d, const void *data, size_t sizeBytes);
137137

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

159159
void (*elementData1D)(const Context *rsc, const Allocation *alloc, uint32_t x,
160-
const void *data, uint32_t elementOff, uint32_t sizeBytes);
160+
const void *data, uint32_t elementOff, size_t sizeBytes);
161161
void (*elementData2D)(const Context *rsc, const Allocation *alloc, uint32_t x, uint32_t y,
162-
const void *data, uint32_t elementOff, uint32_t sizeBytes);
162+
const void *data, uint32_t elementOff, size_t sizeBytes);
163163

164164

165165
} allocation;
@@ -178,14 +178,14 @@ typedef struct {
178178

179179
struct {
180180
bool (*init)(const Context *rsc, const ProgramVertex *pv,
181-
const char* shader, uint32_t shaderLen);
181+
const char* shader, size_t shaderLen);
182182
void (*setActive)(const Context *rsc, const ProgramVertex *pv);
183183
void (*destroy)(const Context *rsc, const ProgramVertex *pv);
184184
} vertex;
185185

186186
struct {
187187
bool (*init)(const Context *rsc, const ProgramFragment *pf,
188-
const char* shader, uint32_t shaderLen);
188+
const char* shader, size_t shaderLen);
189189
void (*setActive)(const Context *rsc, const ProgramFragment *pf);
190190
void (*destroy)(const Context *rsc, const ProgramFragment *pf);
191191
} fragment;

0 commit comments

Comments
 (0)