summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/r300_cmdbuf.c
diff options
context:
space:
mode:
authorNicolai Haehnle <prefect_@gmx.net>2004-11-02 13:06:45 +0000
committerNicolai Haehnle <prefect_@gmx.net>2004-11-02 13:06:45 +0000
commit2302cc1a25f7ab55b7e7d6647175308cd64ab7f1 (patch)
tree8ece05fc8a5c48d3f0c4927f081a8a54f2dea4da /src/mesa/drivers/dri/r300/r300_cmdbuf.c
parentb187341e63f417c191b5d13be6b76cbd63555802 (diff)
No visible changes, but commit the groundwork for further experiments:
- Install custom (though inactive) pipeline - Track depth test and culling state in hardware registers
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_cmdbuf.c')
-rw-r--r--src/mesa/drivers/dri/r300/r300_cmdbuf.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_cmdbuf.c b/src/mesa/drivers/dri/r300/r300_cmdbuf.c
index 7bf2df5a8e..580c5145a7 100644
--- a/src/mesa/drivers/dri/r300/r300_cmdbuf.c
+++ b/src/mesa/drivers/dri/r300/r300_cmdbuf.c
@@ -50,6 +50,10 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "r300_cmdbuf.h"
+// Set this to 1 for extremely verbose debugging of command buffers
+#define DEBUG_CMDBUF 0
+
+
/**
* Send the current command buffer via ioctl to the hardware.
*/
@@ -69,7 +73,7 @@ int r300FlushCmdBuf(r300ContextPtr r300, const char* caller)
fprintf(stderr, "%s from %s - %i cliprects\n",
__FUNCTION__, caller, r300->radeon.numClipRects);
- if (RADEON_DEBUG & DEBUG_VERBOSE)
+ if (DEBUG_CMDBUF && RADEON_DEBUG & DEBUG_VERBOSE)
for (i = start; i < r300->cmdbuf.count_used; ++i)
fprintf(stderr, "%d: %08x\n", i,
r300->cmdbuf.cmd_buf[i]);
@@ -140,7 +144,7 @@ static __inline__ void r300DoEmitState(r300ContextPtr r300, GLboolean dirty)
dest = r300->cmdbuf.cmd_buf + r300->cmdbuf.count_used;
- if (RADEON_DEBUG & DEBUG_STATE) {
+ if (DEBUG_CMDBUF && RADEON_DEBUG & DEBUG_STATE) {
foreach(atom, &r300->hw.atomlist) {
if ((atom->dirty || r300->hw.all_dirty) == dirty) {
int dwords = (*atom->check)(r300, atom);
@@ -324,8 +328,10 @@ void r300InitCmdBuf(r300ContextPtr r300)
r300->hw.unk4288.cmd[0] = cmducs(0x4288, 5);
ALLOC_STATE( unk42A0, always, 2, "unk42A0", 0 );
r300->hw.unk42A0.cmd[0] = cmducs(0x42A0, 1);
- ALLOC_STATE( unk42B4, always, 3, "unk42B4", 0 );
- r300->hw.unk42B4.cmd[0] = cmducs(0x42B4, 2);
+ ALLOC_STATE( unk42B4, always, 2, "unk42B4", 0 );
+ r300->hw.unk42B4.cmd[0] = cmducs(0x42B4, 1);
+ ALLOC_STATE( cul, always, R300_CUL_CMDSIZE, "cul", 0 );
+ r300->hw.cul.cmd[R300_CUL_CMD_0] = cmducs(R300_RE_CULL_CNTL, 1);
ALLOC_STATE( unk42C0, always, 3, "unk42C0", 0 );
r300->hw.unk42C0.cmd[0] = cmducs(0x42C0, 2);
ALLOC_STATE( rc, always, R300_RC_CMDSIZE, "rc", 0 );
@@ -428,6 +434,7 @@ void r300InitCmdBuf(r300ContextPtr r300)
insert_at_tail(&r300->hw.atomlist, &r300->hw.unk4288);
insert_at_tail(&r300->hw.atomlist, &r300->hw.unk42A0);
insert_at_tail(&r300->hw.atomlist, &r300->hw.unk42B4);
+ insert_at_tail(&r300->hw.atomlist, &r300->hw.cul);
insert_at_tail(&r300->hw.atomlist, &r300->hw.unk42C0);
insert_at_tail(&r300->hw.atomlist, &r300->hw.rc);
insert_at_tail(&r300->hw.atomlist, &r300->hw.ri);