struct evergreen_fragment_program *fp = (struct evergreen_fragment_program *)
(ctx->FragmentProgram._Current);
r700_AssemblerBase *pAsm = &(fp->r700AsmCode);
- struct gl_fragment_program *mesa_fp = &(fp->mesa_program);
- struct gl_program_parameter_list *paramList;
- unsigned int unNumParamData;
+ struct gl_fragment_program *mesa_fp = &(fp->mesa_program);
unsigned int ui, i;
unsigned int unNumOfReg;
unsigned int unBit;
}
exportCount = (evergreen->SQ_PGM_EXPORTS_PS.u32All & EXPORT_MODE_mask) / (1 << EXPORT_MODE_shift);
-
+
+ return GL_TRUE;
+}
+
+GLboolean evergreenSetupFPconstants(GLcontext * ctx)
+{
+ context_t *context = EVERGREEN_CONTEXT(ctx);
+ EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
+ struct evergreen_fragment_program *fp = (struct evergreen_fragment_program *)
+ (ctx->FragmentProgram._Current);
+ r700_AssemblerBase *pAsm = &(fp->r700AsmCode);
+
+ struct gl_program_parameter_list *paramList;
+ unsigned int unNumParamData;
+ unsigned int ui;
+
/* sent out shader constants. */
paramList = fp->mesa_program.Base.Parameters;
}
unConstOffset += pCompiledSub->NumParameters;
}
-
- return GL_TRUE;
-}
-
+}
\ No newline at end of file
extern GLboolean evergreenSetupFragmentProgram(GLcontext * ctx);
+extern GLboolean evergreenSetupFPconstants(GLcontext * ctx);
+
extern void * evergreenGetActiveFpShaderBo(GLcontext * ctx);
extern void * evergreenGetActiveFpShaderConstBo(GLcontext * ctx);
GLuint emit_end = evergreenPredictRenderSize(ctx, prim, ib, nr_prims)
+ context->radeon.cmdbuf.cs->cdw;
+ /* evergreenPredictRenderSize will call radeonReleaseDmaRegions, so update VP/FP const buf after it. */
+ evergreenSetupVPconstants(ctx);
+ evergreenSetupFPconstants(ctx);
+
evergreenSetupIndexBuffer(ctx, ib);
evergreenSetupStreams(ctx, arrays, max_index + 1);
for (i = 0; i < nr_prims; ++i)
{
-/* richard test disable */
-#if 0
if (context->ind_buf.bo)
evergreenRunRenderPrimitive(ctx,
prim[i].start,
prim[i].start + prim[i].count,
prim[i].mode);
else
-#endif //0
-//-------------
evergreenRunRenderPrimitiveImmediate(ctx,
prim[i].start,
prim[i].start + prim[i].count,
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
struct evergreen_vertex_program *vp = context->selected_vp;
- struct gl_program_parameter_list *paramList;
- unsigned int unNumParamData;
- unsigned int ui;
-
if(GL_FALSE == vp->loaded)
{
if(vp->r700Shader.bNeedsAssembly == GL_TRUE)
CLEARbit(evergreen->SPI_PS_IN_CONTROL_0.u32All, LINEAR_GRADIENT_ENA_bit);
*/
+ return GL_TRUE;
+}
+
+GLboolean evergreenSetupVPconstants(GLcontext * ctx)
+{
+ context_t *context = EVERGREEN_CONTEXT(ctx);
+ EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
+ struct evergreen_vertex_program *vp = context->selected_vp;
+
+ struct gl_program_parameter_list *paramList;
+ unsigned int unNumParamData;
+ unsigned int ui;
+
/* sent out shader constants. */
paramList = vp->mesa_program->Base.Parameters;
}
unConstOffset += pCompiledSub->NumParameters;
}
-
- return GL_TRUE;
-}
+}
\ No newline at end of file
extern GLboolean evergreenSetupVertexProgram(GLcontext * ctx);
+extern GLboolean evergreenSetupVPconstants(GLcontext * ctx);
+
extern void * evergreenGetActiveVpShaderBo(GLcontext * ctx);
extern void * evergreenGetActiveVpShaderConstBo(GLcontext * ctx);
swizzleagain_PVSSRC(&(pAsm->S[2].src), SQ_SEL_X, SQ_SEL_X, SQ_SEL_X, SQ_SEL_X);
/* tmp.x = amd MUL_LIT(src.w, dst.z, src.x ) */
- pAsm->D.dst.opcode = SQ_OP3_INST_MUL_LIT;
+ if(8 == pAsm->unAsic)
+ {
+ pAsm->D.dst.opcode = EG_OP3_INST_MUL_LIT;
+ }
+ else
+ {
+ pAsm->D.dst.opcode = SQ_OP3_INST_MUL_LIT;
+ }
pAsm->D.dst.math = 1;
pAsm->D.dst.op3 = 1;
pAsm->D.dst.rtype = DST_REG_TEMPORARY;