summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/dri/r600/r700_chip.c1
-rw-r--r--src/mesa/drivers/dri/r600/r700_chip.h1
-rw-r--r--src/mesa/drivers/dri/r600/r700_state.c14
3 files changed, 16 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r600/r700_chip.c b/src/mesa/drivers/dri/r600/r700_chip.c
index 5ae70c99c7..daf14bee75 100644
--- a/src/mesa/drivers/dri/r600/r700_chip.c
+++ b/src/mesa/drivers/dri/r600/r700_chip.c
@@ -219,6 +219,7 @@ GLboolean r700InitChipObject(context_t *context)
LINK_STATES(SPI_THREAD_GROUPING);
LINK_STATES(SPI_PS_IN_CONTROL_0);
LINK_STATES(SPI_PS_IN_CONTROL_1);
+ LINK_STATES(SPI_INTERP_CONTROL_0);
LINK_STATES(SPI_INPUT_Z);
LINK_STATES(SPI_FOG_CNTL);
diff --git a/src/mesa/drivers/dri/r600/r700_chip.h b/src/mesa/drivers/dri/r600/r700_chip.h
index 918cb222d4..c3a33010f3 100644
--- a/src/mesa/drivers/dri/r600/r700_chip.h
+++ b/src/mesa/drivers/dri/r600/r700_chip.h
@@ -341,6 +341,7 @@ typedef struct _R700_CHIP_CONTEXT
union UINT_FLOAT SPI_THREAD_GROUPING ; /* 0xA1B2 */
union UINT_FLOAT SPI_PS_IN_CONTROL_0 ; /* 0xA1B3 */
union UINT_FLOAT SPI_PS_IN_CONTROL_1 ; /* 0xA1B4 */
+ union UINT_FLOAT SPI_INTERP_CONTROL_0 ; /* 0xA1B5 */
union UINT_FLOAT SPI_INPUT_Z ; /* 0xA1B6 */
union UINT_FLOAT SPI_FOG_CNTL ; /* 0xA1B7 */
diff --git a/src/mesa/drivers/dri/r600/r700_state.c b/src/mesa/drivers/dri/r600/r700_state.c
index ca1c84f5dc..88b789f5c8 100644
--- a/src/mesa/drivers/dri/r600/r700_state.c
+++ b/src/mesa/drivers/dri/r600/r700_state.c
@@ -463,6 +463,20 @@ static void r700FrontFace(GLcontext * ctx, GLenum mode) //------------------
static void r700ShadeModel(GLcontext * ctx, GLenum mode) //--------------------
{
+ context_t *context = R700_CONTEXT(ctx);
+ R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
+
+ /* also need to set/clear FLAT_SHADE bit per param in SPI_PS_INPUT_CNTL_[0-31] */
+ switch (mode) {
+ case GL_FLAT:
+ SETbit(r700->SPI_INTERP_CONTROL_0.u32All, FLAT_SHADE_ENA_bit);
+ break;
+ case GL_SMOOTH:
+ CLEARbit(r700->SPI_INTERP_CONTROL_0.u32All, FLAT_SHADE_ENA_bit);
+ break;
+ default:
+ return;
+ }
}
static void r700PointParameter(GLcontext * ctx, GLenum pname, const GLfloat * param) //---------------