aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r300
diff options
context:
space:
mode:
authorMaciej Cencora <[email protected]>2010-04-11 14:12:13 +0200
committerMaciej Cencora <[email protected]>2010-04-11 14:12:13 +0200
commit0203136e69bfa711edd69a4f69c4539cd877b5cb (patch)
tree14eec197edc1e66d24849b25c0eb537a94355e6d /src/mesa/drivers/dri/r300
parent948e9f7c887158835c82881c73d4f728937d19f7 (diff)
parent2657325c4a73a2bfa94888a936d06466000e7fbf (diff)
Merge commit 'origin/7.8'
Diffstat (limited to 'src/mesa/drivers/dri/r300')
-rw-r--r--src/mesa/drivers/dri/r300/r300_context.c3
-rw-r--r--src/mesa/drivers/dri/r300/r300_render.c16
-rw-r--r--src/mesa/drivers/dri/r300/r300_render.h1
3 files changed, 18 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_context.c b/src/mesa/drivers/dri/r300/r300_context.c
index cfeb5407e91..4dce454c3a7 100644
--- a/src/mesa/drivers/dri/r300/r300_context.c
+++ b/src/mesa/drivers/dri/r300/r300_context.c
@@ -61,6 +61,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "r300_state.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"
@@ -226,6 +227,8 @@ static void r300_fallback(GLcontext *ctx, GLuint bit, GLboolean mode)
r300->radeon.Fallback |= bit;
else
r300->radeon.Fallback &= ~bit;
+
+ r300SwitchFallback(ctx, R300_FALLBACK_RADEON_COMMON, mode);
}
static void r300_emit_query_finish(radeonContextPtr radeon)
diff --git a/src/mesa/drivers/dri/r300/r300_render.c b/src/mesa/drivers/dri/r300/r300_render.c
index 95961314863..bb8f91491f5 100644
--- a/src/mesa/drivers/dri/r300/r300_render.c
+++ b/src/mesa/drivers/dri/r300/r300_render.c
@@ -386,6 +386,14 @@ void r300RunRenderPrimitive(GLcontext * ctx, int start, int end, int prim)
WARN_ONCE("Fixme: can't handle spliting prim %d\n", prim);
return;
}
+
+ if (rmesa->radeon.radeonScreen->kernel_mm) {
+ BEGIN_BATCH_NO_AUTOSTATE(2);
+ OUT_BATCH_REGSEQ(R300_VAP_VF_MAX_VTX_INDX, 1);
+ OUT_BATCH(rmesa->radeon.tcl.aos[0].count);
+ END_BATCH();
+ }
+
r300_emit_scissor(rmesa->radeon.glCtx);
while (num_verts > 0) {
int nr;
@@ -400,8 +408,9 @@ void r300RunRenderPrimitive(GLcontext * ctx, int start, int end, int prim)
COMMIT_BATCH();
}
-static const char *getFallbackString(uint32_t bit)
+static const char *getFallbackString(r300ContextPtr rmesa, uint32_t bit)
{
+ static char common_fallback_str[32];
switch (bit) {
case R300_FALLBACK_VERTEX_PROGRAM :
return "vertex program";
@@ -421,6 +430,9 @@ static const char *getFallbackString(uint32_t bit)
return "render mode != GL_RENDER";
case R300_FALLBACK_FRAGMENT_PROGRAM:
return "fragment program";
+ case R300_FALLBACK_RADEON_COMMON:
+ snprintf(common_fallback_str, 32, "radeon common 0x%08x", rmesa->radeon.Fallback);
+ return common_fallback_str;
case R300_FALLBACK_AOS_LIMIT:
return "aos limit";
case R300_FALLBACK_INVALID_BUFFERS:
@@ -440,7 +452,7 @@ void r300SwitchFallback(GLcontext *ctx, uint32_t bit, GLboolean mode)
if (mode) {
if ((fallback_warn & bit) == 0) {
if (RADEON_DEBUG & RADEON_FALLBACKS)
- fprintf(stderr, "WARNING! Falling back to software for %s\n", getFallbackString(bit));
+ fprintf(stderr, "WARNING! Falling back to software for %s\n", getFallbackString(rmesa, bit));
fallback_warn |= bit;
}
rmesa->fallback |= bit;
diff --git a/src/mesa/drivers/dri/r300/r300_render.h b/src/mesa/drivers/dri/r300/r300_render.h
index ec785474a67..581e9fa0ccd 100644
--- a/src/mesa/drivers/dri/r300/r300_render.h
+++ b/src/mesa/drivers/dri/r300/r300_render.h
@@ -41,6 +41,7 @@
#define R300_FALLBACK_STENCIL_TWOSIDE (1 << 21)
#define R300_FALLBACK_RENDER_MODE (1 << 22)
#define R300_FALLBACK_FRAGMENT_PROGRAM (1 << 23)
+#define R300_FALLBACK_RADEON_COMMON (1 << 29)
#define R300_FALLBACK_AOS_LIMIT (1 << 30)
#define R300_FALLBACK_INVALID_BUFFERS (1 << 31)
#define R300_RASTER_FALLBACK_MASK 0xffff0000