Commit 656c038d authored by Karol Herbst's avatar Karol Herbst 🐧 Committed by Karol Herbst

st/mesa: fix crash for drivers supporting nir defaulting to tgsi

nvc0 and I assume radeonsi as well hit an assert inside glsl_to_tgsi as atan
instructions get inserted into the shader.

Fixes: cece947a ("glsl/builtin: Add alternate versions of atan using new ops")
Cc: Neil Roberts <nroberts@igalia.com>
Signed-off-by: Karol Herbst's avatarKarol Herbst <kherbst@redhat.com>
Reviewed-by: Timothy Arceri's avatarTimothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: default avatarMarek Olšák <marek.olsak@amd.com>
Reviewed-by: Rob Clark's avatarRob Clark <robdclark@gmail.com>
parent aaab7003
Pipeline #71098 passed with stages
in 20 minutes and 58 seconds
......@@ -163,7 +163,10 @@ void st_init_limits(struct pipe_screen *screen,
struct gl_program_constants *pc;
const nir_shader_compiler_options *nir_options = NULL;
if (screen->get_compiler_options) {
bool prefer_nir = PIPE_SHADER_IR_NIR ==
screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_PREFERRED_IR);
if (screen->get_compiler_options && prefer_nir) {
nir_options = (const nir_shader_compiler_options *)
screen->get_compiler_options(screen, PIPE_SHADER_IR_NIR, sh);
}
......@@ -324,9 +327,6 @@ void st_init_limits(struct pipe_screen *screen,
if (!screen->get_param(screen, PIPE_CAP_NIR_COMPACT_ARRAYS))
options->LowerCombinedClipCullDistance = true;
bool prefer_nir = PIPE_SHADER_IR_NIR ==
screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_PREFERRED_IR);
/* NIR can do the lowering on our behalf and we'll get better results
* because it can actually optimize SSBO access.
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment