mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-18 07:18:06 +02:00
llvmpipe: drop support for tgsi_tex_txf_lz cap
LLVMpipe is the only driver that actually has supported the instructions that this cap reports about. But TGSI is a dying IR, and this helps very little; the compiler back-end will optimize this away anways. So let's drop it to reduce complexity. Acked-by: Konstantin Seurer <konstantin.seurer@gmail.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40993>
This commit is contained in:
parent
4c7b212165
commit
0a8072f66e
2 changed files with 4 additions and 11 deletions
|
|
@ -2042,8 +2042,7 @@ lp_build_lod_property(
|
|||
* constant coords maybe).
|
||||
* There's at least hope for sample opcodes as well as size queries.
|
||||
*/
|
||||
if (inst->Instruction.Opcode == TGSI_OPCODE_TEX_LZ ||
|
||||
reg->Register.File == TGSI_FILE_CONSTANT ||
|
||||
if (reg->Register.File == TGSI_FILE_CONSTANT ||
|
||||
reg->Register.File == TGSI_FILE_IMMEDIATE) {
|
||||
lod_property = LP_SAMPLER_LOD_SCALAR;
|
||||
}
|
||||
|
|
@ -2166,10 +2165,8 @@ emit_tex( struct lp_build_tgsi_soa_context *bld,
|
|||
/* Note lod and especially projected are illegal in a LOT of cases */
|
||||
if (modifier == LP_BLD_TEX_MODIFIER_LOD_BIAS ||
|
||||
modifier == LP_BLD_TEX_MODIFIER_EXPLICIT_LOD) {
|
||||
if (inst->Instruction.Opcode == TGSI_OPCODE_TEX_LZ) {
|
||||
lod = bld->bld_base.base.zero;
|
||||
} else if (inst->Texture.Texture == TGSI_TEXTURE_SHADOWCUBE ||
|
||||
inst->Texture.Texture == TGSI_TEXTURE_CUBE_ARRAY) {
|
||||
if (inst->Texture.Texture == TGSI_TEXTURE_SHADOWCUBE ||
|
||||
inst->Texture.Texture == TGSI_TEXTURE_CUBE_ARRAY) {
|
||||
/* note that shadow cube array with bias/explicit lod does not exist */
|
||||
lod = lp_build_emit_fetch(&bld->bld_base, inst, 1, 0);
|
||||
}
|
||||
|
|
@ -2527,8 +2524,7 @@ emit_fetch_texels( struct lp_build_tgsi_soa_context *bld,
|
|||
/* always have lod except for buffers and msaa targets ? */
|
||||
if (target != TGSI_TEXTURE_BUFFER &&
|
||||
target != TGSI_TEXTURE_2D_MSAA &&
|
||||
target != TGSI_TEXTURE_2D_ARRAY_MSAA &&
|
||||
inst->Instruction.Opcode != TGSI_OPCODE_TXF_LZ) {
|
||||
target != TGSI_TEXTURE_2D_ARRAY_MSAA) {
|
||||
sample_key |= LP_SAMPLER_LOD_EXPLICIT << LP_SAMPLER_LOD_CONTROL_SHIFT;
|
||||
explicit_lod = lp_build_emit_fetch(&bld->bld_base, inst, 0, 3);
|
||||
lod_property = lp_build_lod_property(&bld->bld_base, inst, 0);
|
||||
|
|
@ -4558,11 +4554,9 @@ lp_build_tgsi_soa(struct gallivm_state *gallivm,
|
|||
bld.bld_base.op_actions[TGSI_OPCODE_TXB].emit = txb_emit;
|
||||
bld.bld_base.op_actions[TGSI_OPCODE_TXD].emit = txd_emit;
|
||||
bld.bld_base.op_actions[TGSI_OPCODE_TXL].emit = txl_emit;
|
||||
bld.bld_base.op_actions[TGSI_OPCODE_TEX_LZ].emit = txl_emit;
|
||||
bld.bld_base.op_actions[TGSI_OPCODE_TXP].emit = txp_emit;
|
||||
bld.bld_base.op_actions[TGSI_OPCODE_TXQ].emit = txq_emit;
|
||||
bld.bld_base.op_actions[TGSI_OPCODE_TXF].emit = txf_emit;
|
||||
bld.bld_base.op_actions[TGSI_OPCODE_TXF_LZ].emit = txf_emit;
|
||||
bld.bld_base.op_actions[TGSI_OPCODE_TEX2].emit = tex2_emit;
|
||||
bld.bld_base.op_actions[TGSI_OPCODE_TXB2].emit = txb2_emit;
|
||||
bld.bld_base.op_actions[TGSI_OPCODE_TXL2].emit = txl2_emit;
|
||||
|
|
|
|||
|
|
@ -293,7 +293,6 @@ llvmpipe_init_screen_caps(struct pipe_screen *screen)
|
|||
caps->max_texture_gather_components = 4;
|
||||
caps->vs_window_space_position = true;
|
||||
caps->fs_fine_derivative = true;
|
||||
caps->tgsi_tex_txf_lz = true;
|
||||
caps->sampler_view_target = true;
|
||||
caps->fake_sw_msaa = false;
|
||||
caps->texture_query_lod = true;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue