shader: only convert tex results from int if dst isn't int.

Fixes miscompiling shaders for stencil exports (doesn't fix tests yet)
macos/master
Dave Airlie 7 years ago
parent 0acd5a8e8f
commit 52582dbe03
  1. 4
      src/vrend_shader.c

@ -1026,9 +1026,13 @@ static int translate_tex(struct dump_ctx *ctx,
} else { } else {
switch (ctx->samplers[sreg_index].tgsi_sampler_return) { switch (ctx->samplers[sreg_index].tgsi_sampler_return) {
case TGSI_RETURN_TYPE_SINT: case TGSI_RETURN_TYPE_SINT:
/* if dstconv isn't an int */
if (strcmp(dstconv, "int"))
dtypeprefix = "intBitsToFloat"; dtypeprefix = "intBitsToFloat";
break; break;
case TGSI_RETURN_TYPE_UINT: case TGSI_RETURN_TYPE_UINT:
/* if dstconv isn't an int */
if (strcmp(dstconv, "int"))
dtypeprefix = "uintBitsToFloat"; dtypeprefix = "uintBitsToFloat";
break; break;
default: default:

Loading…
Cancel
Save