diff --git a/driver/common.h b/driver/common.h index d4e0621..4dc7c60 100644 --- a/driver/common.h +++ b/driver/common.h @@ -145,8 +145,8 @@ typedef struct VkDevice_T VkSampler emulLinearTextureSampler; VkShaderModule emulBufferToTextureShaderModule; VkShaderModule emulTextureToTextureShaderModule; - VkShaderModule emulTextureToBufferShaderModule; //TODO - VkShaderModule emulBufferToBufferShaderModule; //TODO + //VkShaderModule emulTextureToBufferShaderModule; //TODO + //VkShaderModule emulBufferToBufferShaderModule; //TODO VkShaderModule emulClearShaderModule; VkShaderModule emulClearNoColorShaderModule; } _device; diff --git a/driver/copy.c b/driver/copy.c index 3fabe47..51ea5cd 100644 --- a/driver/copy.c +++ b/driver/copy.c @@ -616,8 +616,7 @@ void createBufferToTextureShaderModule(VkDevice device, VkShaderModule* blitShad { //assemble cs code asm_sizes[0] = get_num_instructions(cs_asm_code); uint32_t size = sizeof(uint64_t)*asm_sizes[0]; - //TODO this alloc feels kinda useless, we just copy the data anyway to kernel space - //why not map kernel space mem to user space instead? + //TODO this alloc feels kinda useless asm_ptrs[0] = (uint64_t*)malloc(size); assemble_qpu_asm(cs_asm_code, asm_ptrs[0]); } @@ -625,8 +624,7 @@ void createBufferToTextureShaderModule(VkDevice device, VkShaderModule* blitShad { //assemble vs code asm_sizes[1] = get_num_instructions(vs_asm_code); uint32_t size = sizeof(uint64_t)*asm_sizes[1]; - //TODO this alloc feels kinda useless, we just copy the data anyway to kernel space - //why not map kernel space mem to user space instead? + //TODO this alloc feels kinda useless asm_ptrs[1] = (uint64_t*)malloc(size); assemble_qpu_asm(vs_asm_code, asm_ptrs[1]); } @@ -634,8 +632,7 @@ void createBufferToTextureShaderModule(VkDevice device, VkShaderModule* blitShad { //assemble fs code asm_sizes[2] = get_num_instructions(blit_fs_asm_code); uint32_t size = sizeof(uint64_t)*asm_sizes[2]; - //TODO this alloc feels kinda useless, we just copy the data anyway to kernel space - //why not map kernel space mem to user space instead? + //TODO this alloc feels kinda useless asm_ptrs[2] = (uint64_t*)malloc(size); assemble_qpu_asm(blit_fs_asm_code, asm_ptrs[2]); } @@ -921,8 +918,7 @@ void createTextureToTextureShaderModule(VkDevice device, VkShaderModule* blitSha { //assemble cs code asm_sizes[0] = get_num_instructions(cs_asm_code); uint32_t size = sizeof(uint64_t)*asm_sizes[0]; - //TODO this alloc feels kinda useless, we just copy the data anyway to kernel space - //why not map kernel space mem to user space instead? + //TODO this alloc feels kinda useless asm_ptrs[0] = (uint64_t*)malloc(size); assemble_qpu_asm(cs_asm_code, asm_ptrs[0]); } @@ -930,8 +926,7 @@ void createTextureToTextureShaderModule(VkDevice device, VkShaderModule* blitSha { //assemble vs code asm_sizes[1] = get_num_instructions(vs_asm_code); uint32_t size = sizeof(uint64_t)*asm_sizes[1]; - //TODO this alloc feels kinda useless, we just copy the data anyway to kernel space - //why not map kernel space mem to user space instead? + //TODO this alloc feels kinda useless asm_ptrs[1] = (uint64_t*)malloc(size); assemble_qpu_asm(vs_asm_code, asm_ptrs[1]); } @@ -939,8 +934,7 @@ void createTextureToTextureShaderModule(VkDevice device, VkShaderModule* blitSha { //assemble fs code asm_sizes[2] = get_num_instructions(sample_fs_asm_code); uint32_t size = sizeof(uint64_t)*asm_sizes[2]; - //TODO this alloc feels kinda useless, we just copy the data anyway to kernel space - //why not map kernel space mem to user space instead? + //TODO this alloc feels kinda useless asm_ptrs[2] = (uint64_t*)malloc(size); assemble_qpu_asm(sample_fs_asm_code, asm_ptrs[2]); } diff --git a/driver/draw.c b/driver/draw.c index f08eafe..39e8fea 100644 --- a/driver/draw.c +++ b/driver/draw.c @@ -102,7 +102,6 @@ static uint32_t drawCommon(VkCommandBuffer commandBuffer, int32_t vertexOffset) !(cb->graphicsPipeline->cullMode & VK_CULL_MODE_BACK_BIT), //enable back facing primitives !(cb->graphicsPipeline->cullMode & VK_CULL_MODE_FRONT_BIT)); //enable front facing primitives - //TODO Depth Offset clFit(commandBuffer, &commandBuffer->binCl, V3D21_DEPTH_OFFSET_length); float depthBiasConstant = cb->graphicsPipeline->depthBiasConstantFactor; @@ -200,7 +199,6 @@ static uint32_t drawCommon(VkCommandBuffer commandBuffer, int32_t vertexOffset) .offset = 0, }; - //TODO commandBuffer->shaderRecCount++; clFit(commandBuffer, &commandBuffer->shaderRecCl, 12 * sizeof(uint32_t) + 104 + 8 * 32); ControlList relocCl = commandBuffer->shaderRecCl; diff --git a/driver/kernelInterface.c b/driver/kernelInterface.c index 8e5cd72..6cfdb49 100644 --- a/driver/kernelInterface.c +++ b/driver/kernelInterface.c @@ -183,8 +183,6 @@ int vc4_test_tiling(int fd) return 0; } -//TODO what is this supposed to do? -//ask the kernel what is the buffer's tiling? uint64_t vc4_bo_get_tiling(int fd, uint32_t bo, uint64_t mod) { assert(fd); diff --git a/driver/stateChange.c b/driver/stateChange.c index 59385ca..a1a3b7d 100644 --- a/driver/stateChange.c +++ b/driver/stateChange.c @@ -219,8 +219,7 @@ void createClearShaderModule(VkDevice device, VkShaderModule* blitShaderModule, { //assemble cs code asm_sizes[0] = get_num_instructions(cs_asm_code); uint32_t size = sizeof(uint64_t)*asm_sizes[0]; - //TODO this alloc feels kinda useless, we just copy the data anyway to kernel space - //why not map kernel space mem to user space instead? + //TODO this alloc feels kinda useless asm_ptrs[0] = (uint64_t*)malloc(size); assemble_qpu_asm(cs_asm_code, asm_ptrs[0]); assert(asm_ptrs[0]); @@ -229,8 +228,7 @@ void createClearShaderModule(VkDevice device, VkShaderModule* blitShaderModule, { //assemble vs code asm_sizes[1] = get_num_instructions(vs_asm_code); uint32_t size = sizeof(uint64_t)*asm_sizes[1]; - //TODO this alloc feels kinda useless, we just copy the data anyway to kernel space - //why not map kernel space mem to user space instead? + //TODO this alloc feels kinda useless asm_ptrs[1] = (uint64_t*)malloc(size); assemble_qpu_asm(vs_asm_code, asm_ptrs[1]); assert(asm_ptrs[1]); @@ -239,8 +237,7 @@ void createClearShaderModule(VkDevice device, VkShaderModule* blitShaderModule, { //assemble fs code asm_sizes[2] = get_num_instructions(fs_asm_code); uint32_t size = sizeof(uint64_t)*asm_sizes[2]; - //TODO this alloc feels kinda useless, we just copy the data anyway to kernel space - //why not map kernel space mem to user space instead? + //TODO this alloc feels kinda useless asm_ptrs[2] = (uint64_t*)malloc(size); assemble_qpu_asm(fs_asm_code, asm_ptrs[2]); assert(asm_ptrs[2]); diff --git a/test/mipmapping/mipmapping.cpp b/test/mipmapping/mipmapping.cpp index 66b5c40..2f4fa9d 100644 --- a/test/mipmapping/mipmapping.cpp +++ b/test/mipmapping/mipmapping.cpp @@ -749,9 +749,6 @@ void recordCommandBuffers() vkCmdPushConstants(presentCommandBuffers[i], samplePipelineLayout, VK_SHADER_STAGE_VERTEX_BIT, 0, sizeof(pushConstants), &pushConstants); - //TODO some miplevels are small enough to fall - //into LT sizes (eg. < 4096bytes overall) - //and that doesn't work for some reason float mipBias = 6.0f; uint32_t fragPushConstants[1]; fragPushConstants[0] = *(uint32_t*)&mipBias;