nir: add a lower_mediump_io callback into options
This will be called by the GLSL linker before nir_opt_varyings. Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26918>
This commit is contained in:
@@ -4063,6 +4063,11 @@ typedef struct nir_shader_compiler_options {
|
|||||||
|
|
||||||
/** Options determining lowering and behavior of inputs and outputs. */
|
/** Options determining lowering and behavior of inputs and outputs. */
|
||||||
nir_io_options io_options;
|
nir_io_options io_options;
|
||||||
|
|
||||||
|
/** Driver callback where drivers can define how to lower mediump.
|
||||||
|
* Used by nir_lower_io_passes.
|
||||||
|
*/
|
||||||
|
void (*lower_mediump_io)(struct nir_shader *nir);
|
||||||
} nir_shader_compiler_options;
|
} nir_shader_compiler_options;
|
||||||
|
|
||||||
typedef struct nir_shader {
|
typedef struct nir_shader {
|
||||||
|
@@ -3259,5 +3259,8 @@ nir_lower_io_passes(nir_shader *nir, bool renumber_vs_inputs)
|
|||||||
if (nir->xfb_info)
|
if (nir->xfb_info)
|
||||||
NIR_PASS_V(nir, nir_io_add_intrinsic_xfb_info);
|
NIR_PASS_V(nir, nir_io_add_intrinsic_xfb_info);
|
||||||
|
|
||||||
|
if (nir->options->lower_mediump_io)
|
||||||
|
nir->options->lower_mediump_io(nir);
|
||||||
|
|
||||||
nir->info.io_lowered = true;
|
nir->info.io_lowered = true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user