mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
i965: Support OPCODE_TRUNC in the brw_wm_fp.c code.
This gets two more glean glsl1 tests using the non-GLSL path.
This commit is contained in:
parent
9f6ec50f8c
commit
0ab8e2622e
3 changed files with 18 additions and 1 deletions
|
|
@ -353,6 +353,19 @@ static void emit_mad( struct brw_compile *p,
|
|||
}
|
||||
}
|
||||
|
||||
static void emit_trunc( struct brw_compile *p,
|
||||
const struct brw_reg *dst,
|
||||
GLuint mask,
|
||||
const struct brw_reg *arg0)
|
||||
{
|
||||
GLuint i;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
if (mask & (1<<i)) {
|
||||
brw_RNDZ(p, dst[i], arg0[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void emit_lrp( struct brw_compile *p,
|
||||
const struct brw_reg *dst,
|
||||
|
|
@ -1224,6 +1237,10 @@ void brw_wm_emit( struct brw_wm_compile *c )
|
|||
emit_dph(p, dst, dst_flags, args[0], args[1]);
|
||||
break;
|
||||
|
||||
case OPCODE_TRUNC:
|
||||
emit_trunc(p, dst, dst_flags, args[0]);
|
||||
break;
|
||||
|
||||
case OPCODE_LRP:
|
||||
emit_lrp(p, dst, dst_flags, args[0], args[1], args[2]);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ GLboolean brw_wm_is_glsl(const struct gl_fragment_program *fp)
|
|||
const struct prog_instruction *inst = &fp->Base.Instructions[i];
|
||||
switch (inst->Opcode) {
|
||||
case OPCODE_IF:
|
||||
case OPCODE_TRUNC:
|
||||
case OPCODE_ENDIF:
|
||||
case OPCODE_CAL:
|
||||
case OPCODE_BRK:
|
||||
|
|
|
|||
|
|
@ -159,6 +159,7 @@ void brw_wm_pass1( struct brw_wm_compile *c )
|
|||
case OPCODE_FRC:
|
||||
case OPCODE_MOV:
|
||||
case OPCODE_SWZ:
|
||||
case OPCODE_TRUNC:
|
||||
read0 = writemask;
|
||||
break;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue