nir_shader* nir =
vk_spirv_to_nir(&device->vk, spirv_source, spirv_source_size * 4,
stage, "main", 0, NULL, &spirv_options,
- nir_options, NULL);
+ nir_options, true /* internal */,
+ NULL);
assert(nir != NULL);
- nir->info.internal = true;
-
NIR_PASS_V(nir, nir_lower_vars_to_ssa);
NIR_PASS_V(nir, nir_opt_cse);
NIR_PASS_V(nir, nir_opt_gcm, true);
const VkSpecializationInfo *spec_info,
const struct spirv_to_nir_options *spirv_options,
const struct nir_shader_compiler_options *nir_options,
+ bool internal,
void *mem_ctx)
{
assert(spirv_size_B >= 4 && spirv_size_B % 4 == 0);
if (mem_ctx != NULL)
ralloc_steal(mem_ctx, nir);
+ nir->info.internal = internal;
+
/* We have to lower away local constant initializers right before we
* inline functions. That way they get properly initialized at the top
* of the function and not at the top of its caller.
const VkSpecializationInfo *spec_info,
const struct spirv_to_nir_options *spirv_options,
const struct nir_shader_compiler_options *nir_options,
+ bool internal,
void *mem_ctx);
#ifdef __cplusplus
nir_shader *nir = vk_spirv_to_nir(device, spirv_data, spirv_size, stage,
info->pName, subgroup_size,
info->pSpecializationInfo,
- spirv_options, nir_options, mem_ctx);
+ spirv_options, nir_options,
+ false /* internal */,
+ mem_ctx);
if (nir == NULL)
return vk_errorf(device, VK_ERROR_UNKNOWN, "spirv_to_nir failed");