diff options
Diffstat (limited to 'src/gallium/drivers/nouveau')
-rw-r--r-- | src/gallium/drivers/nouveau/nouveau_screen.c | 12 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nouveau_screen.h | 5 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nouveau_winsys.h | 3 |
3 files changed, 9 insertions, 11 deletions
diff --git a/src/gallium/drivers/nouveau/nouveau_screen.c b/src/gallium/drivers/nouveau/nouveau_screen.c index a0bbc3e38d7..233a91a2ffd 100644 --- a/src/gallium/drivers/nouveau/nouveau_screen.c +++ b/src/gallium/drivers/nouveau/nouveau_screen.c @@ -44,14 +44,10 @@ nouveau_screen_bo_new(struct pipe_screen *pscreen, unsigned alignment, uint32_t flags = NOUVEAU_BO_MAP, tile_mode = 0, tile_flags = 0; int ret; - if (bind & PIPE_BIND_VERTEX_BUFFER) { - if (pscreen->get_param(pscreen, NOUVEAU_CAP_HW_VTXBUF)) - flags |= NOUVEAU_BO_GART; - } else - if (usage & PIPE_BIND_INDEX_BUFFER) { - if (pscreen->get_param(pscreen, NOUVEAU_CAP_HW_IDXBUF)) - flags |= NOUVEAU_BO_GART; - } + if (bind & PIPE_BIND_VERTEX_BUFFER) + flags |= nouveau_screen(pscreen)->vertex_buffer_flags; + else if (bind & PIPE_BIND_INDEX_BUFFER) + flags |= nouveau_screen(pscreen)->index_buffer_flags; if (bind & (PIPE_BIND_RENDER_TARGET | PIPE_BIND_DEPTH_STENCIL | diff --git a/src/gallium/drivers/nouveau/nouveau_screen.h b/src/gallium/drivers/nouveau/nouveau_screen.h index f32ecd0b69b..747fd15acdd 100644 --- a/src/gallium/drivers/nouveau/nouveau_screen.h +++ b/src/gallium/drivers/nouveau/nouveau_screen.h @@ -5,6 +5,11 @@ struct nouveau_screen { struct pipe_screen base; struct nouveau_device *device; struct nouveau_channel *channel; + + /* note that OpenGL doesn't distinguish between these, so + * these almost always should be set to the same value */ + unsigned vertex_buffer_flags; + unsigned index_buffer_flags; }; static inline struct nouveau_screen * diff --git a/src/gallium/drivers/nouveau/nouveau_winsys.h b/src/gallium/drivers/nouveau/nouveau_winsys.h index b144bef5e61..cd7da9977d8 100644 --- a/src/gallium/drivers/nouveau/nouveau_winsys.h +++ b/src/gallium/drivers/nouveau/nouveau_winsys.h @@ -13,9 +13,6 @@ #include "nouveau/nouveau_resource.h" #include "nouveau/nouveau_pushbuf.h" -#define NOUVEAU_CAP_HW_VTXBUF (0xbeef0000) -#define NOUVEAU_CAP_HW_IDXBUF (0xbeef0001) - static inline uint32_t nouveau_screen_transfer_flags(unsigned pipe) { |