summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r300
diff options
context:
space:
mode:
authorMaciej Cencora <[email protected]>2009-08-14 16:39:01 +0200
committerMaciej Cencora <[email protected]>2009-08-14 17:06:02 +0200
commit7c060bff13c4e0ac9ea0644a0fe0fc98f46f9b5d (patch)
tree9d3b63e01287dbddccc494881cafeee286e10a84 /src/mesa/drivers/dri/r300
parent5fb5ea97f4439184f03075f57fa1fda56caf51b4 (diff)
r300: remove unused software TNL path
This doesn't remove software TCL path - so RS480 and RS690 work as before.
Diffstat (limited to 'src/mesa/drivers/dri/r300')
-rw-r--r--src/mesa/drivers/dri/r300/r300_context.c18
-rw-r--r--src/mesa/drivers/dri/r300/r300_emit.c35
-rw-r--r--src/mesa/drivers/dri/r300/r300_emit.h4
-rw-r--r--src/mesa/drivers/dri/r300/r300_render.c67
4 files changed, 6 insertions, 118 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_context.c b/src/mesa/drivers/dri/r300/r300_context.c
index 799e6134cd4..1baae8fc765 100644
--- a/src/mesa/drivers/dri/r300/r300_context.c
+++ b/src/mesa/drivers/dri/r300/r300_context.c
@@ -64,7 +64,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "r300_ioctl.h"
#include "r300_tex.h"
#include "r300_emit.h"
-#include "r300_render.h"
#include "r300_swtcl.h"
#include "radeon_bocs_wrapper.h"
#include "radeon_buffer_objects.h"
@@ -155,7 +154,6 @@ const struct dri_extension gl_20_extension[] = {
};
static const struct tnl_pipeline_stage *r300_pipeline[] = {
-
/* Catch any t&l fallbacks
*/
&_tnl_vertex_transform_stage,
@@ -166,21 +164,7 @@ static const struct tnl_pipeline_stage *r300_pipeline[] = {
&_tnl_texture_transform_stage,
&_tnl_point_attenuation_stage,
&_tnl_vertex_program_stage,
-
- /* Try again to go to tcl?
- * - no good for asymmetric-twoside (do with multipass)
- * - no good for asymmetric-unfilled (do with multipass)
- * - good for material
- * - good for texgen
- * - need to manipulate a bit of state
- *
- * - worth it/not worth it?
- */
-
- /* Else do them here.
- */
- &_r300_render_stage,
- &_tnl_render_stage, /* FALLBACK */
+ &_tnl_render_stage,
0,
};
diff --git a/src/mesa/drivers/dri/r300/r300_emit.c b/src/mesa/drivers/dri/r300/r300_emit.c
index feb3370f372..07e62230874 100644
--- a/src/mesa/drivers/dri/r300/r300_emit.c
+++ b/src/mesa/drivers/dri/r300/r300_emit.c
@@ -124,41 +124,6 @@ GLuint r300VAPOutputCntl1(GLcontext * ctx, GLuint vp_writes)
return ret;
}
-GLboolean r300EmitArrays(GLcontext * ctx)
-{
- r300ContextPtr r300 = R300_CONTEXT(ctx);
- struct r300_vertex_buffer *vbuf = &r300->vbuf;
- GLuint InputsRead, OutputsWritten;
-
- r300ChooseSwtclVertexFormat(ctx, &InputsRead, &OutputsWritten);
-
- r300SwitchFallback(ctx, R300_FALLBACK_AOS_LIMIT, vbuf->num_attribs > R300_MAX_AOS_ARRAYS);
- if (r300->fallback & R300_RASTER_FALLBACK_MASK)
- return GL_FALSE;
-
- {
- struct vertex_buffer *mesa_vb = &TNL_CONTEXT(ctx)->vb;
- GLuint attr, i;
-
- for (i = 0; i < vbuf->num_attribs; i++) {
- attr = vbuf->attribs[i].element;
- rcommon_emit_vector(ctx, &r300->radeon.tcl.aos[i], mesa_vb->AttribPtr[attr]->data,
- mesa_vb->AttribPtr[attr]->size, mesa_vb->AttribPtr[attr]->stride, mesa_vb->Count);
- }
-
- r300->radeon.tcl.aos_count = vbuf->num_attribs;
-
- /* Fill index buffer info */
- r300->ind_buf.ptr = mesa_vb->Elts;
- r300->ind_buf.is_32bit = GL_TRUE;
- r300->ind_buf.free_needed = GL_FALSE;
- }
-
- r300SetupVAP(ctx, InputsRead, OutputsWritten);
-
- return GL_TRUE;
-}
-
void r300EmitCacheFlush(r300ContextPtr rmesa)
{
BATCH_LOCALS(&rmesa->radeon);
diff --git a/src/mesa/drivers/dri/r300/r300_emit.h b/src/mesa/drivers/dri/r300/r300_emit.h
index 3f8c60ffae1..8e57e354d1d 100644
--- a/src/mesa/drivers/dri/r300/r300_emit.h
+++ b/src/mesa/drivers/dri/r300/r300_emit.h
@@ -104,7 +104,7 @@ static INLINE uint32_t cmdpacket3(struct radeon_screen *rscrn, int packet)
return cmd.u;
}
-static INLINE uint32_t cmdcpdelay(struct radeon_screen *rscrn,
+static INLINE uint32_t cmdcpdelay(struct radeon_screen *rscrn,
unsigned short count)
{
drm_r300_cmd_header_t cmd;
@@ -216,8 +216,6 @@ void static INLINE cp_wait(radeonContextPtr radeon, unsigned char flags)
}
}
-extern GLboolean r300EmitArrays(GLcontext * ctx);
-
extern int r300PrimitiveType(r300ContextPtr rmesa, int prim);
extern int r300NumVerts(r300ContextPtr rmesa, int num_verts, int prim);
diff --git a/src/mesa/drivers/dri/r300/r300_render.c b/src/mesa/drivers/dri/r300/r300_render.c
index 08d67b73edc..22b0d316cfd 100644
--- a/src/mesa/drivers/dri/r300/r300_render.c
+++ b/src/mesa/drivers/dri/r300/r300_render.c
@@ -382,37 +382,6 @@ void r300RunRenderPrimitive(GLcontext * ctx, int start, int end, int prim)
COMMIT_BATCH();
}
-static void r300RunRender(GLcontext * ctx, struct tnl_pipeline_stage *stage)
-{
- r300ContextPtr rmesa = R300_CONTEXT(ctx);
- int i;
- TNLcontext *tnl = TNL_CONTEXT(ctx);
- struct vertex_buffer *vb = &tnl->vb;
-
- if (RADEON_DEBUG & DEBUG_PRIMS)
- fprintf(stderr, "%s\n", __FUNCTION__);
-
- r300UpdateShaders(rmesa);
- r300EmitArrays(ctx);
-
- r300UpdateShaderStates(rmesa);
-
- r300EmitCacheFlush(rmesa);
- radeonEmitState(&rmesa->radeon);
-
- for (i = 0; i < vb->PrimitiveCount; i++) {
- GLuint prim = _tnl_translate_prim(&vb->Primitive[i]);
- GLuint start = vb->Primitive[i].start;
- GLuint end = vb->Primitive[i].start + vb->Primitive[i].count;
- r300RunRenderPrimitive(ctx, start, end, prim);
- }
-
- r300EmitCacheFlush(rmesa);
-
- radeonReleaseArrays(ctx, ~0);
-}
-
-
static const char *getFallbackString(uint32_t bit)
{
switch (bit) {
@@ -449,7 +418,7 @@ void r300SwitchFallback(GLcontext *ctx, uint32_t bit, GLboolean mode)
r300ContextPtr rmesa = R300_CONTEXT(ctx);
uint32_t old_fallback = rmesa->fallback;
static uint32_t fallback_warn = 0;
-
+
if (mode) {
if ((fallback_warn & bit) == 0) {
if (RADEON_DEBUG & DEBUG_FALLBACKS)
@@ -470,7 +439,7 @@ void r300SwitchFallback(GLcontext *ctx, uint32_t bit, GLboolean mode)
/* update only if we change from no raster fallbacks to some raster fallbacks */
if (((old_fallback & R300_RASTER_FALLBACK_MASK) == 0) &&
((bit & R300_RASTER_FALLBACK_MASK) > 0)) {
-
+
radeon_firevertices(&rmesa->radeon);
rmesa->radeon.swtcl.RenderIndex = ~0;
_swsetup_Wakeup( ctx );
@@ -489,7 +458,7 @@ void r300SwitchFallback(GLcontext *ctx, uint32_t bit, GLboolean mode)
/* update only if we have disabled all raster fallbacks */
if ((old_fallback & R300_RASTER_FALLBACK_MASK) == bit) {
_swrast_flush( ctx );
-
+
tnl->Driver.Render.Start = r300RenderStart;
tnl->Driver.Render.Finish = r300RenderFinish;
tnl->Driver.Render.PrimitiveNotify = r300RenderPrimitive;
@@ -497,38 +466,10 @@ void r300SwitchFallback(GLcontext *ctx, uint32_t bit, GLboolean mode)
tnl->Driver.Render.BuildVertices = _tnl_build_vertices;
tnl->Driver.Render.CopyPV = _tnl_copy_pv;
tnl->Driver.Render.Interp = _tnl_interp;
-
+
_tnl_invalidate_vertex_state( ctx, ~0 );
_tnl_invalidate_vertices( ctx, ~0 );
}
}
-
-}
-
-static GLboolean r300RunNonTCLRender(GLcontext * ctx,
- struct tnl_pipeline_stage *stage)
-{
- r300ContextPtr rmesa = R300_CONTEXT(ctx);
-
- if (RADEON_DEBUG & DEBUG_PRIMS)
- fprintf(stderr, "%s\n", __FUNCTION__);
-
- if (rmesa->fallback & R300_RASTER_FALLBACK_MASK)
- return GL_TRUE;
- if (rmesa->options.hw_tcl_enabled == GL_FALSE)
- return GL_TRUE;
-
- r300RunRender(ctx, stage);
-
- return GL_FALSE;
}
-
-const struct tnl_pipeline_stage _r300_render_stage = {
- "r300 Hardware Rasterization",
- NULL,
- NULL,
- NULL,
- NULL,
- r300RunNonTCLRender
-};