mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 02:48:06 +02:00
radv: move setting NIR options for meta shaders
To remove radv_device from radv_meta_nir_init_shader(). Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40481>
This commit is contained in:
parent
dcf0274e82
commit
6bf978e13e
3 changed files with 3 additions and 3 deletions
|
|
@ -18,7 +18,6 @@
|
|||
nir_builder PRINTFLIKE(3, 4)
|
||||
radv_meta_nir_init_shader(struct radv_device *dev, mesa_shader_stage stage, const char *name, ...)
|
||||
{
|
||||
const struct radv_physical_device *pdev = radv_device_physical(dev);
|
||||
nir_builder b = nir_builder_init_simple_shader(stage, NULL, NULL);
|
||||
if (name) {
|
||||
va_list args;
|
||||
|
|
@ -27,8 +26,6 @@ nir_builder PRINTFLIKE(3, 4)
|
|||
va_end(args);
|
||||
}
|
||||
|
||||
b.shader->options = &pdev->nir_options[stage];
|
||||
|
||||
return b;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1297,6 +1297,7 @@ radv_build_traversal_shader(struct radv_device *device, struct radv_ray_tracing_
|
|||
/* Create the traversal shader as an intersection shader to prevent validation failures due to
|
||||
* invalid variable modes.*/
|
||||
nir_builder b = radv_meta_nir_init_shader(device, MESA_SHADER_INTERSECTION, "rt_traversal");
|
||||
b.shader->options = &pdev->nir_options[MESA_SHADER_INTERSECTION];
|
||||
b.shader->info.workgroup_size[0] = pdev->rt_wave_size;
|
||||
b.shader->info.api_subgroup_size = pdev->rt_wave_size;
|
||||
b.shader->info.max_subgroup_size = pdev->rt_wave_size;
|
||||
|
|
|
|||
|
|
@ -457,6 +457,8 @@ radv_shader_spirv_to_nir(struct radv_device *device, const struct radv_shader_st
|
|||
bool progress;
|
||||
|
||||
if (stage->internal_nir) {
|
||||
stage->internal_nir->options = &pdev->nir_options[stage->internal_nir->info.stage];
|
||||
|
||||
/* Some things such as our meta clear/blit code will give us a NIR
|
||||
* shader directly. In that case, we just ignore the SPIR-V entirely
|
||||
* and just use the NIR shader. We don't want to alter meta and RT
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue