nir: Set internal=true in nir_builder_init_simple_shader
Matches the expected use by callers. We do need to fix up a few callers which use this call for external shaders. v2: Fix up a radv call site (Rhys). Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Reviewed-by: Emma Anholt <emma@anholt.net> [v1] Acked-by: Rhys Perry <pendingchaos02@gmail.com> Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14936>
This commit is contained in:
parent
a01b262990
commit
7ec1d96e5e
|
@ -2089,6 +2089,7 @@ create_rt_shader(struct radv_device *device, const VkRayTracingPipelineCreateInf
|
|||
memset(&key, 0, sizeof(key));
|
||||
|
||||
nir_builder b = nir_builder_init_simple_shader(MESA_SHADER_COMPUTE, NULL, "rt_combined");
|
||||
b.shader->info.internal = false;
|
||||
|
||||
b.shader->info.workgroup_size[0] = 8;
|
||||
b.shader->info.workgroup_size[1] = device->physical_device->rt_wave_size == 64 ? 8 : 4;
|
||||
|
|
|
@ -56,6 +56,9 @@ nir_builder_init_simple_shader(gl_shader_stage stage,
|
|||
b.impl = nir_function_impl_create(func);
|
||||
b.cursor = nir_after_cf_list(&b.impl->body);
|
||||
|
||||
/* Simple shaders are typically internal, e.g. blit shaders */
|
||||
b.shader->info.internal = true;
|
||||
|
||||
return b;
|
||||
}
|
||||
|
||||
|
|
|
@ -2324,6 +2324,7 @@ ttn_compile_init(const void *tgsi_tokens,
|
|||
s->info.num_ubos = util_last_bit(scan.const_buffers_declared >> 1);
|
||||
s->info.num_images = util_last_bit(scan.images_declared);
|
||||
s->info.num_textures = util_last_bit(scan.samplers_declared);
|
||||
s->info.internal = false;
|
||||
|
||||
for (unsigned i = 0; i < TGSI_PROPERTY_COUNT; i++) {
|
||||
unsigned value = scan.properties[i];
|
||||
|
|
|
@ -1025,6 +1025,7 @@ prog_to_nir(const struct gl_program *prog,
|
|||
s->info.cull_distance_array_size = 0;
|
||||
s->info.separate_shader = false;
|
||||
s->info.io_lowered = false;
|
||||
s->info.internal = false;
|
||||
|
||||
fail:
|
||||
if (c->error) {
|
||||
|
|
|
@ -459,6 +459,7 @@ st_translate_atifs_program(struct ati_fragment_shader *atifs,
|
|||
|
||||
nir_shader *s = t->b->shader;
|
||||
s->info.name = ralloc_asprintf(s, "ATIFS%d", program->Id);
|
||||
s->info.internal = false;
|
||||
|
||||
t->fragcolor = nir_variable_create(b.shader, nir_var_shader_out,
|
||||
glsl_vec4_type(), "gl_FragColor");
|
||||
|
|
Loading…
Reference in New Issue