mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 20:20:09 +01:00
tgsi: remove unused tgsi_shader_info fields
uses_thread_id uses_block_id uses_block_size Reviewed-by: Charmaine Lee <charmainel@vmware.com> Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24100>
This commit is contained in:
parent
402f5c5407
commit
68d0c847bb
3 changed files with 1 additions and 39 deletions
|
|
@ -213,24 +213,6 @@ static void scan_instruction(const struct nir_shader *nir,
|
|||
case nir_intrinsic_load_num_workgroups:
|
||||
info->uses_grid_size = true;
|
||||
break;
|
||||
case nir_intrinsic_load_workgroup_size:
|
||||
/* The block size is translated to IMM with a fixed block size. */
|
||||
if (info->properties[TGSI_PROPERTY_CS_FIXED_BLOCK_WIDTH] == 0)
|
||||
info->uses_block_size = true;
|
||||
break;
|
||||
case nir_intrinsic_load_local_invocation_id:
|
||||
case nir_intrinsic_load_workgroup_id: {
|
||||
unsigned mask = nir_ssa_def_components_read(&intr->dest.ssa);
|
||||
while (mask) {
|
||||
unsigned i = u_bit_scan(&mask);
|
||||
|
||||
if (intr->intrinsic == nir_intrinsic_load_workgroup_id)
|
||||
info->uses_block_id[i] = true;
|
||||
else
|
||||
info->uses_thread_id[i] = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case nir_intrinsic_load_vertex_id:
|
||||
info->uses_vertexid = 1;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -115,28 +115,11 @@ scan_src_operand(struct tgsi_shader_info *info,
|
|||
|
||||
if (info->processor == PIPE_SHADER_COMPUTE &&
|
||||
src->Register.File == TGSI_FILE_SYSTEM_VALUE) {
|
||||
unsigned name, mask;
|
||||
unsigned name;
|
||||
|
||||
name = info->system_value_semantic_name[src->Register.Index];
|
||||
|
||||
switch (name) {
|
||||
case TGSI_SEMANTIC_THREAD_ID:
|
||||
case TGSI_SEMANTIC_BLOCK_ID:
|
||||
mask = usage_mask_after_swizzle & TGSI_WRITEMASK_XYZ;
|
||||
while (mask) {
|
||||
unsigned i = u_bit_scan(&mask);
|
||||
|
||||
if (name == TGSI_SEMANTIC_THREAD_ID)
|
||||
info->uses_thread_id[i] = true;
|
||||
else
|
||||
info->uses_block_id[i] = true;
|
||||
}
|
||||
break;
|
||||
case TGSI_SEMANTIC_BLOCK_SIZE:
|
||||
/* The block size is translated to IMM with a fixed block size. */
|
||||
if (info->properties[TGSI_PROPERTY_CS_FIXED_BLOCK_WIDTH] == 0)
|
||||
info->uses_block_size = true;
|
||||
break;
|
||||
case TGSI_SEMANTIC_GRID_SIZE:
|
||||
info->uses_grid_size = true;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -97,9 +97,6 @@ struct tgsi_shader_info
|
|||
bool uses_primid;
|
||||
bool uses_frontface;
|
||||
bool uses_invocationid;
|
||||
bool uses_thread_id[3];
|
||||
bool uses_block_id[3];
|
||||
bool uses_block_size;
|
||||
bool uses_grid_size;
|
||||
bool uses_subgroup_info;
|
||||
bool writes_position;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue