mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 11:18:08 +02:00
nir/lower_blend: return progress
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976>
This commit is contained in:
parent
29bd0a8ffa
commit
caffc3abca
2 changed files with 11 additions and 10 deletions
|
|
@ -635,19 +635,20 @@ consume_dual_stores(nir_builder *b, nir_intrinsic_instr *store, void *data)
|
||||||
* This pass requires that shader I/O is lowered to explicit load/store
|
* This pass requires that shader I/O is lowered to explicit load/store
|
||||||
* instructions using nir_lower_io.
|
* instructions using nir_lower_io.
|
||||||
*/
|
*/
|
||||||
void
|
bool
|
||||||
nir_lower_blend(nir_shader *shader, const nir_lower_blend_options *options)
|
nir_lower_blend(nir_shader *shader, const nir_lower_blend_options *options)
|
||||||
{
|
{
|
||||||
assert(shader->info.stage == MESA_SHADER_FRAGMENT);
|
assert(shader->info.stage == MESA_SHADER_FRAGMENT);
|
||||||
|
|
||||||
struct ctx ctx = { .options = options };
|
struct ctx ctx = { .options = options };
|
||||||
nir_shader_intrinsics_pass(shader, consume_dual_stores,
|
bool progress = nir_shader_intrinsics_pass(shader, consume_dual_stores,
|
||||||
nir_metadata_block_index |
|
nir_metadata_block_index |
|
||||||
nir_metadata_dominance,
|
nir_metadata_dominance,
|
||||||
ctx.src1);
|
ctx.src1);
|
||||||
|
|
||||||
nir_shader_intrinsics_pass(shader, nir_lower_blend_instr,
|
progress |= nir_shader_intrinsics_pass(shader, nir_lower_blend_instr,
|
||||||
nir_metadata_block_index |
|
nir_metadata_block_index |
|
||||||
nir_metadata_dominance,
|
nir_metadata_dominance,
|
||||||
&ctx);
|
&ctx);
|
||||||
|
return progress;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ typedef struct {
|
||||||
bool scalar_blend_const;
|
bool scalar_blend_const;
|
||||||
} nir_lower_blend_options;
|
} nir_lower_blend_options;
|
||||||
|
|
||||||
void nir_lower_blend(nir_shader *shader,
|
bool nir_lower_blend(nir_shader *shader,
|
||||||
const nir_lower_blend_options *options);
|
const nir_lower_blend_options *options);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue