[Mesa-dev] [PATCH v2] r600g/sb: Don't require array declarations for TGSI_FILE_SYSTEM_VALUE
Gert Wollny
gw.fossdev at gmail.com
Tue Oct 3 07:37:45 UTC 2017
Ping + added Dave to the CC,
many thanks for comments or applying the patch,
Gert
Am Donnerstag, den 14.09.2017, 16:00 +0200 schrieb Gert Wollny:
> Although gl_SampleMaskIn is declared as an array in GLSL, it is
> effectively a 32 bit mask on all hardware supported by mesa, so the
> array indexing is ignored (Thanks Glenn Kennard for the explanation).
>
> Add a comment that the assert is not made superfluos by the else
> branch.
>
> Corrects: piglit spec at arb_gpu_shader5@execution at samplemaskin-indirect
> for
> debug builds (it already passed in release).
> ---
> - v1 was "r600/sb: remove superfluos assert", but this name doesn't
> make
> sense anymore
> - Submitter has no mesa git write access.
>
> src/gallium/drivers/r600/sb/sb_bc_parser.cpp | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/r600/sb/sb_bc_parser.cpp
> b/src/gallium/drivers/r600/sb/sb_bc_parser.cpp
> index ae92a767b4..c7b9032049 100644
> --- a/src/gallium/drivers/r600/sb/sb_bc_parser.cpp
> +++ b/src/gallium/drivers/r600/sb/sb_bc_parser.cpp
> @@ -125,7 +125,9 @@ int bc_parser::parse_decls() {
> return 0;
> }
>
> - if (pshader->indirect_files & ~((1 << TGSI_FILE_CONSTANT) |
> (1 << TGSI_FILE_SAMPLER))) {
> + if (pshader->indirect_files &
> + ~((1 << TGSI_FILE_CONSTANT) | (1 << TGSI_FILE_SAMPLER) |
> + (1 << TGSI_FILE_SYSTEM_VALUE))) {
>
> assert(pshader->num_arrays);
>
> @@ -135,6 +137,10 @@ int bc_parser::parse_decls() {
> sh->add_gpr_array(a.gpr_start,
> a.gpr_count, a.comp_mask);
> }
> } else {
> + /* When the above assert is disabled and
> proper array info
> + * is missing for some reason then, as a
> fallback, make sure
> + * that all GPRs can be accessed indirectly.
> + */
> sh->add_gpr_array(0, pshader->bc.ngpr,
> 0x0F);
> }
> }
More information about the mesa-dev
mailing list