Explorar el Código

ac: fix ac_build_varying_gather_values() for packed layouts

This fixes a segfault for varyings not starting at component 0.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
tags/18.0-branchpoint
Timothy Arceri hace 7 años
padre
commit
5b9362c248
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1
    1
      src/amd/common/ac_llvm_build.c

+ 1
- 1
src/amd/common/ac_llvm_build.c Ver fichero

@@ -413,7 +413,7 @@ ac_build_varying_gather_values(struct ac_llvm_context *ctx, LLVMValueRef *values
for (unsigned i = component; i < value_count + component; i++) {
LLVMValueRef value = values[i];

if (!i)
if (i == component)
vec = LLVMGetUndef( LLVMVectorType(LLVMTypeOf(value), value_count));
LLVMValueRef index = LLVMConstInt(ctx->i32, i - component, false);
vec = LLVMBuildInsertElement(ctx->builder, vec, value, index, "");

Cargando…
Cancelar
Guardar