compiler: Use util/bitset.h for system_values_read

It is currently a bitset on top of a uint64_t but there are already
more than 64 values.  Change to use BITSET to cover all the
SYSTEM_VALUE_MAX bits.

Cc: mesa-stable
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Acked-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8585>
This commit is contained in:
Caio Marcelo de Oliveira Filho
2021-01-19 17:14:28 -08:00
committed by Marge Bot
parent ecd0ae09f9
commit 9f3d5e99ea
27 changed files with 175 additions and 199 deletions

View File

@@ -124,7 +124,7 @@ mark(struct gl_program *prog, ir_variable *var, int offset, int len,
prog->info.fs.uses_sample_qualifier |= var->data.sample;
}
} else if (var->data.mode == ir_var_system_value) {
prog->info.system_values_read |= bitfield;
BITSET_SET(prog->info.system_values_read, idx);
} else {
assert(var->data.mode == ir_var_shader_out);
if (is_patch_generic) {
@@ -432,7 +432,7 @@ do_set_program_inouts(exec_list *instructions, struct gl_program *prog,
prog->info.outputs_read = 0;
prog->info.patch_inputs_read = 0;
prog->info.patch_outputs_written = 0;
prog->info.system_values_read = 0;
BITSET_ZERO(prog->info.system_values_read);
if (shader_stage == MESA_SHADER_FRAGMENT) {
prog->info.fs.uses_sample_qualifier = false;
prog->info.fs.uses_discard = false;