1
0
mirror of https://github.com/Yours3lf/rpi-vk-driver.git synced 2025-01-18 10:52:14 +01:00

added shader performance data gathering and validation

This commit is contained in:
yours3lf 2020-05-12 19:55:37 +01:00
parent ae03fdeacc
commit 24c387abb8
3 changed files with 337 additions and 11 deletions

View File

@ -254,7 +254,30 @@ typedef struct VkShaderModule_T
VkRpiAssemblyMappingEXT* mappings[VK_RPI_ASSEMBLY_TYPE_MAX]; VkRpiAssemblyMappingEXT* mappings[VK_RPI_ASSEMBLY_TYPE_MAX];
uint32_t numMappings[VK_RPI_ASSEMBLY_TYPE_MAX]; uint32_t numMappings[VK_RPI_ASSEMBLY_TYPE_MAX];
uint32_t hasThreadSwitch; uint32_t hasThreadSwitch;
uint32_t numTextureSamples;
uint32_t numVaryings; uint32_t numVaryings;
uint32_t numFragUniformReads;
uint32_t numVertUniformReads;
uint32_t numCoordUniformReads;
uint32_t numVertVPMreads;
uint32_t numCoordVPMreads;
uint32_t numVertVPMwrites;
uint32_t numCoordVPMwrites;
uint32_t numFragCycles;
uint32_t numVertCycles;
uint32_t numCoordCycles;
uint32_t numFragALUcycles;
uint32_t numVertALUcycles;
uint32_t numCoordALUcycles;
uint32_t numEmptyFragALUinstructions;
uint32_t numEmptyVertALUinstructions;
uint32_t numEmptyCoordALUinstructions;
uint32_t numFragBranches;
uint32_t numVertBranches;
uint32_t numCoordBranches;
uint32_t numFragSFUoperations;
uint32_t numVertSFUoperations;
uint32_t numCoordSFUoperations;
} _shaderModule; } _shaderModule;
typedef struct VkDescriptorSetLayout_T typedef struct VkDescriptorSetLayout_T

View File

@ -212,6 +212,9 @@ static uint32_t drawCommon(VkCommandBuffer commandBuffer, int32_t vertexOffset)
} }
} }
assert(vertModule->numVertVPMreads == vertexAttribSize >> 2);
assert(vertModule->numCoordVPMreads == coordAttribSize >> 2);
//number of attribs //number of attribs
//3 is the number of type of possible shaders //3 is the number of type of possible shaders
for(int c = 0; c < (3 + attribCount)*4; ++c) for(int c = 0; c < (3 + attribCount)*4; ++c)
@ -321,6 +324,11 @@ static uint32_t drawCommon(VkCommandBuffer commandBuffer, int32_t vertexOffset)
//write uniforms //write uniforms
_pipelineLayout* pl = cb->graphicsPipeline->layout; _pipelineLayout* pl = cb->graphicsPipeline->layout;
assert(vertModule->numVertVPMwrites - 3 == fragModule->numVaryings);
assert(vertModule->numCoordVPMwrites == 7);
uint32_t numTextureSamples = 0;
uint32_t numFragUniformReads = 0;
//kernel side expects relocations first! //kernel side expects relocations first!
for(uint32_t c = 0; c < fragModule->numMappings[VK_RPI_ASSEMBLY_TYPE_FRAGMENT]; ++c) for(uint32_t c = 0; c < fragModule->numMappings[VK_RPI_ASSEMBLY_TYPE_FRAGMENT]; ++c)
@ -329,6 +337,8 @@ static uint32_t drawCommon(VkCommandBuffer commandBuffer, int32_t vertexOffset)
if(mapping.mappingType == VK_RPI_ASSEMBLY_MAPPING_TYPE_DESCRIPTOR) if(mapping.mappingType == VK_RPI_ASSEMBLY_MAPPING_TYPE_DESCRIPTOR)
{ {
numTextureSamples++;
if(mapping.descriptorType == VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER || if(mapping.descriptorType == VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER ||
mapping.descriptorType == VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE || mapping.descriptorType == VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE ||
mapping.descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_IMAGE) mapping.descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_IMAGE)
@ -344,6 +354,8 @@ static uint32_t drawCommon(VkCommandBuffer commandBuffer, int32_t vertexOffset)
//emit tex bo reloc index //emit tex bo reloc index
clFit(commandBuffer, &commandBuffer->uniformsCl, 4); clFit(commandBuffer, &commandBuffer->uniformsCl, 4);
clInsertData(&commandBuffer->uniformsCl, 4, &idx); clInsertData(&commandBuffer->uniformsCl, 4, &idx);
numFragUniformReads++;
} }
else if(mapping.descriptorType == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER || else if(mapping.descriptorType == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER ||
mapping.descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER || mapping.descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER ||
@ -361,6 +373,8 @@ static uint32_t drawCommon(VkCommandBuffer commandBuffer, int32_t vertexOffset)
//emit bo reloc index //emit bo reloc index
clFit(commandBuffer, &commandBuffer->uniformsCl, 4); clFit(commandBuffer, &commandBuffer->uniformsCl, 4);
clInsertData(&commandBuffer->uniformsCl, 4, &idx); clInsertData(&commandBuffer->uniformsCl, 4, &idx);
numFragUniformReads++;
} }
else if(mapping.descriptorType == VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER || else if(mapping.descriptorType == VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER ||
mapping.descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER) mapping.descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER)
@ -376,6 +390,8 @@ static uint32_t drawCommon(VkCommandBuffer commandBuffer, int32_t vertexOffset)
//emit bo reloc index //emit bo reloc index
clFit(commandBuffer, &commandBuffer->uniformsCl, 4); clFit(commandBuffer, &commandBuffer->uniformsCl, 4);
clInsertData(&commandBuffer->uniformsCl, 4, &idx); clInsertData(&commandBuffer->uniformsCl, 4, &idx);
numFragUniformReads++;
} }
else else
{ {
@ -384,6 +400,8 @@ static uint32_t drawCommon(VkCommandBuffer commandBuffer, int32_t vertexOffset)
} }
} }
assert(numTextureSamples == fragModule->numTextureSamples);
//after relocs we can proceed with the usual uniforms //after relocs we can proceed with the usual uniforms
for(uint32_t c = 0; c < fragModule->numMappings[VK_RPI_ASSEMBLY_TYPE_FRAGMENT]; ++c) for(uint32_t c = 0; c < fragModule->numMappings[VK_RPI_ASSEMBLY_TYPE_FRAGMENT]; ++c)
{ {
@ -391,6 +409,8 @@ static uint32_t drawCommon(VkCommandBuffer commandBuffer, int32_t vertexOffset)
if(mapping.mappingType == VK_RPI_ASSEMBLY_MAPPING_TYPE_PUSH_CONSTANT) if(mapping.mappingType == VK_RPI_ASSEMBLY_MAPPING_TYPE_PUSH_CONSTANT)
{ {
numFragUniformReads++;
clFit(commandBuffer, &commandBuffer->uniformsCl, 4); clFit(commandBuffer, &commandBuffer->uniformsCl, 4);
clInsertData(&commandBuffer->uniformsCl, 4, cb->pushConstantBufferPixel + mapping.resourceOffset); clInsertData(&commandBuffer->uniformsCl, 4, cb->pushConstantBufferPixel + mapping.resourceOffset);
} }
@ -453,6 +473,8 @@ static uint32_t drawCommon(VkCommandBuffer commandBuffer, int32_t vertexOffset)
size += 4; size += 4;
} }
numFragUniformReads += size >> 2;
//emit tex parameters //emit tex parameters
clFit(commandBuffer, &commandBuffer->uniformsCl, size); clFit(commandBuffer, &commandBuffer->uniformsCl, size);
clInsertData(&commandBuffer->uniformsCl, size, params); clInsertData(&commandBuffer->uniformsCl, size, params);
@ -460,6 +482,10 @@ static uint32_t drawCommon(VkCommandBuffer commandBuffer, int32_t vertexOffset)
} }
} }
assert(numFragUniformReads == fragModule->numFragUniformReads);
uint32_t numVertUniformReads = 0;
//vertex and then coordinate //vertex and then coordinate
for(uint32_t c = 0; c < vertModule->numMappings[VK_RPI_ASSEMBLY_TYPE_VERTEX]; ++c) for(uint32_t c = 0; c < vertModule->numMappings[VK_RPI_ASSEMBLY_TYPE_VERTEX]; ++c)
{ {
@ -467,6 +493,8 @@ static uint32_t drawCommon(VkCommandBuffer commandBuffer, int32_t vertexOffset)
if(mapping.mappingType == VK_RPI_ASSEMBLY_MAPPING_TYPE_PUSH_CONSTANT) if(mapping.mappingType == VK_RPI_ASSEMBLY_MAPPING_TYPE_PUSH_CONSTANT)
{ {
numVertUniformReads++;
clFit(commandBuffer, &commandBuffer->uniformsCl, 4); clFit(commandBuffer, &commandBuffer->uniformsCl, 4);
clInsertData(&commandBuffer->uniformsCl, 4, cb->pushConstantBufferVertex + mapping.resourceOffset); clInsertData(&commandBuffer->uniformsCl, 4, cb->pushConstantBufferVertex + mapping.resourceOffset);
} }
@ -480,6 +508,10 @@ static uint32_t drawCommon(VkCommandBuffer commandBuffer, int32_t vertexOffset)
} }
} }
assert(numVertUniformReads == vertModule->numVertUniformReads);
uint32_t numCoordUniformReads = 0;
//if there are no coordinate mappings, just use the vertex ones //if there are no coordinate mappings, just use the vertex ones
VkRpiAssemblyTypeEXT coordMappingType = VK_RPI_ASSEMBLY_TYPE_COORDINATE; VkRpiAssemblyTypeEXT coordMappingType = VK_RPI_ASSEMBLY_TYPE_COORDINATE;
if(vertModule->numMappings[VK_RPI_ASSEMBLY_TYPE_COORDINATE] < 1) if(vertModule->numMappings[VK_RPI_ASSEMBLY_TYPE_COORDINATE] < 1)
@ -493,6 +525,8 @@ static uint32_t drawCommon(VkCommandBuffer commandBuffer, int32_t vertexOffset)
if(mapping.mappingType == VK_RPI_ASSEMBLY_MAPPING_TYPE_PUSH_CONSTANT) if(mapping.mappingType == VK_RPI_ASSEMBLY_MAPPING_TYPE_PUSH_CONSTANT)
{ {
numCoordUniformReads++;
clFit(commandBuffer, &commandBuffer->uniformsCl, 4); clFit(commandBuffer, &commandBuffer->uniformsCl, 4);
clInsertData(&commandBuffer->uniformsCl, 4, cb->pushConstantBufferVertex + mapping.resourceOffset); clInsertData(&commandBuffer->uniformsCl, 4, cb->pushConstantBufferVertex + mapping.resourceOffset);
} }
@ -506,6 +540,8 @@ static uint32_t drawCommon(VkCommandBuffer commandBuffer, int32_t vertexOffset)
} }
} }
assert(numCoordUniformReads == vertModule->numCoordUniformReads);
return maxIndex; return maxIndex;
} }

