[PATCH 4/8] wined3d: Change vPrim register data type to signed integer.

Józef Kucia jkucia at codeweavers.com
Thu May 18 08:19:57 CDT 2017


Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---

HLSL compiler treats vPrim as integer register in tessellation shaders.
This also improves consistency with other registers.

---
 dlls/wined3d/glsl_shader.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 6f51939..522a30d 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -3002,9 +3002,9 @@ static void shader_glsl_get_register_name(const struct wined3d_shader_register *
 
         case WINED3DSPR_PRIMID:
             if (version->type == WINED3D_SHADER_TYPE_GEOMETRY)
-                sprintf(register_name, "uint(gl_PrimitiveIDIn)");
+                sprintf(register_name, "gl_PrimitiveIDIn");
             else
-                sprintf(register_name, "uint(gl_PrimitiveID)");
+                sprintf(register_name, "gl_PrimitiveID");
             break;
 
         case WINED3DSPR_IDXTEMP:
@@ -3192,13 +3192,11 @@ static void shader_glsl_add_src_param_ext(const struct wined3d_shader_instructio
         case WINED3DSPR_IMMCONST:
             param_data_type = data_type;
             break;
-        case WINED3DSPR_PRIMID:
-            param_data_type = WINED3D_DATA_UINT;
-            break;
         case WINED3DSPR_GSINSTID:
         case WINED3DSPR_LOCALTHREADID:
         case WINED3DSPR_LOCALTHREADINDEX:
         case WINED3DSPR_OUTPOINTID:
+        case WINED3DSPR_PRIMID:
         case WINED3DSPR_THREADGROUPID:
         case WINED3DSPR_THREADID:
             param_data_type = WINED3D_DATA_INT;
-- 
2.10.2




More information about the wine-patches mailing list