From 15d9891d0067930ca4c6f2c2fad726e7c80dc944 Mon Sep 17 00:00:00 2001 From: Unknown <0.tamas.marton@gmail.com> Date: Tue, 21 Apr 2020 21:53:11 +0100 Subject: [PATCH] fixed thread switching detection --- driver/shader.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/driver/shader.c b/driver/shader.c index b560d48..5a06e01 100644 --- a/driver/shader.c +++ b/driver/shader.c @@ -53,13 +53,16 @@ VkResult rpi_vkCreateShaderModule(VkDevice device, const VkShaderModuleCreateInf hadCoordinate = 1; } - for(uint64_t d = 0; d < ci->numInstructions[c]; ++d) + if(c == VK_RPI_ASSEMBLY_TYPE_FRAGMENT) { - uint64_t s = (ci->instructions[c][d] & (0xfll << 60)) >> 60; - if(s == 2ll) + for(uint64_t d = 0; d < ci->numInstructions[c]; ++d) { - shader->hasThreadSwitch = 1; - break; + uint64_t s = (ci->instructions[c][d] & (0xfll << 60)) >> 60; + if(s == 2ll || s == 6ll) + { + shader->hasThreadSwitch = 1; + break; + } } }