mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
gallium/nir/tgsi: add various support for task/mesh bits
these translators are used by llvmpipe so need to be updated Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23291>
This commit is contained in:
parent
8fd1aad8f8
commit
c58518226b
2 changed files with 13 additions and 3 deletions
|
|
@ -328,6 +328,8 @@ static void scan_instruction(const struct nir_shader *nir,
|
|||
case INTERP_MODE_NONE:
|
||||
if (glsl_base_type_is_integer(base_type))
|
||||
break;
|
||||
if (var->data.per_primitive)
|
||||
break;
|
||||
|
||||
FALLTHROUGH;
|
||||
case INTERP_MODE_SMOOTH:
|
||||
|
|
@ -461,7 +463,8 @@ void nir_tgsi_scan_shader(const struct nir_shader *nir,
|
|||
}
|
||||
}
|
||||
|
||||
if (gl_shader_stage_is_compute(nir->info.stage)) {
|
||||
if (gl_shader_stage_is_compute(nir->info.stage) ||
|
||||
gl_shader_stage_is_mesh(nir->info.stage)) {
|
||||
info->properties[TGSI_PROPERTY_CS_FIXED_BLOCK_WIDTH] = nir->info.workgroup_size[0];
|
||||
info->properties[TGSI_PROPERTY_CS_FIXED_BLOCK_HEIGHT] = nir->info.workgroup_size[1];
|
||||
info->properties[TGSI_PROPERTY_CS_FIXED_BLOCK_DEPTH] = nir->info.workgroup_size[2];
|
||||
|
|
@ -517,7 +520,7 @@ void nir_tgsi_scan_shader(const struct nir_shader *nir,
|
|||
|
||||
switch (variable->data.interpolation) {
|
||||
case INTERP_MODE_NONE:
|
||||
if (glsl_base_type_is_integer(base_type)) {
|
||||
if (glsl_base_type_is_integer(base_type) || variable->data.per_primitive) {
|
||||
info->input_interpolate[i] = TGSI_INTERPOLATE_CONSTANT;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,6 +50,9 @@ tgsi_get_generic_gl_varying_index(gl_varying_slot attr,
|
|||
return attr - VARYING_SLOT_TEX0;
|
||||
}
|
||||
|
||||
if (attr == VARYING_SLOT_CULL_PRIMITIVE)
|
||||
return 0;
|
||||
|
||||
assert(0);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -145,7 +148,11 @@ tgsi_get_gl_varying_semantic(gl_varying_slot attr,
|
|||
*semantic_name = TGSI_SEMANTIC_VIEWPORT_MASK;
|
||||
*semantic_index = 0;
|
||||
break;
|
||||
|
||||
case VARYING_SLOT_CULL_PRIMITIVE:
|
||||
/* mesh only, just pick something random */
|
||||
*semantic_name = TGSI_SEMANTIC_PATCH;
|
||||
*semantic_index = 0;
|
||||
break;
|
||||
case VARYING_SLOT_TEX0:
|
||||
case VARYING_SLOT_TEX1:
|
||||
case VARYING_SLOT_TEX2:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue