Mesa (master): nvc0: identify VERTEX_QUARANTINE

Christoph Bumiller chrisbmr at kemper.freedesktop.org
Sun Mar 13 12:25:28 UTC 2011


Module: Mesa
Branch: master
Commit: 0abaaac87238c7b9ffd4dc4aacfd30f24da64a41
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0abaaac87238c7b9ffd4dc4aacfd30f24da64a41

Author: Christoph Bumiller <e0425955 at student.tuwien.ac.at>
Date:   Fri Mar 11 11:03:33 2011 +0100

nvc0: identify VERTEX_QUARANTINE

Well, not sure what exactly it is, but it certainly doesn't contain
the control flow stack, but vertex data.

Not sure about size, I've only seen the first few KiB written, but
the binary driver seems to allocate more.

---

 src/gallium/drivers/nvc0/nvc0_3d.xml.h |    9 +++++++++
 src/gallium/drivers/nvc0/nvc0_screen.c |   14 +++++++-------
 src/gallium/drivers/nvc0/nvc0_screen.h |    2 +-
 3 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/src/gallium/drivers/nvc0/nvc0_3d.xml.h b/src/gallium/drivers/nvc0/nvc0_3d.xml.h
index 5857f7c..94fa081 100644
--- a/src/gallium/drivers/nvc0/nvc0_3d.xml.h
+++ b/src/gallium/drivers/nvc0/nvc0_3d.xml.h
@@ -927,6 +927,15 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 #define NVC0_3D_ZETA_BASE_LAYER					0x0000179c
 
+#define NVC0_3D_VERTEX_QUARANTINE_ADDRESS_HIGH			0x000017bc
+
+#define NVC0_3D_VERTEX_QUARANTINE_ADDRESS_LOW			0x000017c0
+
+#define NVC0_3D_VERTEX_QUARANTINE_SIZE				0x000017c4
+#define NVC0_3D_VERTEX_QUARANTINE_SIZE_16K			0x00000001
+#define NVC0_3D_VERTEX_QUARANTINE_SIZE_32K			0x00000002
+#define NVC0_3D_VERTEX_QUARANTINE_SIZE_64K			0x00000003
+
 #define NVC0_3D_STRMOUT_UNK1780(i0)			       (0x00001780 + 0x4*(i0))
 #define NVC0_3D_STRMOUT_UNK1780__ESIZE				0x00000004
 #define NVC0_3D_STRMOUT_UNK1780__LEN				0x00000004
diff --git a/src/gallium/drivers/nvc0/nvc0_screen.c b/src/gallium/drivers/nvc0/nvc0_screen.c
index 675bbe0..1047ba3 100644
--- a/src/gallium/drivers/nvc0/nvc0_screen.c
+++ b/src/gallium/drivers/nvc0/nvc0_screen.c
@@ -207,7 +207,7 @@ nvc0_screen_destroy(struct pipe_screen *pscreen)
    nouveau_bo_ref(NULL, &screen->tls);
    nouveau_bo_ref(NULL, &screen->txc);
    nouveau_bo_ref(NULL, &screen->fence.bo);
-   nouveau_bo_ref(NULL, &screen->mp_stack_bo);
+   nouveau_bo_ref(NULL, &screen->vfetch_cache);
 
    nouveau_resource_destroy(&screen->text_heap);
 
@@ -496,14 +496,14 @@ nvc0_screen_create(struct pipe_winsys *ws, struct nouveau_device *dev)
    OUT_RING  (chan, 0);
 
    ret = nouveau_bo_new(dev, NOUVEAU_BO_VRAM, 1 << 17, 1 << 20,
-                        &screen->mp_stack_bo);
+                        &screen->vfetch_cache);
    if (ret)
       goto fail;
 
-   BEGIN_RING(chan, RING_3D_(0x17bc), 3);
-   OUT_RELOCh(chan, screen->mp_stack_bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR);
-   OUT_RELOCl(chan, screen->mp_stack_bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR);
-   OUT_RING  (chan, 1);
+   BEGIN_RING(chan, RING_3D(VERTEX_QUARANTINE_ADDRESS_HIGH), 3);
+   OUT_RELOCh(chan, screen->vfetch_cache, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR);
+   OUT_RELOCl(chan, screen->vfetch_cache, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR);
+   OUT_RING  (chan, 3);
 
    ret = nouveau_bo_new(dev, NOUVEAU_BO_VRAM, 1 << 17, 1 << 17, &screen->txc);
    if (ret)
@@ -635,7 +635,7 @@ nvc0_screen_make_buffers_resident(struct nvc0_screen *screen)
    nouveau_bo_validate(chan, screen->text, flags);
    nouveau_bo_validate(chan, screen->uniforms, flags);
    nouveau_bo_validate(chan, screen->txc, flags);
-   nouveau_bo_validate(chan, screen->mp_stack_bo, flags);
+   nouveau_bo_validate(chan, screen->vfetch_cache, flags);
 
    if (screen->cur_ctx && screen->cur_ctx->state.tls_required)
       nouveau_bo_validate(chan, screen->tls, flags);
diff --git a/src/gallium/drivers/nvc0/nvc0_screen.h b/src/gallium/drivers/nvc0/nvc0_screen.h
index 81f404a..94bf0cf 100644
--- a/src/gallium/drivers/nvc0/nvc0_screen.h
+++ b/src/gallium/drivers/nvc0/nvc0_screen.h
@@ -26,7 +26,7 @@ struct nvc0_screen {
    struct nouveau_bo *uniforms;
    struct nouveau_bo *tls;
    struct nouveau_bo *txc; /* TIC (offset 0) and TSC (65536) */
-   struct nouveau_bo *mp_stack_bo;
+   struct nouveau_bo *vfetch_cache;
 
    uint64_t tls_size;
 




More information about the mesa-commit mailing list