intel/fs: Expose a couple of NIR lowering helpers
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5596>
This commit is contained in:
parent
bfc1fd22cd
commit
2687ec5ee6
|
@ -8402,8 +8402,8 @@ computed_depth_mode(const nir_shader *shader)
|
||||||
*
|
*
|
||||||
* This should be replaced by global value numbering someday.
|
* This should be replaced by global value numbering someday.
|
||||||
*/
|
*/
|
||||||
static bool
|
bool
|
||||||
move_interpolation_to_top(nir_shader *nir)
|
brw_nir_move_interpolation_to_top(nir_shader *nir)
|
||||||
{
|
{
|
||||||
bool progress = false;
|
bool progress = false;
|
||||||
|
|
||||||
|
@ -8468,8 +8468,8 @@ move_interpolation_to_top(nir_shader *nir)
|
||||||
*
|
*
|
||||||
* Useful when rendering to a non-multisampled buffer.
|
* Useful when rendering to a non-multisampled buffer.
|
||||||
*/
|
*/
|
||||||
static bool
|
bool
|
||||||
demote_sample_qualifiers(nir_shader *nir)
|
brw_nir_demote_sample_qualifiers(nir_shader *nir)
|
||||||
{
|
{
|
||||||
bool progress = true;
|
bool progress = true;
|
||||||
|
|
||||||
|
@ -8556,8 +8556,8 @@ brw_compile_fs(const struct brw_compiler *compiler, void *log_data,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!key->multisample_fbo)
|
if (!key->multisample_fbo)
|
||||||
NIR_PASS_V(shader, demote_sample_qualifiers);
|
NIR_PASS_V(shader, brw_nir_demote_sample_qualifiers);
|
||||||
NIR_PASS_V(shader, move_interpolation_to_top);
|
NIR_PASS_V(shader, brw_nir_move_interpolation_to_top);
|
||||||
brw_postprocess_nir(shader, compiler, true);
|
brw_postprocess_nir(shader, compiler, true);
|
||||||
|
|
||||||
/* key->alpha_test_func means simulating alpha testing via discards,
|
/* key->alpha_test_func means simulating alpha testing via discards,
|
||||||
|
|
|
@ -192,6 +192,9 @@ nir_shader *brw_nir_create_passthrough_tcs(void *mem_ctx,
|
||||||
#define BRW_NIR_FRAG_OUTPUT_LOCATION_SHIFT 1
|
#define BRW_NIR_FRAG_OUTPUT_LOCATION_SHIFT 1
|
||||||
#define BRW_NIR_FRAG_OUTPUT_LOCATION_MASK INTEL_MASK(31, 1)
|
#define BRW_NIR_FRAG_OUTPUT_LOCATION_MASK INTEL_MASK(31, 1)
|
||||||
|
|
||||||
|
bool brw_nir_move_interpolation_to_top(nir_shader *nir);
|
||||||
|
bool brw_nir_demote_sample_qualifiers(nir_shader *nir);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue