Module: Mesa
Branch: 12.0
Commit: bd114e6be66658945ed185483369498ae390d515
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=bd114e6be66658945ed185483369498ae390d515

Author: Marek Olšák <[email protected]>
Date:   Sun Aug 21 01:32:22 2016 +0200

radeonsi: fix a crash in imageSize for cubemap arrays

Sometimes it was f32, other times it was i32. Now it's always i32.

This fixes:
GL45-CTS.texture_cube_map_array.image_texture_size.texture_size_compute_sh

Reviewed-by: Dave Airlie <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
(cherry picked from commit 3e756f09d451847e465418a7e10c386fd3c5d16f)

---

 src/gallium/drivers/radeonsi/si_shader.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_shader.c 
b/src/gallium/drivers/radeonsi/si_shader.c
index 1034944..091f7e3 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -4033,7 +4033,7 @@ static void resq_fetch_args(
        const struct tgsi_full_instruction *inst = emit_data->inst;
        const struct tgsi_full_src_register *reg = &inst->Src[0];
 
-       emit_data->dst_type = LLVMVectorType(bld_base->base.elem_type, 4);
+       emit_data->dst_type = ctx->v4i32;
 
        if (reg->Register.File == TGSI_FILE_BUFFER) {
                emit_data->args[0] = shader_buffer_fetch_rsrc(ctx, reg);
@@ -4084,9 +4084,7 @@ static void resq_emit(
                        LLVMValueRef imm6 = lp_build_const_int32(gallivm, 6);
 
                        LLVMValueRef z = LLVMBuildExtractElement(builder, out, 
imm2, "");
-                       z = LLVMBuildBitCast(builder, z, 
bld_base->uint_bld.elem_type, "");
                        z = LLVMBuildSDiv(builder, z, imm6, "");
-                       z = LLVMBuildBitCast(builder, z, 
bld_base->base.elem_type, "");
                        out = LLVMBuildInsertElement(builder, out, z, imm2, "");
                }
        }

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to