aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/gallivm
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2015-10-12 15:35:40 +1000
committerDave Airlie <[email protected]>2015-12-09 13:56:39 +1000
commita13b14930d94b024160fe17814e091356d07f7fb (patch)
treed565ab6999853fec67d1d2c2524a524059765b19 /src/gallium/auxiliary/gallivm
parent3a7f95b3aa7397aa8a118d2634fdc5cf8f84f989 (diff)
llvmpipe: fix fp64 inputs to geom shader.
This fixes the fetching of fp64 inputs to the geometry shader, this fixes the recently posted piglit's arb_gpu_shader_fp64/execution/gs-fs-vs-double-array.shader_test arb_vertex_attrib_64bit/execution/gs-fs-vs-attrib-double-array.shader_test Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/gallivm')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
index 3dadde2f26f..09c1b379172 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
@@ -1548,13 +1548,21 @@ emit_fetch_gs_input(
swizzle_index);
assert(res);
-
- if (stype == TGSI_TYPE_UNSIGNED) {
+ if (stype == TGSI_TYPE_DOUBLE) {
+ LLVMValueRef swizzle_index = lp_build_const_int32(gallivm, swizzle + 1);
+ LLVMValueRef res2;
+ res2 = bld->gs_iface->fetch_input(bld->gs_iface, bld_base,
+ reg->Dimension.Indirect,
+ vertex_index,
+ reg->Register.Indirect,
+ attrib_index,
+ swizzle_index);
+ assert(res2);
+ res = emit_fetch_double(bld_base, stype, res, res2);
+ } else if (stype == TGSI_TYPE_UNSIGNED) {
res = LLVMBuildBitCast(builder, res, bld_base->uint_bld.vec_type, "");
} else if (stype == TGSI_TYPE_SIGNED) {
res = LLVMBuildBitCast(builder, res, bld_base->int_bld.vec_type, "");
- } else if (stype == TGSI_TYPE_DOUBLE) {
- res = LLVMBuildBitCast(builder, res, bld_base->dbl_bld.vec_type, "");
}
return res;