mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 22:00:13 +01:00
program: Remove OPCODE_TXP_NV.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Acked-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
aaef6cf4e3
commit
624d06708d
5 changed files with 0 additions and 30 deletions
|
|
@ -1253,26 +1253,6 @@ _mesa_execute_program(struct gl_context * ctx,
|
||||||
store_vector4(inst, machine, color);
|
store_vector4(inst, machine, color);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case OPCODE_TXP_NV: /* GL_NV_fragment_program only */
|
|
||||||
/* Texture lookup w/ projective divide, as above, but do not
|
|
||||||
* do the divide by w if sampling from a cube map.
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
GLfloat texcoord[4], color[4];
|
|
||||||
|
|
||||||
fetch_vector4(&inst->SrcReg[0], machine, texcoord);
|
|
||||||
if (inst->TexSrcTarget != TEXTURE_CUBE_INDEX &&
|
|
||||||
texcoord[3] != 0.0F) {
|
|
||||||
texcoord[0] /= texcoord[3];
|
|
||||||
texcoord[1] /= texcoord[3];
|
|
||||||
texcoord[2] /= texcoord[3];
|
|
||||||
}
|
|
||||||
|
|
||||||
fetch_texel(ctx, machine, inst, texcoord, 0.0, color);
|
|
||||||
|
|
||||||
store_vector4(inst, machine, color);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case OPCODE_TRUNC: /* truncate toward zero */
|
case OPCODE_TRUNC: /* truncate toward zero */
|
||||||
{
|
{
|
||||||
GLfloat a[4], result[4];
|
GLfloat a[4], result[4];
|
||||||
|
|
|
||||||
|
|
@ -184,7 +184,6 @@ static const struct instruction_info InstInfo[MAX_OPCODE] = {
|
||||||
{ OPCODE_TXD, "TXD", 3, 1 },
|
{ OPCODE_TXD, "TXD", 3, 1 },
|
||||||
{ OPCODE_TXL, "TXL", 1, 1 },
|
{ OPCODE_TXL, "TXL", 1, 1 },
|
||||||
{ OPCODE_TXP, "TXP", 1, 1 },
|
{ OPCODE_TXP, "TXP", 1, 1 },
|
||||||
{ OPCODE_TXP_NV, "TXP_NV", 1, 1 },
|
|
||||||
{ OPCODE_TRUNC, "TRUNC", 1, 1 },
|
{ OPCODE_TRUNC, "TRUNC", 1, 1 },
|
||||||
{ OPCODE_XPD, "XPD", 2, 1 }
|
{ OPCODE_XPD, "XPD", 2, 1 }
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -173,7 +173,6 @@ enum prog_opcode {
|
||||||
OPCODE_TXD, /* X X */
|
OPCODE_TXD, /* X X */
|
||||||
OPCODE_TXL, /* 3 2 X */
|
OPCODE_TXL, /* 3 2 X */
|
||||||
OPCODE_TXP, /* X X */
|
OPCODE_TXP, /* X X */
|
||||||
OPCODE_TXP_NV, /* 3 X */
|
|
||||||
OPCODE_TRUNC, /* X */
|
OPCODE_TRUNC, /* X */
|
||||||
OPCODE_XPD, /* X X */
|
OPCODE_XPD, /* X X */
|
||||||
MAX_OPCODE
|
MAX_OPCODE
|
||||||
|
|
|
||||||
|
|
@ -592,11 +592,6 @@ ptn_tex(nir_builder *b, nir_alu_dest dest, nir_ssa_def **src,
|
||||||
op = nir_texop_tex;
|
op = nir_texop_tex;
|
||||||
num_srcs = 2;
|
num_srcs = 2;
|
||||||
break;
|
break;
|
||||||
case OPCODE_TXP_NV:
|
|
||||||
assert(!"not handled");
|
|
||||||
op = nir_texop_tex;
|
|
||||||
num_srcs = 2;
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
fprintf(stderr, "unknown tex op %d\n", prog_inst->Opcode);
|
fprintf(stderr, "unknown tex op %d\n", prog_inst->Opcode);
|
||||||
abort();
|
abort();
|
||||||
|
|
@ -743,7 +738,6 @@ static const nir_op op_trans[MAX_OPCODE] = {
|
||||||
[OPCODE_TXD] = 0,
|
[OPCODE_TXD] = 0,
|
||||||
[OPCODE_TXL] = 0,
|
[OPCODE_TXL] = 0,
|
||||||
[OPCODE_TXP] = 0,
|
[OPCODE_TXP] = 0,
|
||||||
[OPCODE_TXP_NV] = 0,
|
|
||||||
[OPCODE_XPD] = 0,
|
[OPCODE_XPD] = 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -882,7 +876,6 @@ ptn_emit_instruction(struct ptn_compile *c, struct prog_instruction *prog_inst)
|
||||||
case OPCODE_TXD:
|
case OPCODE_TXD:
|
||||||
case OPCODE_TXL:
|
case OPCODE_TXL:
|
||||||
case OPCODE_TXP:
|
case OPCODE_TXP:
|
||||||
case OPCODE_TXP_NV:
|
|
||||||
ptn_tex(b, dest, src, prog_inst);
|
ptn_tex(b, dest, src, prog_inst);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -426,7 +426,6 @@ is_texture_instruction(const struct prog_instruction *inst)
|
||||||
case OPCODE_TXD:
|
case OPCODE_TXD:
|
||||||
case OPCODE_TXL:
|
case OPCODE_TXL:
|
||||||
case OPCODE_TXP:
|
case OPCODE_TXP:
|
||||||
case OPCODE_TXP_NV:
|
|
||||||
return GL_TRUE;
|
return GL_TRUE;
|
||||||
default:
|
default:
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue