1
0
mirror of https://github.com/Yours3lf/rpi-vk-driver.git synced 2024-12-01 13:24:20 +01:00

triangle finally renders :)

This commit is contained in:
Unknown 2018-10-14 17:29:03 +01:00
parent 6fd2b3f34a
commit 498ea778d8

View File

@ -665,8 +665,8 @@ void clInsertShaderRecord(ControlList* cls,
moveBits(pointSizeIncludedInShadedVertexData, 1, 1) | moveBits(pointSizeIncludedInShadedVertexData, 1, 1) |
moveBits(enableClipping, 1, 2); cls->nextFreeByte++; moveBits(enableClipping, 1, 2); cls->nextFreeByte++;
*cls->nextFreeByte = 0; cls->nextFreeByte++; *cls->nextFreeByte = 0; cls->nextFreeByte++;
*(uint16_t*)cls->nextFreeByte = moveBits(fragmentNumberOfUnusedUniforms, 16, 0); cls->nextFreeByte += 2; *(uint16_t*)cls->nextFreeByte = moveBits(fragmentNumberOfUnusedUniforms, 16, 0); cls->nextFreeByte++;
*cls->nextFreeByte = fragmentNumberOfVaryings; cls->nextFreeByte++; *cls->nextFreeByte |= fragmentNumberOfVaryings; cls->nextFreeByte++;
clEmitShaderRelocation(relocCl, handlesCl, &fragmentCodeAddress); clEmitShaderRelocation(relocCl, handlesCl, &fragmentCodeAddress);
*(uint32_t*)cls->nextFreeByte = fragmentCodeAddress.offset; cls->nextFreeByte += 4; *(uint32_t*)cls->nextFreeByte = fragmentCodeAddress.offset; cls->nextFreeByte += 4;
*(uint32_t*)cls->nextFreeByte = fragmentUniformsAddress; cls->nextFreeByte += 4; *(uint32_t*)cls->nextFreeByte = fragmentUniformsAddress; cls->nextFreeByte += 4;
@ -676,7 +676,8 @@ void clInsertShaderRecord(ControlList* cls,
*cls->nextFreeByte = vertexTotalAttributesSize; cls->nextFreeByte++; *cls->nextFreeByte = vertexTotalAttributesSize; cls->nextFreeByte++;
clEmitShaderRelocation(relocCl, handlesCl, &vertexCodeAddress); clEmitShaderRelocation(relocCl, handlesCl, &vertexCodeAddress);
//TODO wtf??? //TODO wtf???
*(uint32_t*)cls->nextFreeByte = moveBits(vertexCodeAddress.offset, 32, 0) | moveBits(vertexUniformsAddress, 32, 0); cls->nextFreeByte += 4; uint32_t offset = moveBits(vertexCodeAddress.offset, 32, 0) | moveBits(vertexUniformsAddress, 32, 0);
*(uint32_t*)cls->nextFreeByte = offset; cls->nextFreeByte += 4;
cls->nextFreeByte += 4; cls->nextFreeByte += 4;
*(uint16_t*)cls->nextFreeByte = moveBits(coordinateNumberOfUnusedUniforms, 16, 0); cls->nextFreeByte += 2; *(uint16_t*)cls->nextFreeByte = moveBits(coordinateNumberOfUnusedUniforms, 16, 0); cls->nextFreeByte += 2;