summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c')
-rw-r--r--src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c b/src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c
index d497861324..8d95826c9a 100644
--- a/src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c
+++ b/src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c
@@ -28,7 +28,6 @@ dri_surface_from_handle(struct drm_api *api, struct pipe_screen *pscreen,
tmpl.format = format;
tmpl.width0 = width;
tmpl.height0 = height;
- pf_get_block(tmpl.format, &tmpl.block);
pt = api->texture_from_shared_handle(api, pscreen, &tmpl,
"front buffer", pitch, handle);
@@ -247,7 +246,7 @@ nouveau_drm_handle_from_pt(struct drm_api *api, struct pipe_screen *pscreen,
return false;
*handle = mt->bo->handle;
- *stride = mt->base.nblocksx[0] * mt->base.block.size;
+ *stride = pf_get_stride(mt->base.format, mt->base.width0);
return true;
}