#define NV04_PFIFO_MAX_PACKET_LEN 2047
#endif
-#define NOUVEAU_RESOURCE_FLAG_LINEAR (PIPE_RESOURCE_FLAG_DRV_PRIV << 0)
+#define NOUVEAU_RESOURCE_FLAG_LINEAR (PIPE_RESOURCE_FLAG_DRV_PRIV << 0)
+#define NOUVEAU_RESOURCE_FLAG_DRV_PRIV (PIPE_RESOURCE_FLAG_DRV_PRIV << 1)
static INLINE uint32_t
nouveau_screen_transfer_flags(unsigned pipe)
if(pt->height0 <= 1 || util_format_is_compressed(sv->base.format))
sv->u.nv30.rect = -1;
else
- sv->u.nv30.rect = !!(pt->flags & NVFX_RESOURCE_FLAG_LINEAR);
+ sv->u.nv30.rect = !!(pt->flags & NOUVEAU_RESOURCE_FLAG_LINEAR);
sv->lod_offset = sv->base.u.tex.first_level - level;
sv->max_lod_limit = sv->base.u.tex.last_level - level;
return NULL;
buffer->base.base = *template;
- buffer->base.base.flags |= NVFX_RESOURCE_FLAG_LINEAR;
+ buffer->base.base.flags |= NOUVEAU_RESOURCE_FLAG_LINEAR;
pipe_reference_init(&buffer->base.base.reference, 1);
buffer->base.base.screen = pscreen;
buffer->size = util_format_get_stride(template->format, template->width0);
return NULL;
pipe_reference_init(&buffer->base.base.reference, 1);
- buffer->base.base.flags = NVFX_RESOURCE_FLAG_LINEAR | NVFX_RESOURCE_FLAG_USER;
+ buffer->base.base.flags =
+ NOUVEAU_RESOURCE_FLAG_LINEAR | NVFX_RESOURCE_FLAG_USER;
buffer->base.base.screen = pscreen;
buffer->base.base.format = PIPE_FORMAT_R8_UNORM;
buffer->base.base.usage = PIPE_USAGE_IMMUTABLE;
|| util_format_is_compressed(pt->format)
|| no_swizzle
)
- mt->base.base.flags |= NVFX_RESOURCE_FLAG_LINEAR;
+ mt->base.base.flags |= NOUVEAU_RESOURCE_FLAG_LINEAR;
/* non compressed formats with uniform pitch must be linear, and vice versa */
if(!util_format_is_s3tc(pt->format)
- && (uniform_pitch || mt->base.base.flags & NVFX_RESOURCE_FLAG_LINEAR))
+ && (uniform_pitch || mt->base.base.flags & NOUVEAU_RESOURCE_FLAG_LINEAR))
{
- mt->base.base.flags |= NVFX_RESOURCE_FLAG_LINEAR;
+ mt->base.base.flags |= NOUVEAU_RESOURCE_FLAG_LINEAR;
uniform_pitch = 1;
}
unsigned stride;
if(whandle->stride) {
mt->linear_pitch = whandle->stride;
- mt->base.base.flags |= NVFX_RESOURCE_FLAG_LINEAR;
+ mt->base.base.flags |= NOUVEAU_RESOURCE_FLAG_LINEAR;
} else
nvfx_miptree_choose_format(mt);
return (struct nvfx_resource *)resource;
}
-#define NVFX_RESOURCE_FLAG_LINEAR (PIPE_RESOURCE_FLAG_DRV_PRIV << 0)
-#define NVFX_RESOURCE_FLAG_USER (PIPE_RESOURCE_FLAG_DRV_PRIV << 1)
+#define NVFX_RESOURCE_FLAG_USER (NOUVEAU_RESOURCE_FLAG_DRV_PRIV << 0)
/* is resource mapped into the GPU's address space (i.e. VRAM or GART) ? */
static INLINE boolean
nvfx_surface_linear_renderable(struct pipe_surface* surf)
{
/* TODO: precompute this in nvfx_surface creation */
- return (surf->texture->flags & NVFX_RESOURCE_FLAG_LINEAR)
+ return (surf->texture->flags & NOUVEAU_RESOURCE_FLAG_LINEAR)
&& !(((struct nvfx_surface*)surf)->offset & 63)
&& !(((struct nvfx_surface*)surf)->pitch & 63);
}
rgn->bo = ((struct nvfx_resource*)surf->base.base.texture)->bo;
rgn->offset = surf->offset;
- if(surf->base.base.texture->flags & NVFX_RESOURCE_FLAG_LINEAR)
+ if(surf->base.base.texture->flags & NOUVEAU_RESOURCE_FLAG_LINEAR)
rgn->pitch = surf->pitch;
else
{
rgn->x = x;
rgn->y = y;
- if(pt->flags & NVFX_RESOURCE_FLAG_LINEAR)
+ if(pt->flags & NOUVEAU_RESOURCE_FLAG_LINEAR)
{
rgn->pitch = nvfx_subresource_pitch(pt, level);
rgn->z = 0;
template.height0 = surf->height;
template.depth0 = 1;
template.nr_samples = surf->texture->nr_samples;
- template.flags = NVFX_RESOURCE_FLAG_LINEAR;
+ template.flags = NOUVEAU_RESOURCE_FLAG_LINEAR;
assert(!ns->temp && !util_dirty_surface_is_dirty(&ns->base));
else
{
struct nvfx_staging_transfer* tx;
- boolean direct = !nvfx_resource_on_gpu(pt) && pt->flags & NVFX_RESOURCE_FLAG_LINEAR;
+ boolean direct = !nvfx_resource_on_gpu(pt) && pt->flags & NOUVEAU_RESOURCE_FLAG_LINEAR;
tx = CALLOC_STRUCT(nvfx_staging_transfer);
if(!tx)