&paddingY, &halign);
assert(paddingX && paddingY);
- if (templat->bind != PIPE_BUFFER) {
+ if (templat->target != PIPE_BUFFER) {
unsigned min_paddingY = 4 * screen->specs.pixel_pipes;
if (paddingY < min_paddingY)
paddingY = min_paddingY;
{
struct etna_screen *screen = etna_screen(pscreen);
- /* Figure out what tiling to use -- for now, assume that textures cannot be
- * supertiled, and cannot be linear.
- * There is a feature flag SUPERTILED_TEXTURE (not supported on any known hw)
- * that may allow this, as well
- * as LINEAR_TEXTURE_SUPPORT (supported on gc880 and gc2000 at least), but
- * not sure how it works.
+ /* Figure out what tiling to use -- for now, assume that texture cannot be linear.
+ * there is a capability LINEAR_TEXTURE_SUPPORT (supported on gc880 and
+ * gc2000 at least), but not sure how it works.
* Buffers always have LINEAR layout.
*/
unsigned layout = ETNA_LAYOUT_LINEAR;
layout = ETNA_LAYOUT_LINEAR;
} else if (templat->target != PIPE_BUFFER) {
bool want_multitiled = false;
- bool want_supertiled = screen->specs.can_supertile && !DBG_ENABLED(ETNA_DBG_NO_SUPERTILE);
+ bool want_supertiled = screen->specs.can_supertile;
/* When this GPU supports single-buffer rendering, don't ever enable
* multi-tiling. This replicates the blob behavior on GC3000.
{
struct etna_resource *res = etna_resource(prsc);
- /* Make sure texture is older than the imported renderable buffer,
- * so etna_update_sampler_source will copy the pixel data again.
- */
- if (res->texture)
- etna_resource(res->texture)->seqno = res->seqno - 1;
+ res->seqno++;
}
static void
etna_bo_del(rsc->ts_bo);
if (rsc->scanout)
- renderonly_scanout_destroy(rsc->scanout);
+ renderonly_scanout_destroy(rsc->scanout, etna_screen(pscreen)->ro);
list_delinit(&rsc->list);
level->padded_width = align(level->width, paddingX);
level->padded_height = align(level->height, paddingY);
+ level->layer_stride = level->stride * util_format_get_nblocksy(prsc->format,
+ level->padded_height);
/* The DDX must give us a BO which conforms to our padding size.
* The stride of the BO must be greater or equal to our padded
{
struct etna_resource *rsc = etna_resource(prsc);
- if (renderonly_get_handle(rsc->scanout, handle))
+ if (handle->type == DRM_API_HANDLE_TYPE_KMS &&
+ renderonly_get_handle(rsc->scanout, handle))
return TRUE;
return etna_screen_bo_get_handle(pscreen, rsc->bo, rsc->levels[0].stride,
rsc->pending_ctx = ctx;
}
-void
-etna_resource_wait(struct pipe_context *pctx, struct etna_resource *rsc)
-{
- if (rsc->status & ETNA_PENDING_WRITE) {
- struct pipe_fence_handle *fence;
- struct pipe_screen *pscreen = pctx->screen;
-
- pctx->flush(pctx, &fence, 0);
-
- if (!pscreen->fence_finish(pscreen, pctx, fence, 5000000000ULL))
- BUG("fence timed out (hung GPU?)");
-
- pscreen->fence_reference(pscreen, &fence, NULL);
- }
-}
-
void
etna_resource_screen_init(struct pipe_screen *pscreen)
{