summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r600
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/r600')
-rw-r--r--src/mesa/drivers/dri/r600/r700_assembler.c4
-rw-r--r--src/mesa/drivers/dri/r600/r700_fragprog.c17
2 files changed, 13 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/r600/r700_assembler.c b/src/mesa/drivers/dri/r600/r700_assembler.c
index 61133e686f..88d6b06df5 100644
--- a/src/mesa/drivers/dri/r600/r700_assembler.c
+++ b/src/mesa/drivers/dri/r600/r700_assembler.c
@@ -6159,7 +6159,7 @@ GLboolean callPreSub(r700_AssemblerBase* pAsm,
}
if(uNumValidSrc > 0)
{
- prelude_cf_ptr = pAsm->cf_current_alu_clause_ptr;
+ prelude_cf_ptr = (R700ControlFlowGenericClause*) pAsm->cf_current_alu_clause_ptr;
pAsm->alu_x_opcode = SQ_CF_INST_ALU;
}
@@ -6279,7 +6279,7 @@ GLboolean callPreSub(r700_AssemblerBase* pAsm,
next_ins(pAsm);
- pAsm->callers[pAsm->unCallerArrayPointer - 1].finale_cf_ptr = pAsm->cf_current_alu_clause_ptr;
+ pAsm->callers[pAsm->unCallerArrayPointer - 1].finale_cf_ptr = (R700ControlFlowGenericClause*) pAsm->cf_current_alu_clause_ptr;
pAsm->callers[pAsm->unCallerArrayPointer - 1].prelude_cf_ptr = prelude_cf_ptr;
pAsm->alu_x_opcode = SQ_CF_INST_ALU;
}
diff --git a/src/mesa/drivers/dri/r600/r700_fragprog.c b/src/mesa/drivers/dri/r600/r700_fragprog.c
index 5a90f729e6..aab1a7947a 100644
--- a/src/mesa/drivers/dri/r600/r700_fragprog.c
+++ b/src/mesa/drivers/dri/r600/r700_fragprog.c
@@ -563,11 +563,15 @@ GLboolean r700SetupFragmentProgram(GLcontext * ctx)
/* see if we need any point_sprite replacements, also increase num_interp
* as there's no vp output for them */
- for (i = FRAG_ATTRIB_TEX0; i<= FRAG_ATTRIB_TEX7; i++)
+ if (ctx->Point.PointSprite)
{
- if(ctx->Point.CoordReplace[i - FRAG_ATTRIB_TEX0] == GL_TRUE) {
- ui++;
- point_sprite = GL_TRUE;
+ for (i = FRAG_ATTRIB_TEX0; i<= FRAG_ATTRIB_TEX7; i++)
+ {
+ if (ctx->Point.CoordReplace[i - FRAG_ATTRIB_TEX0] == GL_TRUE)
+ {
+ ui++;
+ point_sprite = GL_TRUE;
+ }
}
}
@@ -670,8 +674,9 @@ GLboolean r700SetupFragmentProgram(GLcontext * ctx)
for(i=0; i<8; i++)
{
+ GLboolean coord_replace = ctx->Point.PointSprite && ctx->Point.CoordReplace[i];
unBit = 1 << (VERT_RESULT_TEX0 + i);
- if((OutputsWritten & unBit) || (ctx->Point.CoordReplace[i] == GL_TRUE))
+ if ((OutputsWritten & unBit) || coord_replace)
{
ui = pAsm->uiFP_AttributeMap[FRAG_ATTRIB_TEX0 + i];
SETbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, SEL_CENTROID_bit);
@@ -679,7 +684,7 @@ GLboolean r700SetupFragmentProgram(GLcontext * ctx)
SEMANTIC_shift, SEMANTIC_mask);
CLEARbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
/* ARB_point_sprite */
- if(ctx->Point.CoordReplace[i] == GL_TRUE)
+ if (coord_replace)
{
SETbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, PT_SPRITE_TEX_bit);
}