And set system values read directly in shader_info.
st/mesa changes where:
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
prog->info.fs.uses_sample_qualifier |= var->data.sample;
}
} else if (var->data.mode == ir_var_system_value) {
- prog->SystemValuesRead |= bitfield;
+ prog->info.system_values_read |= bitfield;
} else {
assert(var->data.mode == ir_var_shader_out);
if (is_patch_generic) {
prog->info.outputs_read = 0;
prog->info.patch_inputs_read = 0;
prog->info.patch_outputs_written = 0;
- prog->SystemValuesRead = 0;
+ prog->info.system_values_read = 0;
if (shader_stage == MESA_SHADER_FRAGMENT) {
prog->info.fs.uses_sample_qualifier = false;
prog->info.fs.uses_discard = false;
{
shader_info *info = &sh->Program->info;
- info->system_values_read = sh->Program->SystemValuesRead;
info->uses_texture_gather = sh->Program->UsesGather;
}
struct shader_info info;
GLbitfield64 SecondaryOutputsWritten; /**< Subset of OutputsWritten outputs written with non-zero index. */
- GLbitfield SystemValuesRead; /**< Bitmask of SYSTEM_VALUE_x inputs used */
GLbitfield TexturesUsed[MAX_COMBINED_TEXTURE_IMAGE_UNITS]; /**< TEXTURE_x_BIT bitmask */
GLbitfield SamplersUsed; /**< Bitfield of which samplers are used */
GLbitfield ShadowSamplers; /**< Texture units used for shadow sampling. */
s->info->num_abos = 0;
s->info->num_ssbos = 0;
s->info->num_images = 0;
- s->info->system_values_read = prog->SystemValuesRead;
s->info->uses_texture_gather = false;
s->info->uses_clip_distance_out = false;
s->info->separate_shader = false;
if (prog->info.fs.uses_sample_qualifier && !ignore_sample_qualifier)
return MAX2(_mesa_geometric_samples(ctx->DrawBuffer), 1);
- if (prog->SystemValuesRead & (SYSTEM_BIT_SAMPLE_ID |
- SYSTEM_BIT_SAMPLE_POS))
+ if (prog->info.system_values_read & (SYSTEM_BIT_SAMPLE_ID |
+ SYSTEM_BIT_SAMPLE_POS))
return MAX2(_mesa_geometric_samples(ctx->DrawBuffer), 1);
else if (ctx->Multisample.SampleShading)
return MAX2(ceil(ctx->Multisample.MinSampleShadingValue *
return;
prog->info.inputs_read &= ~BITFIELD64_BIT(VARYING_SLOT_POS);
- prog->SystemValuesRead |= 1 << SYSTEM_VALUE_FRAG_COORD;
+ prog->info.system_values_read |= 1 << SYSTEM_VALUE_FRAG_COORD;
for (i = 0; i < prog->NumInstructions; i++) {
struct prog_instruction *inst = prog->Instructions + i;
/* Declare misc input registers
*/
{
- GLbitfield sysInputs = proginfo->SystemValuesRead;
+ GLbitfield sysInputs = proginfo->info.system_values_read;
for (i = 0; sysInputs; i++) {
if (sysInputs & (1 << i)) {
/* This must be done before the uniform storage is associated. */
if (shader->Stage == MESA_SHADER_FRAGMENT &&
(prog->info.inputs_read & VARYING_BIT_POS ||
- prog->SystemValuesRead & (1 << SYSTEM_VALUE_FRAG_COORD))) {
+ prog->info.system_values_read & (1 << SYSTEM_VALUE_FRAG_COORD))) {
static const gl_state_index wposTransformState[STATE_LENGTH] = {
STATE_INTERNAL, STATE_FB_WPOS_Y_TRANSFORM
};
/* Declare misc input registers
*/
{
- GLbitfield sysInputs = program->SystemValuesRead;
+ GLbitfield sysInputs = program->info.system_values_read;
for (i = 0; sysInputs; i++) {
if (sysInputs & (1 << i)) {