瀏覽代碼

radv: fix radv_fixup_vertex_input_fetches()

We should check that num_channels is 4, otherwise that breaks
the world. Sorry for the short breakage.

Fixes: 4b3549c084 ("radv: reduce the number of loaded channels for vertex input fetches")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
tags/19.1-branchpoint
Samuel Pitoiset 6 年之前
父節點
當前提交
227df98fa6
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      src/amd/vulkan/radv_nir_to_llvm.c

+ 1
- 1
src/amd/vulkan/radv_nir_to_llvm.c 查看文件

@@ -2072,7 +2072,7 @@ radv_fixup_vertex_input_fetches(struct radv_shader_context *ctx,
if (LLVMGetTypeKind(LLVMTypeOf(value)) == LLVMVectorTypeKind) {
unsigned vec_size = LLVMGetVectorSize(LLVMTypeOf(value));

if (num_channels == vec_size)
if (num_channels == 4 && num_channels == vec_size)
return value;

num_channels = MIN2(num_channels, vec_size);

Loading…
取消
儲存