Bug 66858 - Missing definition for NVFX_FP_OP_OPCODE_KILL_IF
Missing definition for NVFX_FP_OP_OPCODE_KILL_IF
Status: RESOLVED FIXED
Product: Mesa
Classification: Unclassified
Component: Other
git
x86-64 (AMD64) Linux (All)
: medium normal
Assigned To: mesa-dev
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-12 15:04 UTC by Andrew Dunai
Modified: 2013-07-12 15:54 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Dunai 2013-07-12 15:04:05 UTC
I could not compile ./src/gallium/drivers/nv30/nvfx_fragprog.c because it contained undefined constant `NVFX_FP_OP_OPCODE_KILL_IF`.

According to this newsletter - http://www.mail-archive.com/mesa-dev@lists.freedesktop.org/msg41057.html - it is new name for `NVFX_FP_OP_OPCODE_KIL`.
So I added new define with the value of NVFX_FP_OP_OPCODE_KIL:

#define NVFX_FP_OP_OPCODE_KILL_IF 0x12

To file `./src/gallium/drivers/nv30/nvfx_shader.h`. After this everything went normal.
Comment 1 Brian Paul 2013-07-12 15:16:34 UTC
That's my fault.  But I believe this is the correct fix (undo the change to that line):

--- a/src/gallium/drivers/nv30/nvfx_fragprog.c
+++ b/src/gallium/drivers/nv30/nvfx_fragprog.c
@@ -197,7 +197,7 @@ nvfx_fp_emit(struct nvfx_fpc *fpc, struct nvfx_insn insn)
    hw = &fp->insn[fpc->inst_offset];
    memset(hw, 0, sizeof(uint32_t) * 4);
 
-   if (insn.op == NVFX_FP_OP_OPCODE_KILL_IF)
+   if (insn.op == NVFX_FP_OP_OPCODE_KIL)
       fp->fp_control |= NV30_3D_FP_CONTROL_USES_KIL;
    hw[0] |= (insn.op << NVFX_FP_OP_OPCODE_SHIFT);
    hw[0] |= (insn.mask << NVFX_FP_OP_OUTMASK_SHIFT);


Can you test that?
Comment 2 Andrew Dunai 2013-07-12 15:54:17 UTC
Confirmed. I'm closing the ticket. Great job on developing 9.2, good luck!