summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/python/st_sample.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/python/st_sample.c')
-rw-r--r--src/gallium/state_trackers/python/st_sample.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/python/st_sample.c b/src/gallium/state_trackers/python/st_sample.c
index 53a01891e1..6fee90afda 100644
--- a/src/gallium/state_trackers/python/st_sample.c
+++ b/src/gallium/state_trackers/python/st_sample.c
@@ -528,8 +528,8 @@ st_sample_surface(struct st_surface *surface, float *rgba)
{
struct pipe_texture *texture = surface->texture;
struct pipe_screen *screen = texture->screen;
- unsigned width = texture->width[surface->level];
- unsigned height = texture->height[surface->level];
+ unsigned width = u_minify(texture->width0, surface->level);
+ unsigned height = u_minify(texture->height0, surface->level);
uint rgba_stride = width * 4;
struct pipe_transfer *transfer;
void *raw;