diff options
author | Alex Deucher <[email protected]> | 2009-06-03 15:14:44 -0400 |
---|---|---|
committer | Alex Deucher <[email protected]> | 2009-06-03 15:14:44 -0400 |
commit | ac274b68d724bac8c31bc62163a4b0ba59a6fe4d (patch) | |
tree | 5564b8e68e9e7c8b8a541aaf08f9442490ecf539 /src/mesa/drivers/dri/r600/r700_state.c | |
parent | ada26c40593d1bce972c445aa22f26811f6e6223 (diff) |
start to fill in ShadeModel()
Diffstat (limited to 'src/mesa/drivers/dri/r600/r700_state.c')
-rw-r--r-- | src/mesa/drivers/dri/r600/r700_state.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r600/r700_state.c b/src/mesa/drivers/dri/r600/r700_state.c index ca1c84f5dc8..88b789f5c8f 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) //--------------- |