summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r300/r300_render.c
diff options
context:
space:
mode:
authorMaciej Cencora <[email protected]>2009-05-13 22:24:57 +0200
committerAlex Deucher <[email protected]>2009-05-16 11:42:02 -0400
commit42f16aa4e0d9f1c5f016919ed04c55430507234e (patch)
tree49a03fbd90dcdee0acea580ba5b6621850b3ec1a /src/mesa/drivers/dri/r300/r300_render.c
parent76a64958a4ca38ec27b63a909979c493c507b952 (diff)
r300: further cleanup
- move extensions init into seperate function - move options handling into seperate function - create new structure to hold options values - use context->options.hw_tcl_enabled field instead of global hw_tcl_on and future_hw_tcl_on variables
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_render.c')
-rw-r--r--src/mesa/drivers/dri/r300/r300_render.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_render.c b/src/mesa/drivers/dri/r300/r300_render.c
index f87fee4af65..93fdc575885 100644
--- a/src/mesa/drivers/dri/r300/r300_render.c
+++ b/src/mesa/drivers/dri/r300/r300_render.c
@@ -74,8 +74,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "r300_emit.h"
#include "r300_fragprog_common.h"
-extern int future_hw_tcl_on;
-
/**
* \brief Convert a OpenGL primitive type into a R300 primitive type.
*/
@@ -468,8 +466,8 @@ static GLboolean r300RunNonTCLRender(GLcontext * ctx,
if (r300Fallback(ctx) >= R300_FALLBACK_RAST)
return GL_TRUE;
- if (!(rmesa->radeon.radeonScreen->chip_flags & RADEON_CHIPSET_TCL))
- return GL_TRUE;
+ if (rmesa->options.hw_tcl_enabled == GL_FALSE)
+ return GL_TRUE;
if (!r300ValidateBuffers(ctx))
return GL_TRUE;
@@ -483,16 +481,14 @@ static GLboolean r300RunTCLRender(GLcontext * ctx,
r300ContextPtr rmesa = R300_CONTEXT(ctx);
struct r300_vertex_program *vp;
- hw_tcl_on = future_hw_tcl_on;
-
if (RADEON_DEBUG & DEBUG_PRIMS)
fprintf(stderr, "%s\n", __FUNCTION__);
- if (hw_tcl_on == GL_FALSE)
+ if (rmesa->options.hw_tcl_enabled == GL_FALSE)
return GL_TRUE;
if (r300Fallback(ctx) >= R300_FALLBACK_TCL) {
- hw_tcl_on = GL_FALSE;
+ rmesa->options.hw_tcl_enabled = GL_FALSE;
return GL_TRUE;
}
@@ -503,7 +499,7 @@ static GLboolean r300RunTCLRender(GLcontext * ctx,
vp = (struct r300_vertex_program *)CURRENT_VERTEX_SHADER(ctx);
if (vp->native == GL_FALSE) {
- hw_tcl_on = GL_FALSE;
+ rmesa->options.hw_tcl_enabled = GL_FALSE;
return GL_TRUE;
}