pan/mdg: Return a bool from midgard_nir_lod_errata

To match other NIR passes.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6718>
This commit is contained in:
Icecream95
2020-09-15 11:57:50 +12:00
committed by Marge Bot
parent 7acf364131
commit 6064b8ee14
2 changed files with 4 additions and 3 deletions

View File

@@ -665,7 +665,7 @@ bool
nir_undef_to_zero(nir_shader *shader); nir_undef_to_zero(nir_shader *shader);
bool nir_fuse_io_16(nir_shader *shader); bool nir_fuse_io_16(nir_shader *shader);
void midgard_nir_lod_errata(nir_shader *shader); bool midgard_nir_lod_errata(nir_shader *shader);
unsigned midgard_get_first_tag_from_block(compiler_context *ctx, unsigned block_idx); unsigned midgard_get_first_tag_from_block(compiler_context *ctx, unsigned block_idx);

View File

@@ -24,7 +24,7 @@
#include "compiler/nir/nir.h" #include "compiler/nir/nir.h"
#include "compiler/nir/nir_builder.h" #include "compiler/nir/nir_builder.h"
void midgard_nir_lod_errata(nir_shader *shader); bool midgard_nir_lod_errata(nir_shader *shader);
/* Workarounds errata pertaining to early Midgard chips where the settings for /* Workarounds errata pertaining to early Midgard chips where the settings for
* min_lod/max_lod/lod_bias are ignored in the sampler descriptor when * min_lod/max_lod/lod_bias are ignored in the sampler descriptor when
@@ -73,7 +73,7 @@ mir_lod_errata_body(nir_builder *b, nir_tex_instr *tex)
} }
} }
void bool
midgard_nir_lod_errata(nir_shader *shader) midgard_nir_lod_errata(nir_shader *shader)
{ {
nir_foreach_function(function, shader) { nir_foreach_function(function, shader) {
@@ -95,4 +95,5 @@ midgard_nir_lod_errata(nir_shader *shader)
nir_metadata_preserve(function->impl, nir_metadata_block_index | nir_metadata_dominance); nir_metadata_preserve(function->impl, nir_metadata_block_index | nir_metadata_dominance);
} }
return true;
} }