projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
i965: Mostly fix glsl-max-varyings.
[mesa.git]
/
src
/
mesa
/
drivers
/
dri
/
r300
/
r300_render.c
diff --git
a/src/mesa/drivers/dri/r300/r300_render.c
b/src/mesa/drivers/dri/r300/r300_render.c
index e1a6fae57f380c326fc73e5119689a5ff01518b5..bb8f91491f556dddf00e2c64bcf6a9327b44cc88 100644
(file)
--- a/
src/mesa/drivers/dri/r300/r300_render.c
+++ b/
src/mesa/drivers/dri/r300/r300_render.c
@@
-53,7
+53,6
@@
USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "r300_render.h"
#include "main/glheader.h"
#include "r300_render.h"
#include "main/glheader.h"
-#include "main/state.h"
#include "main/imports.h"
#include "main/enums.h"
#include "main/macros.h"
#include "main/imports.h"
#include "main/enums.h"
#include "main/macros.h"
@@
-65,17
+64,10
@@
USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "swrast_setup/swrast_setup.h"
#include "vbo/vbo.h"
#include "vbo/vbo_split.h"
#include "swrast_setup/swrast_setup.h"
#include "vbo/vbo.h"
#include "vbo/vbo_split.h"
-#include "tnl/tnl.h"
-#include "tnl/t_vp_build.h"
-#include "radeon_reg.h"
-#include "radeon_macros.h"
#include "r300_context.h"
#include "r300_context.h"
-#include "r300_ioctl.h"
#include "r300_state.h"
#include "r300_reg.h"
#include "r300_state.h"
#include "r300_reg.h"
-#include "r300_tex.h"
#include "r300_emit.h"
#include "r300_emit.h"
-#include "r300_fragprog_common.h"
#include "r300_swtcl.h"
/**
#include "r300_swtcl.h"
/**
@@
-221,7
+213,7
@@
static void r300EmitAOS(r300ContextPtr rmesa, GLuint nr, GLuint offset)
int sz = 1 + (nr >> 1) * 3 + (nr & 1) * 2;
int i;
int sz = 1 + (nr >> 1) * 3 + (nr & 1) * 2;
int i;
- if (RADEON_DEBUG &
DEBUG
_VERTS)
+ if (RADEON_DEBUG &
RADEON
_VERTS)
fprintf(stderr, "%s: nr=%d, ofs=0x%08x\n", __FUNCTION__, nr,
offset);
fprintf(stderr, "%s: nr=%d, ofs=0x%08x\n", __FUNCTION__, nr,
offset);
@@
-341,12
+333,6
@@
void r300RunRenderPrimitive(GLcontext * ctx, int start, int end, int prim)
if (type < 0 || num_verts <= 0)
return;
if (type < 0 || num_verts <= 0)
return;
- /* Make space for at least 128 dwords.
- * This is supposed to ensure that we can get all rendering
- * commands into a single command buffer.
- */
- rcommonEnsureCmdBufSpace(&rmesa->radeon, 128, __FUNCTION__);
-
if (rmesa->ind_buf.bo) {
GLuint first, incr, offset = 0;
if (rmesa->ind_buf.bo) {
GLuint first, incr, offset = 0;
@@
-396,10
+382,18
@@
void r300RunRenderPrimitive(GLcontext * ctx, int start, int end, int prim)
GLuint first, incr, offset = 0;
if (!split_prim_inplace(prim & PRIM_MODE_MASK, &first, &incr) &&
GLuint first, incr, offset = 0;
if (!split_prim_inplace(prim & PRIM_MODE_MASK, &first, &incr) &&
- num_verts > 655
00
) {
+ num_verts > 655
35
) {
WARN_ONCE("Fixme: can't handle spliting prim %d\n", prim);
return;
}
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;
r300_emit_scissor(rmesa->radeon.glCtx);
while (num_verts > 0) {
int nr;
@@
-414,8
+408,9
@@
void r300RunRenderPrimitive(GLcontext * ctx, int start, int end, int prim)
COMMIT_BATCH();
}
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";
switch (bit) {
case R300_FALLBACK_VERTEX_PROGRAM :
return "vertex program";
@@
-435,6
+430,9
@@
static const char *getFallbackString(uint32_t bit)
return "render mode != GL_RENDER";
case R300_FALLBACK_FRAGMENT_PROGRAM:
return "fragment program";
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:
case R300_FALLBACK_AOS_LIMIT:
return "aos limit";
case R300_FALLBACK_INVALID_BUFFERS:
@@
-453,8
+451,8
@@
void r300SwitchFallback(GLcontext *ctx, uint32_t bit, GLboolean mode)
if (mode) {
if ((fallback_warn & bit) == 0) {
if (mode) {
if ((fallback_warn & bit) == 0) {
- if (RADEON_DEBUG &
DEBUG
_FALLBACKS)
-
_mesa_fprintf(stderr, "WARNING! Falling back to software for %s\n", getFallbackString(
bit));
+ if (RADEON_DEBUG &
RADEON
_FALLBACKS)
+
fprintf(stderr, "WARNING! Falling back to software for %s\n", getFallbackString(rmesa,
bit));
fallback_warn |= bit;
}
rmesa->fallback |= bit;
fallback_warn |= bit;
}
rmesa->fallback |= bit;
@@
-481,7
+479,7
@@
void r300SwitchFallback(GLcontext *ctx, uint32_t bit, GLboolean mode)
/* update only if we have disabled all tcl fallbacks */
if (rmesa->options.hw_tcl_enabled) {
/* update only if we have disabled all tcl fallbacks */
if (rmesa->options.hw_tcl_enabled) {
- if ((old_fallback & R300_
RASTER
_FALLBACK_MASK) == bit) {
+ if ((old_fallback & R300_
TCL
_FALLBACK_MASK) == bit) {
R300_STATECHANGE(rmesa, vap_cntl_status);
rmesa->hw.vap_cntl_status.cmd[1] &= ~R300_VAP_TCL_BYPASS;
}
R300_STATECHANGE(rmesa, vap_cntl_status);
rmesa->hw.vap_cntl_status.cmd[1] &= ~R300_VAP_TCL_BYPASS;
}