View File

@ -3,13 +3,12 @@
#include "kernel/vc4_packet.h" #include "kernel/vc4_packet.h"
#include "QPUassembler/qpu_assembler.h" #include "QPUassembler/qpu_assembler.h"
#include "QPUassembler/vc4_qpu_enums.h"
#include "QPUassembler/vc4_qpu_defines.h"
#include "vkExt.h" #include "vkExt.h"
//TODO collect shader performance data
//eg number of texture samples etc.
//TODO check if shader has flow control and make sure instance also has flow control //TODO check if shader has flow control and make sure instance also has flow control
//TODO make sure instance has threaded fs if shader contains thread switch
/* /*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkCreateShaderModule * https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkCreateShaderModule
@ -37,7 +36,30 @@ VkResult rpi_vkCreateShaderModule(VkDevice device, const VkShaderModuleCreateInf
} }
shader->hasThreadSwitch = 0; shader->hasThreadSwitch = 0;
shader->numTextureSamples = 0;
shader->numVaryings = 0; shader->numVaryings = 0;
shader->numFragUniformReads = 0;
shader->numVertUniformReads = 0;
shader->numCoordUniformReads = 0;
shader->numVertVPMreads = 0;
shader->numCoordVPMreads = 0;
shader->numVertVPMwrites = 0;
shader->numCoordVPMwrites = 0;
shader->numFragCycles = 0;
shader->numVertCycles = 0;
shader->numCoordCycles = 0;
shader->numFragALUcycles = 0;
shader->numVertALUcycles = 0;
shader->numCoordALUcycles = 0;
shader->numEmptyFragALUinstructions = 0;
shader->numEmptyVertALUinstructions = 0;
shader->numEmptyCoordALUinstructions = 0;
shader->numFragBranches = 0;
shader->numVertBranches = 0;
shader->numCoordBranches = 0;
shader->numFragSFUoperations = 0;
shader->numVertSFUoperations = 0;
shader->numCoordSFUoperations = 0;
uint32_t hadVertex = 0, hadCoordinate = 0; uint32_t hadVertex = 0, hadCoordinate = 0;
@ -58,37 +80,282 @@ VkResult rpi_vkCreateShaderModule(VkDevice device, const VkShaderModuleCreateInf
{ {
for(uint64_t d = 0; d < ci->numInstructions[c]; ++d) for(uint64_t d = 0; d < ci->numInstructions[c]; ++d)
{ {
uint64_t s = (ci->instructions[c][d] & (0xfll << 60)) >> 60; uint64_t s = (ci->instructions[c][d] & (0xfll << QPU_SIG_SHIFT)) >> QPU_SIG_SHIFT;
if(s == 2ll || s == 6ll) if(s == QPU_SIG_THREAD_SWITCH || s == QPU_SIG_LAST_THREAD_SWITCH)
{ {
shader->hasThreadSwitch = 1; shader->hasThreadSwitch = 1;
break; break;
} }
} }
uint32_t numTMUwrites = 0;
for(uint64_t d = 0; d < ci->numInstructions[c]; ++d) for(uint64_t d = 0; d < ci->numInstructions[c]; ++d)
{ {
unsigned is_sem = ((ci->instructions[c][d] & (0x7fll << 57)) >> 57) == 0x74; unsigned is_sem = ((ci->instructions[c][d] & (0x7fll << 57)) >> 57) == 0x74;
unsigned sig_bits = ((ci->instructions[c][d] & (0xfll << 60)) >> 60); unsigned sig_bits = ((ci->instructions[c][d] & (0xfll << QPU_SIG_SHIFT)) >> QPU_SIG_SHIFT);
unsigned waddr_add = ((ci->instructions[c][d] & (0x3fll << QPU_WADDR_ADD_SHIFT)) >> QPU_WADDR_ADD_SHIFT);
unsigned waddr_mul = ((ci->instructions[c][d] & (0x3fll << QPU_WADDR_MUL_SHIFT)) >> QPU_WADDR_MUL_SHIFT);
if(waddr_add == QPU_W_SFU_RECIP ||
waddr_add == QPU_W_SFU_RECIPSQRT ||
waddr_add == QPU_W_SFU_EXP ||
waddr_add == QPU_W_SFU_LOG)
{
shader->numFragSFUoperations++;
}
if(waddr_mul == QPU_W_SFU_RECIP ||
waddr_mul == QPU_W_SFU_RECIPSQRT ||
waddr_mul == QPU_W_SFU_EXP ||
waddr_mul == QPU_W_SFU_LOG)
{
shader->numFragSFUoperations++;
}
if(waddr_add == QPU_W_TMU0_S ||
waddr_add == QPU_W_TMU0_T ||
waddr_add == QPU_W_TMU0_R ||
waddr_add == QPU_W_TMU0_B ||
waddr_add == QPU_W_TMU1_S ||
waddr_add == QPU_W_TMU1_T ||
waddr_add == QPU_W_TMU1_R ||
waddr_add == QPU_W_TMU1_B)
{
numTMUwrites++;
}
if(waddr_mul == QPU_W_TMU0_S ||
waddr_mul == QPU_W_TMU0_T ||
waddr_mul == QPU_W_TMU0_R ||
waddr_mul == QPU_W_TMU0_B ||
waddr_mul == QPU_W_TMU1_S ||
waddr_mul == QPU_W_TMU1_T ||
waddr_mul == QPU_W_TMU1_R ||
waddr_mul == QPU_W_TMU1_B
)
{
numTMUwrites++;
}
if(!is_sem && (sig_bits == QPU_SIG_LOAD_TMU0 || sig_bits == QPU_SIG_LOAD_TMU1))
{
shader->numTextureSamples++;
shader->numFragUniformReads++;
}
//if it's an ALU instruction //if it's an ALU instruction
if(!is_sem && sig_bits != 14 && sig_bits != 15) if(!is_sem && sig_bits != QPU_SIG_LOAD_IMM && sig_bits != QPU_SIG_BRANCH)
{ {
unsigned raddr_a = ((ci->instructions[c][d] & (0x3fll << 18)) >> 18); shader->numFragALUcycles++;
unsigned raddr_b = ((ci->instructions[c][d] & (0x3fll << 12)) >> 12);
if(raddr_a == 35) if(waddr_add == QPU_W_NOP)
{
shader->numEmptyFragALUinstructions++;
}
if(waddr_mul == QPU_W_NOP)
{
shader->numEmptyFragALUinstructions++;
}
unsigned raddr_a = ((ci->instructions[c][d] & (0x3fll << QPU_RADDR_A_SHIFT)) >> QPU_RADDR_A_SHIFT);
unsigned raddr_b = ((ci->instructions[c][d] & (0x3fll << QPU_RADDR_B_SHIFT)) >> QPU_RADDR_B_SHIFT);
if(raddr_a == QPU_R_VARY)
{ {
shader->numVaryings++; shader->numVaryings++;
} }
else if(raddr_a == QPU_R_UNIF)
{
shader->numFragUniformReads++;
}
//don't count small immediates //don't count small immediates
if(sig_bits != 13 && raddr_b == 35) if(sig_bits != QPU_SIG_SMALL_IMM && raddr_b == QPU_R_VARY)
{ {
shader->numVaryings++; shader->numVaryings++;
} }
else if(sig_bits != QPU_SIG_SMALL_IMM && raddr_b == QPU_R_UNIF)
{
shader->numFragUniformReads++;
}
}
else if(!is_sem && sig_bits == QPU_SIG_BRANCH)
{
shader->numFragBranches++;
} }
} }
if(numTMUwrites > 1)
{
shader->numFragUniformReads += numTMUwrites;
}
}
if(c == VK_RPI_ASSEMBLY_TYPE_VERTEX || c == VK_RPI_ASSEMBLY_TYPE_COORDINATE)
{
for(uint64_t d = 0; d < ci->numInstructions[c]; ++d)
{
unsigned waddr_add = ((ci->instructions[c][d] & (0x3fll << QPU_WADDR_ADD_SHIFT)) >> QPU_WADDR_ADD_SHIFT);
unsigned waddr_mul = ((ci->instructions[c][d] & (0x3fll << QPU_WADDR_MUL_SHIFT)) >> QPU_WADDR_MUL_SHIFT);
unsigned is_sem = ((ci->instructions[c][d] & (0x7fll << 57)) >> 57) == 0x74;
unsigned sig_bits = ((ci->instructions[c][d] & (0xfll << QPU_SIG_SHIFT)) >> QPU_SIG_SHIFT);
if(waddr_add == QPU_W_SFU_RECIP ||
waddr_add == QPU_W_SFU_RECIPSQRT ||
waddr_add == QPU_W_SFU_EXP ||
waddr_add == QPU_W_SFU_LOG)
{
if(c == VK_RPI_ASSEMBLY_TYPE_VERTEX)
{
shader->numVertSFUoperations++;
}
else if(c == VK_RPI_ASSEMBLY_TYPE_COORDINATE)
{
shader->numCoordSFUoperations++;
}
}
if(waddr_mul == QPU_W_SFU_RECIP ||
waddr_mul == QPU_W_SFU_RECIPSQRT ||
waddr_mul == QPU_W_SFU_EXP ||
waddr_mul == QPU_W_SFU_LOG)
{
if(c == VK_RPI_ASSEMBLY_TYPE_VERTEX)
{
shader->numVertSFUoperations++;
}
else if(c == VK_RPI_ASSEMBLY_TYPE_COORDINATE)
{
shader->numCoordSFUoperations++;
}
}
if(waddr_add == QPU_W_VPM || waddr_mul == QPU_W_VPM)
{
if(c == VK_RPI_ASSEMBLY_TYPE_VERTEX)
{
shader->numVertVPMwrites++;
}
else if(c == VK_RPI_ASSEMBLY_TYPE_COORDINATE)
{
shader->numCoordVPMwrites++;
}
}
//if it's an ALU instruction
if(!is_sem && sig_bits != QPU_SIG_LOAD_IMM && sig_bits != QPU_SIG_BRANCH)
{
if(c == VK_RPI_ASSEMBLY_TYPE_VERTEX)
{
shader->numVertALUcycles++;
}
else if(c == VK_RPI_ASSEMBLY_TYPE_COORDINATE)
{
shader->numCoordALUcycles++;
}
if(waddr_add == QPU_W_NOP)
{
if(c == VK_RPI_ASSEMBLY_TYPE_VERTEX)
{
shader->numEmptyVertALUinstructions++;
}
else if(c == VK_RPI_ASSEMBLY_TYPE_COORDINATE)
{
shader->numEmptyCoordALUinstructions++;
}
}
if(waddr_mul == QPU_W_NOP)
{
if(c == VK_RPI_ASSEMBLY_TYPE_VERTEX)
{
shader->numEmptyVertALUinstructions++;
}
else if(c == VK_RPI_ASSEMBLY_TYPE_COORDINATE)
{
shader->numEmptyCoordALUinstructions++;
}
}
unsigned raddr_a = ((ci->instructions[c][d] & (0x3fll << QPU_RADDR_A_SHIFT)) >> QPU_RADDR_A_SHIFT);
unsigned raddr_b = ((ci->instructions[c][d] & (0x3fll << QPU_RADDR_B_SHIFT)) >> QPU_RADDR_B_SHIFT);
if(raddr_a == QPU_R_VPM)
{
if(c == VK_RPI_ASSEMBLY_TYPE_VERTEX)
{
shader->numVertVPMreads++;
}
else if(c == VK_RPI_ASSEMBLY_TYPE_COORDINATE)
{
shader->numCoordVPMreads++;
}
}
else if(raddr_a == QPU_R_UNIF)
{
if(c == VK_RPI_ASSEMBLY_TYPE_VERTEX)
{
shader->numVertUniformReads++;
}
else if(c == VK_RPI_ASSEMBLY_TYPE_COORDINATE)
{
shader->numCoordUniformReads++;
}
}
//don't count small immediates
if(sig_bits != QPU_SIG_SMALL_IMM && raddr_b == QPU_R_VPM)
{
if(c == VK_RPI_ASSEMBLY_TYPE_VERTEX)
{
shader->numVertVPMreads++;
}
else if(c == VK_RPI_ASSEMBLY_TYPE_COORDINATE)
{
shader->numCoordVPMreads++;
}
}
else if(sig_bits != QPU_SIG_SMALL_IMM && raddr_b == QPU_R_UNIF)
{
if(c == VK_RPI_ASSEMBLY_TYPE_VERTEX)
{
shader->numVertUniformReads++;
}
else if(c == VK_RPI_ASSEMBLY_TYPE_COORDINATE)
{
shader->numCoordUniformReads++;
}
}
}
else if(!is_sem && sig_bits == QPU_SIG_BRANCH)
{
if(c == VK_RPI_ASSEMBLY_TYPE_VERTEX)
{
shader->numVertBranches++;
}
else if(c == VK_RPI_ASSEMBLY_TYPE_COORDINATE)
{
shader->numCoordBranches++;
}
}
}
}
if(c == VK_RPI_ASSEMBLY_TYPE_FRAGMENT)
{
shader->numFragCycles = ci->numInstructions[c];
}
else if(c == VK_RPI_ASSEMBLY_TYPE_VERTEX)
{
shader->numVertCycles = ci->numInstructions[c];
}
else if(c == VK_RPI_ASSEMBLY_TYPE_COORDINATE)
{
shader->numCoordCycles = ci->numInstructions[c];
} }
shader->sizes[c] = ci->numInstructions[c]*sizeof(uint64_t); shader->sizes[c] = ci->numInstructions[c]*sizeof(uint64_t);