mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 02:28:10 +02:00
st/mesa: replace EmitNoIndirectInput / EmitNoIndirectOutput with NIR options
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32423>
This commit is contained in:
parent
7f4e36ff7d
commit
1f69258fb4
3 changed files with 4 additions and 9 deletions
|
|
@ -344,8 +344,6 @@ struct gl_shader_compiler_options
|
|||
* \name Forms of indirect addressing the driver cannot do.
|
||||
*/
|
||||
/*@{*/
|
||||
GLboolean EmitNoIndirectInput; /**< No indirect addressing of inputs */
|
||||
GLboolean EmitNoIndirectOutput; /**< No indirect addressing of outputs */
|
||||
GLboolean EmitNoIndirectTemp; /**< No indirect addressing of temps */
|
||||
GLboolean EmitNoIndirectUniform; /**< No indirect addressing of constants */
|
||||
/*@}*/
|
||||
|
|
|
|||
|
|
@ -351,10 +351,6 @@ void st_init_limits(struct pipe_screen *screen,
|
|||
!screen->get_shader_param(screen, sh,
|
||||
PIPE_SHADER_CAP_CONT_SUPPORTED);
|
||||
|
||||
options->EmitNoIndirectInput =
|
||||
!(options->NirOptions->support_indirect_inputs & BITFIELD_BIT(sh));
|
||||
options->EmitNoIndirectOutput =
|
||||
!(options->NirOptions->support_indirect_outputs & BITFIELD_BIT(sh));
|
||||
options->EmitNoIndirectTemp =
|
||||
!screen->get_shader_param(screen, sh,
|
||||
PIPE_SHADER_CAP_INDIRECT_TEMP_ADDR);
|
||||
|
|
|
|||
|
|
@ -599,14 +599,15 @@ st_link_glsl_to_nir(struct gl_context *ctx,
|
|||
/* If there are forms of indirect addressing that the driver
|
||||
* cannot handle, perform the lowering pass.
|
||||
*/
|
||||
if (options->EmitNoIndirectInput || options->EmitNoIndirectOutput ||
|
||||
if (!(nir->options->support_indirect_inputs & BITFIELD_BIT(stage)) ||
|
||||
!(nir->options->support_indirect_outputs & BITFIELD_BIT(stage)) ||
|
||||
options->EmitNoIndirectTemp || options->EmitNoIndirectUniform) {
|
||||
nir_variable_mode mode = (nir_variable_mode)0;
|
||||
|
||||
if (!nir->info.io_lowered) {
|
||||
mode |= options->EmitNoIndirectInput ?
|
||||
mode |= !(nir->options->support_indirect_inputs & BITFIELD_BIT(stage)) ?
|
||||
nir_var_shader_in : (nir_variable_mode)0;
|
||||
mode |= options->EmitNoIndirectOutput ?
|
||||
mode |= !(nir->options->support_indirect_outputs & BITFIELD_BIT(stage)) ?
|
||||
nir_var_shader_out : (nir_variable_mode)0;
|
||||
}
|
||||
mode |= options->EmitNoIndirectTemp ?
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue