}
}
+void
+st_nir_lower_samplers(struct pipe_screen *screen, nir_shader *nir,
+ struct gl_shader_program *shader_program)
+{
+ if (screen->get_param(screen, PIPE_CAP_NIR_SAMPLERS_AS_DEREF))
+ NIR_PASS_V(nir, gl_nir_lower_samplers_as_deref, shader_program);
+ else
+ NIR_PASS_V(nir, gl_nir_lower_samplers, shader_program);
+}
+
/* Last third of preparing nir from glsl, which happens after shader
* variant lowering.
*/
NIR_PASS_V(nir, st_nir_lower_uniforms_to_ubo);
}
- if (screen->get_param(screen, PIPE_CAP_NIR_SAMPLERS_AS_DEREF))
- NIR_PASS_V(nir, gl_nir_lower_samplers_as_deref, shader_program);
- else
- NIR_PASS_V(nir, gl_nir_lower_samplers, shader_program);
+ st_nir_lower_samplers(screen, nir, shader_program);
}
} /* extern "C" */
void st_nir_assign_varying_locations(struct st_context *st,
struct nir_shader *nir);
+void st_nir_lower_samplers(struct pipe_screen *screen, struct nir_shader *nir,
+ struct gl_shader_program *shader_program);
+
struct pipe_shader_state *
st_nir_finish_builtin_shader(struct st_context *st,
struct nir_shader *nir,