gallium/tgsi: rip out cylindrical wrap support
We never enable this feature, so let's rip it out completely. Acked-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12505>
This commit is contained in:

committed by
Marge Bot

parent
526f7d7790
commit
7b0bda2e55
@@ -3561,11 +3561,6 @@ interpolation should be done at, one of ``TGSI_INTERPOLATE_LOC_*``. Note that
|
|||||||
when per-sample shading is enabled, the implementation may choose to
|
when per-sample shading is enabled, the implementation may choose to
|
||||||
interpolate at the sample irrespective of the Location field.
|
interpolate at the sample irrespective of the Location field.
|
||||||
|
|
||||||
The CylindricalWrap bitfield specifies which register components
|
|
||||||
should be subject to cylindrical wrapping when interpolating by the
|
|
||||||
rasteriser. If TGSI_CYLINDRICAL_WRAP_X is set to 1, the X component
|
|
||||||
should be interpolated according to cylindrical wrapping rules.
|
|
||||||
|
|
||||||
|
|
||||||
Declaration Sampler View
|
Declaration Sampler View
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
@@ -218,7 +218,6 @@ tgsi_default_declaration_interp( void )
|
|||||||
|
|
||||||
di.Interpolate = TGSI_INTERPOLATE_CONSTANT;
|
di.Interpolate = TGSI_INTERPOLATE_CONSTANT;
|
||||||
di.Location = TGSI_INTERPOLATE_LOC_CENTER;
|
di.Location = TGSI_INTERPOLATE_LOC_CENTER;
|
||||||
di.CylindricalWrap = 0;
|
|
||||||
di.Padding = 0;
|
di.Padding = 0;
|
||||||
|
|
||||||
return di;
|
return di;
|
||||||
@@ -227,7 +226,6 @@ tgsi_default_declaration_interp( void )
|
|||||||
static struct tgsi_declaration_interp
|
static struct tgsi_declaration_interp
|
||||||
tgsi_build_declaration_interp(unsigned interpolate,
|
tgsi_build_declaration_interp(unsigned interpolate,
|
||||||
unsigned interpolate_location,
|
unsigned interpolate_location,
|
||||||
unsigned cylindrical_wrap,
|
|
||||||
struct tgsi_declaration *declaration,
|
struct tgsi_declaration *declaration,
|
||||||
struct tgsi_header *header)
|
struct tgsi_header *header)
|
||||||
{
|
{
|
||||||
@@ -235,7 +233,6 @@ tgsi_build_declaration_interp(unsigned interpolate,
|
|||||||
|
|
||||||
di.Interpolate = interpolate;
|
di.Interpolate = interpolate;
|
||||||
di.Location = interpolate_location;
|
di.Location = interpolate_location;
|
||||||
di.CylindricalWrap = cylindrical_wrap;
|
|
||||||
di.Padding = 0;
|
di.Padding = 0;
|
||||||
|
|
||||||
declaration_grow(declaration, header);
|
declaration_grow(declaration, header);
|
||||||
@@ -467,7 +464,6 @@ tgsi_build_full_declaration(
|
|||||||
|
|
||||||
*di = tgsi_build_declaration_interp(full_decl->Interp.Interpolate,
|
*di = tgsi_build_declaration_interp(full_decl->Interp.Interpolate,
|
||||||
full_decl->Interp.Location,
|
full_decl->Interp.Location,
|
||||||
full_decl->Interp.CylindricalWrap,
|
|
||||||
declaration,
|
declaration,
|
||||||
header);
|
header);
|
||||||
}
|
}
|
||||||
|
@@ -436,22 +436,6 @@ iter_declaration(
|
|||||||
TXT( ", " );
|
TXT( ", " );
|
||||||
ENM( decl->Interp.Location, tgsi_interpolate_locations );
|
ENM( decl->Interp.Location, tgsi_interpolate_locations );
|
||||||
}
|
}
|
||||||
|
|
||||||
if (decl->Interp.CylindricalWrap) {
|
|
||||||
TXT(", CYLWRAP_");
|
|
||||||
if (decl->Interp.CylindricalWrap & TGSI_CYLINDRICAL_WRAP_X) {
|
|
||||||
CHR('X');
|
|
||||||
}
|
|
||||||
if (decl->Interp.CylindricalWrap & TGSI_CYLINDRICAL_WRAP_Y) {
|
|
||||||
CHR('Y');
|
|
||||||
}
|
|
||||||
if (decl->Interp.CylindricalWrap & TGSI_CYLINDRICAL_WRAP_Z) {
|
|
||||||
CHR('Z');
|
|
||||||
}
|
|
||||||
if (decl->Interp.CylindricalWrap & TGSI_CYLINDRICAL_WRAP_W) {
|
|
||||||
CHR('W');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (decl->Declaration.Invariant) {
|
if (decl->Declaration.Invariant) {
|
||||||
|
@@ -1188,7 +1188,6 @@ emit_twoside(struct tgsi_transform_context *tctx)
|
|||||||
decl.Declaration.Interpolate = true;
|
decl.Declaration.Interpolate = true;
|
||||||
decl.Interp.Interpolate = info->input_interpolate[in_idx];
|
decl.Interp.Interpolate = info->input_interpolate[in_idx];
|
||||||
decl.Interp.Location = info->input_interpolate_loc[in_idx];
|
decl.Interp.Location = info->input_interpolate_loc[in_idx];
|
||||||
decl.Interp.CylindricalWrap = info->input_cylindrical_wrap[in_idx];
|
|
||||||
tctx->emit_declaration(tctx, &decl);
|
tctx->emit_declaration(tctx, &decl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -668,7 +668,6 @@ scan_declaration(struct tgsi_shader_info *info,
|
|||||||
info->input_semantic_index[reg] = (ubyte) semIndex;
|
info->input_semantic_index[reg] = (ubyte) semIndex;
|
||||||
info->input_interpolate[reg] = (ubyte)fulldecl->Interp.Interpolate;
|
info->input_interpolate[reg] = (ubyte)fulldecl->Interp.Interpolate;
|
||||||
info->input_interpolate_loc[reg] = (ubyte)fulldecl->Interp.Location;
|
info->input_interpolate_loc[reg] = (ubyte)fulldecl->Interp.Location;
|
||||||
info->input_cylindrical_wrap[reg] = (ubyte)fulldecl->Interp.CylindricalWrap;
|
|
||||||
|
|
||||||
/* Vertex shaders can have inputs with holes between them. */
|
/* Vertex shaders can have inputs with holes between them. */
|
||||||
info->num_inputs = MAX2(info->num_inputs, reg + 1);
|
info->num_inputs = MAX2(info->num_inputs, reg + 1);
|
||||||
|
@@ -51,7 +51,6 @@ struct tgsi_shader_info
|
|||||||
ubyte input_interpolate[PIPE_MAX_SHADER_INPUTS];
|
ubyte input_interpolate[PIPE_MAX_SHADER_INPUTS];
|
||||||
ubyte input_interpolate_loc[PIPE_MAX_SHADER_INPUTS];
|
ubyte input_interpolate_loc[PIPE_MAX_SHADER_INPUTS];
|
||||||
ubyte input_usage_mask[PIPE_MAX_SHADER_INPUTS];
|
ubyte input_usage_mask[PIPE_MAX_SHADER_INPUTS];
|
||||||
ubyte input_cylindrical_wrap[PIPE_MAX_SHADER_INPUTS];
|
|
||||||
ubyte output_semantic_name[PIPE_MAX_SHADER_OUTPUTS]; /**< TGSI_SEMANTIC_x */
|
ubyte output_semantic_name[PIPE_MAX_SHADER_OUTPUTS]; /**< TGSI_SEMANTIC_x */
|
||||||
ubyte output_semantic_index[PIPE_MAX_SHADER_OUTPUTS];
|
ubyte output_semantic_index[PIPE_MAX_SHADER_OUTPUTS];
|
||||||
ubyte output_usagemask[PIPE_MAX_SHADER_OUTPUTS];
|
ubyte output_usagemask[PIPE_MAX_SHADER_OUTPUTS];
|
||||||
|
@@ -118,7 +118,6 @@ struct ureg_program
|
|||||||
enum tgsi_semantic semantic_name;
|
enum tgsi_semantic semantic_name;
|
||||||
unsigned semantic_index;
|
unsigned semantic_index;
|
||||||
enum tgsi_interpolate_mode interp;
|
enum tgsi_interpolate_mode interp;
|
||||||
unsigned char cylindrical_wrap;
|
|
||||||
unsigned char usage_mask;
|
unsigned char usage_mask;
|
||||||
enum tgsi_interpolate_loc interp_location;
|
enum tgsi_interpolate_loc interp_location;
|
||||||
unsigned first;
|
unsigned first;
|
||||||
@@ -303,7 +302,6 @@ ureg_DECL_fs_input_centroid_layout(struct ureg_program *ureg,
|
|||||||
if (ureg->input[i].semantic_name == semantic_name &&
|
if (ureg->input[i].semantic_name == semantic_name &&
|
||||||
ureg->input[i].semantic_index == semantic_index) {
|
ureg->input[i].semantic_index == semantic_index) {
|
||||||
assert(ureg->input[i].interp == interp_mode);
|
assert(ureg->input[i].interp == interp_mode);
|
||||||
assert(ureg->input[i].cylindrical_wrap == 0);
|
|
||||||
assert(ureg->input[i].interp_location == interp_location);
|
assert(ureg->input[i].interp_location == interp_location);
|
||||||
if (ureg->input[i].array_id == array_id) {
|
if (ureg->input[i].array_id == array_id) {
|
||||||
ureg->input[i].usage_mask |= usage_mask;
|
ureg->input[i].usage_mask |= usage_mask;
|
||||||
@@ -318,7 +316,6 @@ ureg_DECL_fs_input_centroid_layout(struct ureg_program *ureg,
|
|||||||
ureg->input[i].semantic_name = semantic_name;
|
ureg->input[i].semantic_name = semantic_name;
|
||||||
ureg->input[i].semantic_index = semantic_index;
|
ureg->input[i].semantic_index = semantic_index;
|
||||||
ureg->input[i].interp = interp_mode;
|
ureg->input[i].interp = interp_mode;
|
||||||
ureg->input[i].cylindrical_wrap = 0;
|
|
||||||
ureg->input[i].interp_location = interp_location;
|
ureg->input[i].interp_location = interp_location;
|
||||||
ureg->input[i].first = index;
|
ureg->input[i].first = index;
|
||||||
ureg->input[i].last = index + array_size - 1;
|
ureg->input[i].last = index + array_size - 1;
|
||||||
@@ -1585,7 +1582,6 @@ emit_decl_fs(struct ureg_program *ureg,
|
|||||||
enum tgsi_semantic semantic_name,
|
enum tgsi_semantic semantic_name,
|
||||||
unsigned semantic_index,
|
unsigned semantic_index,
|
||||||
enum tgsi_interpolate_mode interpolate,
|
enum tgsi_interpolate_mode interpolate,
|
||||||
unsigned cylindrical_wrap,
|
|
||||||
enum tgsi_interpolate_loc interpolate_location,
|
enum tgsi_interpolate_loc interpolate_location,
|
||||||
unsigned array_id,
|
unsigned array_id,
|
||||||
unsigned usage_mask)
|
unsigned usage_mask)
|
||||||
@@ -1608,7 +1604,6 @@ emit_decl_fs(struct ureg_program *ureg,
|
|||||||
|
|
||||||
out[2].value = 0;
|
out[2].value = 0;
|
||||||
out[2].decl_interp.Interpolate = interpolate;
|
out[2].decl_interp.Interpolate = interpolate;
|
||||||
out[2].decl_interp.CylindricalWrap = cylindrical_wrap;
|
|
||||||
out[2].decl_interp.Location = interpolate_location;
|
out[2].decl_interp.Location = interpolate_location;
|
||||||
|
|
||||||
out[3].value = 0;
|
out[3].value = 0;
|
||||||
@@ -1849,7 +1844,6 @@ static void emit_decls( struct ureg_program *ureg )
|
|||||||
ureg->input[i].semantic_name,
|
ureg->input[i].semantic_name,
|
||||||
ureg->input[i].semantic_index,
|
ureg->input[i].semantic_index,
|
||||||
ureg->input[i].interp,
|
ureg->input[i].interp,
|
||||||
ureg->input[i].cylindrical_wrap,
|
|
||||||
ureg->input[i].interp_location,
|
ureg->input[i].interp_location,
|
||||||
ureg->input[i].array_id,
|
ureg->input[i].array_id,
|
||||||
ureg->input[i].usage_mask);
|
ureg->input[i].usage_mask);
|
||||||
@@ -1865,7 +1859,6 @@ static void emit_decls( struct ureg_program *ureg )
|
|||||||
ureg->input[i].semantic_index +
|
ureg->input[i].semantic_index +
|
||||||
(j - ureg->input[i].first),
|
(j - ureg->input[i].first),
|
||||||
ureg->input[i].interp,
|
ureg->input[i].interp,
|
||||||
ureg->input[i].cylindrical_wrap,
|
|
||||||
ureg->input[i].interp_location, 0,
|
ureg->input[i].interp_location, 0,
|
||||||
ureg->input[i].usage_mask);
|
ureg->input[i].usage_mask);
|
||||||
}
|
}
|
||||||
|
@@ -3777,7 +3777,7 @@ llvmpipe_create_fs_state(struct pipe_context *pipe,
|
|||||||
|
|
||||||
for (i = 0; i < shader->info.base.num_inputs; i++) {
|
for (i = 0; i < shader->info.base.num_inputs; i++) {
|
||||||
shader->inputs[i].usage_mask = shader->info.base.input_usage_mask[i];
|
shader->inputs[i].usage_mask = shader->info.base.input_usage_mask[i];
|
||||||
shader->inputs[i].cyl_wrap = shader->info.base.input_cylindrical_wrap[i];
|
shader->inputs[i].cyl_wrap = 0;
|
||||||
shader->inputs[i].location = shader->info.base.input_interpolate_loc[i];
|
shader->inputs[i].location = shader->info.base.input_interpolate_loc[i];
|
||||||
|
|
||||||
switch (shader->info.base.input_interpolate[i]) {
|
switch (shader->info.base.input_interpolate[i]) {
|
||||||
|
@@ -181,7 +181,6 @@ void print_pipe_info(FILE *f, struct tgsi_shader_info *shader)
|
|||||||
PRINT_UINT_ARRAY_MEMBER(input_interpolate, i);
|
PRINT_UINT_ARRAY_MEMBER(input_interpolate, i);
|
||||||
PRINT_UINT_ARRAY_MEMBER(input_interpolate_loc, i);
|
PRINT_UINT_ARRAY_MEMBER(input_interpolate_loc, i);
|
||||||
PRINT_UINT_ARRAY_MEMBER(input_usage_mask, i);
|
PRINT_UINT_ARRAY_MEMBER(input_usage_mask, i);
|
||||||
PRINT_UINT_ARRAY_MEMBER(input_cylindrical_wrap, i);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < shader->num_inputs; ++i) {
|
for (int i = 0; i < shader->num_inputs; ++i) {
|
||||||
|
@@ -623,7 +623,7 @@ setup_tri_coefficients(struct setup_context *setup)
|
|||||||
tri_apply_cylindrical_wrap(setup->vmin[vertSlot][j],
|
tri_apply_cylindrical_wrap(setup->vmin[vertSlot][j],
|
||||||
setup->vmid[vertSlot][j],
|
setup->vmid[vertSlot][j],
|
||||||
setup->vmax[vertSlot][j],
|
setup->vmax[vertSlot][j],
|
||||||
fsInfo->input_cylindrical_wrap[fragSlot] & (1 << j),
|
0,
|
||||||
v);
|
v);
|
||||||
tri_linear_coeff(setup, &setup->coef[fragSlot], j, v);
|
tri_linear_coeff(setup, &setup->coef[fragSlot], j, v);
|
||||||
}
|
}
|
||||||
@@ -633,7 +633,7 @@ setup_tri_coefficients(struct setup_context *setup)
|
|||||||
tri_apply_cylindrical_wrap(setup->vmin[vertSlot][j],
|
tri_apply_cylindrical_wrap(setup->vmin[vertSlot][j],
|
||||||
setup->vmid[vertSlot][j],
|
setup->vmid[vertSlot][j],
|
||||||
setup->vmax[vertSlot][j],
|
setup->vmax[vertSlot][j],
|
||||||
fsInfo->input_cylindrical_wrap[fragSlot] & (1 << j),
|
0,
|
||||||
v);
|
v);
|
||||||
tri_persp_coeff(setup, &setup->coef[fragSlot], j, v);
|
tri_persp_coeff(setup, &setup->coef[fragSlot], j, v);
|
||||||
}
|
}
|
||||||
@@ -1008,7 +1008,7 @@ setup_line_coefficients(struct setup_context *setup,
|
|||||||
for (j = 0; j < TGSI_NUM_CHANNELS; j++) {
|
for (j = 0; j < TGSI_NUM_CHANNELS; j++) {
|
||||||
line_apply_cylindrical_wrap(setup->vmin[vertSlot][j],
|
line_apply_cylindrical_wrap(setup->vmin[vertSlot][j],
|
||||||
setup->vmax[vertSlot][j],
|
setup->vmax[vertSlot][j],
|
||||||
fsInfo->input_cylindrical_wrap[fragSlot] & (1 << j),
|
0,
|
||||||
v);
|
v);
|
||||||
line_linear_coeff(setup, &setup->coef[fragSlot], j, v);
|
line_linear_coeff(setup, &setup->coef[fragSlot], j, v);
|
||||||
}
|
}
|
||||||
@@ -1017,7 +1017,7 @@ setup_line_coefficients(struct setup_context *setup,
|
|||||||
for (j = 0; j < TGSI_NUM_CHANNELS; j++) {
|
for (j = 0; j < TGSI_NUM_CHANNELS; j++) {
|
||||||
line_apply_cylindrical_wrap(setup->vmin[vertSlot][j],
|
line_apply_cylindrical_wrap(setup->vmin[vertSlot][j],
|
||||||
setup->vmax[vertSlot][j],
|
setup->vmax[vertSlot][j],
|
||||||
fsInfo->input_cylindrical_wrap[fragSlot] & (1 << j),
|
0,
|
||||||
v);
|
v);
|
||||||
line_persp_coeff(setup, &setup->coef[fragSlot], j, v);
|
line_persp_coeff(setup, &setup->coef[fragSlot], j, v);
|
||||||
}
|
}
|
||||||
|
@@ -112,11 +112,6 @@ enum tgsi_interpolate_loc {
|
|||||||
TGSI_INTERPOLATE_LOC_COUNT,
|
TGSI_INTERPOLATE_LOC_COUNT,
|
||||||
};
|
};
|
||||||
|
|
||||||
#define TGSI_CYLINDRICAL_WRAP_X (1 << 0)
|
|
||||||
#define TGSI_CYLINDRICAL_WRAP_Y (1 << 1)
|
|
||||||
#define TGSI_CYLINDRICAL_WRAP_Z (1 << 2)
|
|
||||||
#define TGSI_CYLINDRICAL_WRAP_W (1 << 3)
|
|
||||||
|
|
||||||
enum tgsi_memory_type {
|
enum tgsi_memory_type {
|
||||||
TGSI_MEMORY_TYPE_GLOBAL, /* OpenCL global */
|
TGSI_MEMORY_TYPE_GLOBAL, /* OpenCL global */
|
||||||
TGSI_MEMORY_TYPE_SHARED, /* OpenCL local / GLSL shared */
|
TGSI_MEMORY_TYPE_SHARED, /* OpenCL local / GLSL shared */
|
||||||
@@ -158,8 +153,7 @@ struct tgsi_declaration_interp
|
|||||||
{
|
{
|
||||||
unsigned Interpolate : 4; /**< one of TGSI_INTERPOLATE_x */
|
unsigned Interpolate : 4; /**< one of TGSI_INTERPOLATE_x */
|
||||||
unsigned Location : 2; /**< one of TGSI_INTERPOLATE_LOC_x */
|
unsigned Location : 2; /**< one of TGSI_INTERPOLATE_LOC_x */
|
||||||
unsigned CylindricalWrap:4; /**< TGSI_CYLINDRICAL_WRAP_x flags */
|
unsigned Padding : 26;
|
||||||
unsigned Padding : 22;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum tgsi_semantic {
|
enum tgsi_semantic {
|
||||||
|
Reference in New Issue
Block a user