radeonsi: stop using TGSI_PROPERTY_TES_SPACING

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6624>
This commit is contained in:
Marek Olšák 2020-09-01 18:04:57 -04:00 committed by Marge Bot
parent 34b8e60cb8
commit eeea2f52c7
2 changed files with 5 additions and 10 deletions

View File

@ -457,11 +457,6 @@ void si_nir_scan_shader(const struct nir_shader *nir, struct si_shader_info *inf
info->stage = nir->info.stage;
if (nir->info.stage == MESA_SHADER_TESS_EVAL) {
STATIC_ASSERT((TESS_SPACING_EQUAL + 1) % 3 == PIPE_TESS_SPACING_EQUAL);
STATIC_ASSERT((TESS_SPACING_FRACTIONAL_ODD + 1) % 3 == PIPE_TESS_SPACING_FRACTIONAL_ODD);
STATIC_ASSERT((TESS_SPACING_FRACTIONAL_EVEN + 1) % 3 == PIPE_TESS_SPACING_FRACTIONAL_EVEN);
info->properties[TGSI_PROPERTY_TES_SPACING] = (nir->info.tess.spacing + 1) % 3;
info->properties[TGSI_PROPERTY_TES_VERTEX_ORDER_CW] = !nir->info.tess.ccw;
if (info->base.tess.primitive_mode == GL_ISOLINES)

View File

@ -313,7 +313,7 @@ static void si_set_tesseval_regs(struct si_screen *sscreen, const struct si_shad
{
const struct si_shader_info *info = &tes->info;
unsigned tes_prim_mode = info->base.tess.primitive_mode;
unsigned tes_spacing = info->properties[TGSI_PROPERTY_TES_SPACING];
unsigned tes_spacing = info->base.tess.spacing;
bool tes_vertex_order_cw = info->properties[TGSI_PROPERTY_TES_VERTEX_ORDER_CW];
bool tes_point_mode = info->base.tess.point_mode;
unsigned type, partitioning, topology, distribution_mode;
@ -334,13 +334,13 @@ static void si_set_tesseval_regs(struct si_screen *sscreen, const struct si_shad
}
switch (tes_spacing) {
case PIPE_TESS_SPACING_FRACTIONAL_ODD:
case TESS_SPACING_FRACTIONAL_ODD:
partitioning = V_028B6C_PART_FRAC_ODD;
break;
case PIPE_TESS_SPACING_FRACTIONAL_EVEN:
case TESS_SPACING_FRACTIONAL_EVEN:
partitioning = V_028B6C_PART_FRAC_EVEN;
break;
case PIPE_TESS_SPACING_EQUAL:
case TESS_SPACING_EQUAL:
partitioning = V_028B6C_PART_INTEGER;
break;
default:
@ -400,7 +400,7 @@ static void polaris_set_vgt_vertex_reuse(struct si_screen *sscreen, struct si_sh
unsigned vtx_reuse_depth = 30;
if (sel->info.stage == MESA_SHADER_TESS_EVAL &&
sel->info.properties[TGSI_PROPERTY_TES_SPACING] == PIPE_TESS_SPACING_FRACTIONAL_ODD)
sel->info.base.tess.spacing == TESS_SPACING_FRACTIONAL_ODD)
vtx_reuse_depth = 14;
assert(pm4->shader);