diff options
author | Jerome Glisse <glisse@freedesktop.org> | 2008-11-12 14:02:57 +0100 |
---|---|---|
committer | Jerome Glisse <glisse@freedesktop.org> | 2008-11-14 11:26:17 +0100 |
commit | d07d1379314c9222ccb955244fa7e56bd4d03d6d (patch) | |
tree | 52a160ce9b95d02b6d28aa1f774962cfe59c9fae /src/mesa/drivers/dri/r300/r300_cmdbuf.c | |
parent | 3b43c28195ffce79822728b546a707ee14a03320 (diff) |
r300: SetTex extension support
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_cmdbuf.c')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_cmdbuf.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_cmdbuf.c b/src/mesa/drivers/dri/r300/r300_cmdbuf.c index dbb7761b3b..9552778f54 100644 --- a/src/mesa/drivers/dri/r300/r300_cmdbuf.c +++ b/src/mesa/drivers/dri/r300/r300_cmdbuf.c @@ -74,14 +74,16 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ int r300FlushCmdBufLocked(r300ContextPtr r300, const char *caller) { - int ret; + int ret = 0; if (r300->cmdbuf.flushing) { fprintf(stderr, "Recursive call into r300FlushCmdBufLocked!\n"); exit(-1); } r300->cmdbuf.flushing = 1; - ret = radeon_cs_emit(r300->cmdbuf.cs); + if (r300->cmdbuf.cs->cdw) { + ret = radeon_cs_emit(r300->cmdbuf.cs); + } radeon_cs_erase(r300->cmdbuf.cs); r300->cmdbuf.flushing = 0; return ret; @@ -299,7 +301,11 @@ static void emit_tex_offsets(r300ContextPtr r300, struct r300_state_atom * atom) } else if (!t) { OUT_BATCH(r300->radeon.radeonScreen->texOffset[0]); } else { - OUT_BATCH(t->override_offset); + if (t->bo) { + OUT_BATCH_RELOC(t->tile_bits, t->bo, 0, 0); + } else { + OUT_BATCH(t->override_offset); + } } END_BATCH(); } |