From 762c1d11ffbb5179e44117397559e7cc2dfe9cef Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 10 Jul 2009 13:07:45 -0600 Subject: st/mesa: implement indirect addressing for destination registers --- src/mesa/state_tracker/st_mesa_to_tgsi.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c index 8aef3fc6dc..e150dff9bb 100644 --- a/src/mesa/state_tracker/st_mesa_to_tgsi.c +++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c @@ -268,6 +268,11 @@ compile_instruction( NULL, GL_FALSE ); fulldst->DstRegister.WriteMask = convert_writemask( inst->DstReg.WriteMask ); + if (inst->DstReg.RelAddr) { + fulldst->DstRegister.Indirect = 1; + fulldst->DstRegisterInd.File = TGSI_FILE_ADDRESS; + fulldst->DstRegisterInd.Index = 0; + } for (i = 0; i < fullinst->Instruction.NumSrcRegs; i++) { GLuint j; -- cgit v1.2.3 From 1c1307e7c55844f63f7bd7ac02c64f4b936f3c66 Mon Sep 17 00:00:00 2001 From: Zack Rusin Date: Sat, 11 Jul 2009 13:48:41 -0400 Subject: gallium: compare the actual register, not all the inputs otherwise we decrement indexes for all registers --- src/mesa/state_tracker/st_atom_shader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_atom_shader.c b/src/mesa/state_tracker/st_atom_shader.c index 5219119c81..8b3bb5cc03 100644 --- a/src/mesa/state_tracker/st_atom_shader.c +++ b/src/mesa/state_tracker/st_atom_shader.c @@ -139,7 +139,7 @@ find_translated_vp(struct st_context *st, if (fragInputsRead & (1 << inAttr)) { stfp->input_to_slot[inAttr] = numIn; numIn++; - if ((fragInputsRead & FRAG_BIT_FOGC)) { + if (((1 << inAttr) & FRAG_BIT_FOGC)) { /* leave placeholders for the * extra registers we extract from fog */ if (stfp->Base.UsesFrontFacing) { -- cgit v1.2.3