resolved conflicts for merge of d8266150 to graphics-dev

Change-Id: Ie39a5e07ddbfcfe9e8161674f1b0912c9f8f49d1
This commit is contained in:
Jason Sams
2011-11-30 13:54:40 -08:00
2 changed files with 10 additions and 17 deletions

View File

@@ -106,13 +106,18 @@ public:
uint32_t vertexPos = i*vertexSize;
float *vertexPtr = dataPtr + vertexPos;
uint32_t elemIndex = 0;
for (uint32_t c = 0; c < mChannels.size(); c ++) {
// Skip empty channels
if (mChannels[c].mData.size() == 0) {
continue;
}
// This will address vector element alignment issues
uint32_t elemlOffset = vertexDataElem->getFieldOffsetBytes(elemIndex)/sizeof(float);
elemIndex ++;
float *channelPtr = vertexPtr + elemlOffset;
for (uint32_t cStride = 0; cStride < mChannels[c].mStride; cStride ++) {
*(vertexPtr++) = mChannels[c].mData[i * mChannels[c].mStride + cStride];
*(channelPtr++) = mChannels[c].mData[i * mChannels[c].mStride + cStride];
}
}
}

View File

@@ -42,23 +42,11 @@ void rsdAllocationDestroy(const Context *rsc, Allocation *alloc) {
}
}
// We only care to implement allocation memory initialization and destruction
// because we need no other renderscript hal features for serialization
static RsdHalFunctions FunctionTable = {
NULL, NULL, NULL, NULL, NULL, NULL, NULL,
{ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,NULL },
{
rsdAllocationInit,
rsdAllocationDestroy,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
},
{ NULL, NULL, NULL }, { NULL, NULL, NULL }, { NULL, NULL, NULL },
{ NULL, NULL, NULL }, { NULL, NULL, NULL }, { NULL, NULL, NULL, NULL }, { NULL, NULL },
{ NULL, NULL, NULL},
};
// No-op initizlizer for rs context hal since we only
static RsdHalFunctions FunctionTable;
bool rsdHalInit(Context *rsc, uint32_t version_major, uint32_t version_minor) {
memset(&FunctionTable, 0, sizeof(FunctionTable));
FunctionTable.allocation.init = rsdAllocationInit;
FunctionTable.allocation.destroy = rsdAllocationDestroy;
rsc->mHal.funcs = FunctionTable;
return true;
}