i965: Add gl_state_index casts for PATCH_VERTICES_IN
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 13 Feb 2018 22:56:28 +0000 (14:56 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 14 Feb 2018 21:16:47 +0000 (13:16 -0800)
This fixes the build in clang

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105088
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_nir_uniforms.cpp

index 10a4ff40e5ec2767fce48b3fa6245f2b8b3cacbe..69da83ad364bbddfb2750fbb7b43f5d7cff63b47 100644 (file)
@@ -254,7 +254,8 @@ brw_nir_lower_patch_vertices_in_to_uniform(nir_shader *nir)
       gl_state_index16 tokens[STATE_LENGTH] = {
          STATE_INTERNAL,
          nir->info.stage == MESA_SHADER_TESS_CTRL ?
-            STATE_TCS_PATCH_VERTICES_IN : STATE_TES_PATCH_VERTICES_IN,
+            (gl_state_index16)STATE_TCS_PATCH_VERTICES_IN :
+            (gl_state_index16)STATE_TES_PATCH_VERTICES_IN,
       };
       var->num_state_slots = 1;
       var->state_slots =