Skip to content
Browse files

Vertex program texture commands. They don't work, but they don't hang…

… the RSX, either.
  • Loading branch information...
1 parent fe59ed7 commit 10139e9355afe3611a1fb5d13ca989ac62b779ee @gzorin committed Jul 23, 2012
Showing with 8 additions and 3 deletions.
  1. +2 −1 src/nvfx/nvfx_shader.h
  2. +6 −2 src/nvfx/nvfx_vertprog.c
View
3 src/nvfx/nvfx_shader.h
@@ -69,7 +69,7 @@
#define NVFX_VP_INST_VEC_OP_ARR 0x17
#define NVFX_VP_INST_VEC_OP_ARA 0x18
-#define NV40_VP_INST_VEC_OP_TXL 0x19
+#define NVFX_VP_INST_VEC_OP_TXL 0x19
/* DWORD 3 */
#define NVFX_VP_INST_LAST (1 << 0)
@@ -382,6 +382,7 @@
#define NVFXSR_CONST 5
#define NVFXSR_IMM 6
#define NVFXSR_RELOCATED 7
+#define NVFXSR_VPTEXINPUT 8
#define NVFX_COND_FL 0
#define NVFX_COND_LT 1
View
8 src/nvfx/nvfx_vertprog.c
@@ -142,6 +142,10 @@ emit_src(struct nvfx_context* nvfx, struct nvfx_vpc *vpc, uint32_t *hw, int pos,
sr |= (NVFX_VP(SRC_REG_TYPE_INPUT) <<
NVFX_VP(SRC_REG_TYPE_SHIFT));
break;
+ case NVFXSR_VPTEXINPUT:
+ sr |= (NVFX_VP(SRC_REG_TYPE_INPUT) << NVFX_VP(SRC_REG_TYPE_SHIFT));
+ sr |= (src.reg.index << NVFX_VP(SRC_TEMP_SRC_SHIFT));
+ break;
default:
assert(0);
}
@@ -502,7 +506,7 @@ nvfx_vertprog_parse_instruction(struct nvfx_context* nvfx, struct nvfx_vpc *vpc,
/* handled above */
break;
case TGSI_FILE_SAMPLER:
- /* TODO: Implement this. */
+ src[i] = nvfx_src(nvfx_reg(NVFXSR_VPTEXINPUT,fsrc->Register.Index));
break;
default:
NOUVEAU_ERR("bad src file: \n");
@@ -786,7 +790,7 @@ nvfx_vertprog_parse_instruction(struct nvfx_context* nvfx, struct nvfx_vpc *vpc,
break;
case TGSI_OPCODE_TEX:
- /* TODO: Implement this. */
+ nvfx_vp_emit(vpc,arith(sat, VEC, TXL, dst, mask, src[0], src[1], none));
break;
default:

0 comments on commit 10139e9

Please sign in to comment.
Something went wrong with that request. Please try again.