On 8/11/22 15:26, Francisco Casas wrote:
diff --git a/libs/vkd3d-shader/hlsl.c b/libs/vkd3d-shader/hlsl.c index f076f9cf..cb04d33e 100644 --- a/libs/vkd3d-shader/hlsl.c +++ b/libs/vkd3d-shader/hlsl.c @@ -1544,6 +1544,10 @@ static void dump_ir_constant(struct vkd3d_string_buffer *buffer, const struct hl vkd3d_string_buffer_printf(buffer, "%.8e ", value->f); break;
case HLSL_TYPE_HALF:
vkd3d_string_buffer_printf(buffer, "%.4e ", value->f);
break;
case HLSL_TYPE_INT: vkd3d_string_buffer_printf(buffer, "%d ", value->i); break;
The full 32 bits of precision are encoded into the shader, so I think it makes more sense just to treat halves identically to floats here (and in almost all places, really.)