diff options
author | Erik Faye-Lund <erik.faye-lund@collabora.com> | 2021-08-23 14:25:07 +0200 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2021-08-25 19:37:16 +0000 |
commit | 7b0bda2e5569edb88ec0a400d91779c0c1a58d0f (patch) | |
tree | 2b95093be8d66ccf59091b939a7419beb982ec6b /src/gallium | |
parent | 526f7d779071e432a1205d62acd81d8d7f0c2f47 (diff) |
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>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_build.c | 4 | ||||
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_dump.c | 16 | ||||
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_lowering.c | 1 | ||||
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_scan.c | 1 | ||||
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_scan.h | 1 | ||||
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_ureg.c | 7 | ||||
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_state_fs.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_dump.c | 1 | ||||
-rw-r--r-- | src/gallium/drivers/softpipe/sp_setup.c | 8 | ||||
-rw-r--r-- | src/gallium/include/pipe/p_shader_tokens.h | 8 |
10 files changed, 6 insertions, 43 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_build.c b/src/gallium/auxiliary/tgsi/tgsi_build.c index 9e1a5534283..73d1eb26af7 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_build.c +++ b/src/gallium/auxiliary/tgsi/tgsi_build.c @@ -218,7 +218,6 @@ tgsi_default_declaration_interp( void ) di.Interpolate = TGSI_INTERPOLATE_CONSTANT; di.Location = TGSI_INTERPOLATE_LOC_CENTER; - di.CylindricalWrap = 0; di.Padding = 0; return di; @@ -227,7 +226,6 @@ tgsi_default_declaration_interp( void ) static struct tgsi_declaration_interp tgsi_build_declaration_interp(unsigned interpolate, unsigned interpolate_location, - unsigned cylindrical_wrap, struct tgsi_declaration *declaration, struct tgsi_header *header) { @@ -235,7 +233,6 @@ tgsi_build_declaration_interp(unsigned interpolate, di.Interpolate = interpolate; di.Location = interpolate_location; - di.CylindricalWrap = cylindrical_wrap; di.Padding = 0; declaration_grow(declaration, header); @@ -467,7 +464,6 @@ tgsi_build_full_declaration( *di = tgsi_build_declaration_interp(full_decl->Interp.Interpolate, full_decl->Interp.Location, - full_decl->Interp.CylindricalWrap, declaration, header); } diff --git a/src/gallium/auxiliary/tgsi/tgsi_dump.c b/src/gallium/auxiliary/tgsi/tgsi_dump.c index 110aeb6084f..68e30b6b8c5 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_dump.c +++ b/src/gallium/auxiliary/tgsi/tgsi_dump.c @@ -436,22 +436,6 @@ iter_declaration( TXT( ", " ); 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) { diff --git a/src/gallium/auxiliary/tgsi/tgsi_lowering.c b/src/gallium/auxiliary/tgsi/tgsi_lowering.c index 4f8f3017560..db23026691b 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_lowering.c +++ b/src/gallium/auxiliary/tgsi/tgsi_lowering.c @@ -1188,7 +1188,6 @@ emit_twoside(struct tgsi_transform_context *tctx) decl.Declaration.Interpolate = true; decl.Interp.Interpolate = info->input_interpolate[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); } diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c index 0cd4a8883ae..ecb3706edda 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.c +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c @@ -668,7 +668,6 @@ scan_declaration(struct tgsi_shader_info *info, info->input_semantic_index[reg] = (ubyte) semIndex; info->input_interpolate[reg] = (ubyte)fulldecl->Interp.Interpolate; 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. */ info->num_inputs = MAX2(info->num_inputs, reg + 1); diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.h b/src/gallium/auxiliary/tgsi/tgsi_scan.h index ca8d90a8016..ace5b08872d 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.h +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.h @@ -51,7 +51,6 @@ struct tgsi_shader_info ubyte input_interpolate[PIPE_MAX_SHADER_INPUTS]; ubyte input_interpolate_loc[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_index[PIPE_MAX_SHADER_OUTPUTS]; ubyte output_usagemask[PIPE_MAX_SHADER_OUTPUTS]; diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.c b/src/gallium/auxiliary/tgsi/tgsi_ureg.c index 3dfc0205eb8..0855824d71c 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_ureg.c +++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.c @@ -118,7 +118,6 @@ struct ureg_program enum tgsi_semantic semantic_name; unsigned semantic_index; enum tgsi_interpolate_mode interp; - unsigned char cylindrical_wrap; unsigned char usage_mask; enum tgsi_interpolate_loc interp_location; unsigned first; @@ -303,7 +302,6 @@ ureg_DECL_fs_input_centroid_layout(struct ureg_program *ureg, if (ureg->input[i].semantic_name == semantic_name && ureg->input[i].semantic_index == semantic_index) { assert(ureg->input[i].interp == interp_mode); - assert(ureg->input[i].cylindrical_wrap == 0); assert(ureg->input[i].interp_location == interp_location); if (ureg->input[i].array_id == array_id) { 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_index = semantic_index; ureg->input[i].interp = interp_mode; - ureg->input[i].cylindrical_wrap = 0; ureg->input[i].interp_location = interp_location; ureg->input[i].first = index; ureg->input[i].last = index + array_size - 1; @@ -1585,7 +1582,6 @@ emit_decl_fs(struct ureg_program *ureg, enum tgsi_semantic semantic_name, unsigned semantic_index, enum tgsi_interpolate_mode interpolate, - unsigned cylindrical_wrap, enum tgsi_interpolate_loc interpolate_location, unsigned array_id, unsigned usage_mask) @@ -1608,7 +1604,6 @@ emit_decl_fs(struct ureg_program *ureg, out[2].value = 0; out[2].decl_interp.Interpolate = interpolate; - out[2].decl_interp.CylindricalWrap = cylindrical_wrap; out[2].decl_interp.Location = interpolate_location; 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_index, ureg->input[i].interp, - ureg->input[i].cylindrical_wrap, ureg->input[i].interp_location, ureg->input[i].array_id, ureg->input[i].usage_mask); @@ -1865,7 +1859,6 @@ static void emit_decls( struct ureg_program *ureg ) ureg->input[i].semantic_index + (j - ureg->input[i].first), ureg->input[i].interp, - ureg->input[i].cylindrical_wrap, ureg->input[i].interp_location, 0, ureg->input[i].usage_mask); } diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c index 12c42b0cd7d..0de4c33cd3b 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c @@ -3777,7 +3777,7 @@ llvmpipe_create_fs_state(struct pipe_context *pipe, 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].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]; switch (shader->info.base.input_interpolate[i]) { diff --git a/src/gallium/drivers/r600/r600_dump.c b/src/gallium/drivers/r600/r600_dump.c index 76b56bc7d53..3fcf13aef81 100644 --- a/src/gallium/drivers/r600/r600_dump.c +++ b/src/gallium/drivers/r600/r600_dump.c @@ -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_loc, 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) { diff --git a/src/gallium/drivers/softpipe/sp_setup.c b/src/gallium/drivers/softpipe/sp_setup.c index 4f5721cba4f..2998f2e82d7 100644 --- a/src/gallium/drivers/softpipe/sp_setup.c +++ b/src/gallium/drivers/softpipe/sp_setup.c @@ -623,7 +623,7 @@ setup_tri_coefficients(struct setup_context *setup) tri_apply_cylindrical_wrap(setup->vmin[vertSlot][j], setup->vmid[vertSlot][j], setup->vmax[vertSlot][j], - fsInfo->input_cylindrical_wrap[fragSlot] & (1 << j), + 0, 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], setup->vmid[vertSlot][j], setup->vmax[vertSlot][j], - fsInfo->input_cylindrical_wrap[fragSlot] & (1 << j), + 0, 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++) { line_apply_cylindrical_wrap(setup->vmin[vertSlot][j], setup->vmax[vertSlot][j], - fsInfo->input_cylindrical_wrap[fragSlot] & (1 << j), + 0, 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++) { line_apply_cylindrical_wrap(setup->vmin[vertSlot][j], setup->vmax[vertSlot][j], - fsInfo->input_cylindrical_wrap[fragSlot] & (1 << j), + 0, v); line_persp_coeff(setup, &setup->coef[fragSlot], j, v); } diff --git a/src/gallium/include/pipe/p_shader_tokens.h b/src/gallium/include/pipe/p_shader_tokens.h index b41d86ef3e3..73c9218c1f5 100644 --- a/src/gallium/include/pipe/p_shader_tokens.h +++ b/src/gallium/include/pipe/p_shader_tokens.h @@ -112,11 +112,6 @@ enum tgsi_interpolate_loc { 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 { TGSI_MEMORY_TYPE_GLOBAL, /* OpenCL global */ 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 Location : 2; /**< one of TGSI_INTERPOLATE_LOC_x */ - unsigned CylindricalWrap:4; /**< TGSI_CYLINDRICAL_WRAP_x flags */ - unsigned Padding : 22; + unsigned Padding : 26; }; enum tgsi_semantic { |