spirv: Support LocalSizeId and LocalSizeHintId execution modes
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 22 Jan 2019 19:55:20 +0000 (13:55 -0600)
committerJason Ekstrand <jason@jlekstrand.net>
Fri, 1 Feb 2019 17:34:02 +0000 (17:34 +0000)
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
src/compiler/spirv/spirv_to_nir.c

index ff9635a1895711b9b98f393ee0333f37df26fd22..1cbc926c818a11559d81d4a7498f897b2f2e6578 100644 (file)
@@ -3826,7 +3826,15 @@ vtn_handle_execution_mode(struct vtn_builder *b, struct vtn_value *entry_point,
       b->shader->info.cs.local_size[1] = mode->literals[1];
       b->shader->info.cs.local_size[2] = mode->literals[2];
       break;
+
+   case SpvExecutionModeLocalSizeId:
+      b->shader->info.cs.local_size[0] = vtn_constant_uint(b, mode->literals[0]);
+      b->shader->info.cs.local_size[1] = vtn_constant_uint(b, mode->literals[1]);
+      b->shader->info.cs.local_size[2] = vtn_constant_uint(b, mode->literals[2]);
+      break;
+
    case SpvExecutionModeLocalSizeHint:
+   case SpvExecutionModeLocalSizeHintId:
       break; /* Nothing to do with this */
 
    case SpvExecutionModeOutputVertices: