Paul Gofman : wined3d: Use intBitsToFloat() instead of uintBitsToFloat().
Alexandre Julliard
julliard at winehq.org
Tue Apr 23 17:39:55 CDT 2019
Module: wine
Branch: master
Commit: 75aa4ab16b03a11464ab0d3e4c4cfbff0180c269
URL: https://source.winehq.org/git/wine.git/?a=commit;h=75aa4ab16b03a11464ab0d3e4c4cfbff0180c269
Author: Paul Gofman <gofmanp at gmail.com>
Date: Fri Apr 19 20:32:36 2019 +0300
wined3d: Use intBitsToFloat() instead of uintBitsToFloat().
There is no uint type in GLSL version < 1.3, while
ARB_shader_bit_encoding may still be supported.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47039
Signed-off-by: Paul Gofman <gofmanp at gmail.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wined3d/glsl_shader.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index ce4c0d8..a71af2f 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -434,7 +434,7 @@ static void shader_glsl_append_imm_vec4(struct wined3d_string_buffer *buffer, co
{
const unsigned int *uint_values = (const unsigned int *)values;
- shader_addline(buffer, "uintBitsToFloat(uvec4(%#xu, %#xu, %#xu, %#xu))\n"
+ shader_addline(buffer, "intBitsToFloat(ivec4(%#x, %#x, %#x, %#x))\n"
" /* %s, %s, %s, %s */", uint_values[0], uint_values[1],
uint_values[2], uint_values[3], str[0], str[1], str[2], str[3]);
}
@@ -3141,7 +3141,7 @@ static void shader_glsl_get_register_name(const struct wined3d_shader_register *
case WINED3D_DATA_FLOAT:
if (gl_info->supported[ARB_SHADER_BIT_ENCODING])
{
- string_buffer_sprintf(register_name, "uintBitsToFloat(%#xu)", reg->u.immconst_data[0]);
+ string_buffer_sprintf(register_name, "intBitsToFloat(%#x)", reg->u.immconst_data[0]);
}
else
{
@@ -3171,7 +3171,7 @@ static void shader_glsl_get_register_name(const struct wined3d_shader_register *
case WINED3D_DATA_FLOAT:
if (gl_info->supported[ARB_SHADER_BIT_ENCODING])
{
- string_buffer_sprintf(register_name, "uintBitsToFloat(uvec4(%#xu, %#xu, %#xu, %#xu))",
+ string_buffer_sprintf(register_name, "intBitsToFloat(ivec4(%#x, %#x, %#x, %#x))",
reg->u.immconst_data[0], reg->u.immconst_data[1],
reg->u.immconst_data[2], reg->u.immconst_data[3]);
}
More information about the wine-cvs
mailing list