diff options
-rw-r--r-- | src/gallium/drivers/nvfx/nv04_surface_2d.c | 1 | ||||
-rw-r--r-- | src/gallium/drivers/nvfx/nv04_surface_2d.h | 2 | ||||
-rw-r--r-- | src/gallium/drivers/nvfx/nvfx_buffer.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/nvfx/nvfx_resource.h | 2 |
4 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/nvfx/nv04_surface_2d.c b/src/gallium/drivers/nvfx/nv04_surface_2d.c index 7acbb505df3..cd0f4ce4c93 100644 --- a/src/gallium/drivers/nvfx/nv04_surface_2d.c +++ b/src/gallium/drivers/nvfx/nv04_surface_2d.c @@ -8,6 +8,7 @@ #include "nouveau/nouveau_util.h" #include "nouveau/nouveau_screen.h" #include "nv04_surface_2d.h" +#include "nvfx_resource.h" static INLINE int nv04_surface_format(enum pipe_format format) diff --git a/src/gallium/drivers/nvfx/nv04_surface_2d.h b/src/gallium/drivers/nvfx/nv04_surface_2d.h index 2123c3ed08b..b9020dbe961 100644 --- a/src/gallium/drivers/nvfx/nv04_surface_2d.h +++ b/src/gallium/drivers/nvfx/nv04_surface_2d.h @@ -38,6 +38,4 @@ nv04_surface_2d_takedown(struct nv04_surface_2d **); struct nv04_surface* nv04_surface_wrap_for_render(struct pipe_screen *pscreen, struct nv04_surface_2d* eng2d, struct nv04_surface* ns); -#define NVFX_RESOURCE_FLAG_LINEAR (PIPE_RESOURCE_FLAG_DRV_PRIV << 0) - #endif diff --git a/src/gallium/drivers/nvfx/nvfx_buffer.c b/src/gallium/drivers/nvfx/nvfx_buffer.c index 05b824b8f74..4482d9683ed 100644 --- a/src/gallium/drivers/nvfx/nvfx_buffer.c +++ b/src/gallium/drivers/nvfx/nvfx_buffer.c @@ -97,6 +97,7 @@ nvfx_buffer_create(struct pipe_screen *pscreen, return NULL; buffer->base = *template; + buffer->base.flags |= NVFX_RESOURCE_FLAG_LINEAR; buffer->vtbl = &nvfx_buffer_vtbl; pipe_reference_init(&buffer->base.reference, 1); buffer->base.screen = pscreen; @@ -132,6 +133,7 @@ nvfx_user_buffer_create(struct pipe_screen *pscreen, pipe_reference_init(&buffer->base.reference, 1); buffer->vtbl = &nvfx_buffer_vtbl; + buffer->base.flags = NVFX_RESOURCE_FLAG_LINEAR; buffer->base.screen = pscreen; buffer->base.format = PIPE_FORMAT_R8_UNORM; buffer->base.usage = PIPE_USAGE_IMMUTABLE; diff --git a/src/gallium/drivers/nvfx/nvfx_resource.h b/src/gallium/drivers/nvfx/nvfx_resource.h index a68c14cf3fb..d28bfab9615 100644 --- a/src/gallium/drivers/nvfx/nvfx_resource.h +++ b/src/gallium/drivers/nvfx/nvfx_resource.h @@ -20,6 +20,8 @@ struct nvfx_resource { struct nouveau_bo *bo; }; +#define NVFX_RESOURCE_FLAG_LINEAR (PIPE_RESOURCE_FLAG_DRV_PRIV << 0) + #define NVFX_MAX_TEXTURE_LEVELS 16 struct nvfx_miptree { |