struct gl_shader_program *shader_program,
gl_shader_stage stage)
{
+ struct pipe_screen *screen = st->pipe->screen;
const nir_shader_compiler_options *options =
st->ctx->Const.ShaderCompilerOptions[prog->info.stage].NirOptions;
assert(options);
NIR_PASS_V(nir, nir_lower_io_to_temporaries,
nir_shader_get_entrypoint(nir),
true, true);
- } else if (nir->info.stage == MESA_SHADER_FRAGMENT) {
+ } else if (nir->info.stage == MESA_SHADER_FRAGMENT ||
+ !screen->get_param(screen, PIPE_CAP_TGSI_CAN_READ_OUTPUTS)) {
NIR_PASS_V(nir, nir_lower_io_to_temporaries,
nir_shader_get_entrypoint(nir),
true, false);
struct gl_shader_program *shader_program)
{
struct st_context *st = st_context(ctx);
- struct pipe_screen *screen = st->pipe->screen;
unsigned num_linked_shaders = 0;
unsigned last_stage = 0;
_mesa_generate_parameters_list_for_uniforms(ctx, shader_program, shader,
prog->Parameters);
- /* Remove reads from output registers. */
- if (!screen->get_param(screen, PIPE_CAP_TGSI_CAN_READ_OUTPUTS))
- lower_output_reads(shader->Stage, shader->ir);
-
if (ctx->_Shader->Flags & GLSL_DUMP) {
_mesa_log("\n");
_mesa_log("GLSL IR for linked %s program %d:\n",