mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-02 13:00:36 +02:00
llvmpipe/draw: fix image sizes for vertex/geometry shaders.
since images are a single level, minify before passing the w/h to draw. Fixes: KHR-GLES31.core.shader_image_size.basic-nonMS-vs-* Reviewed-by: Roland Scheidegger <sroland@vmware.com>
This commit is contained in:
parent
7cac880831
commit
744b8936df
1 changed files with 4 additions and 3 deletions
|
|
@ -386,7 +386,8 @@ prepare_shader_images(
|
|||
if (!img)
|
||||
continue;
|
||||
|
||||
unsigned width0 = img->width0;
|
||||
unsigned width = u_minify(img->width0, view->u.tex.level);
|
||||
unsigned height = u_minify(img->height0, view->u.tex.level);
|
||||
unsigned num_layers = img->depth0;
|
||||
|
||||
if (!lp_img->dt) {
|
||||
|
|
@ -419,7 +420,7 @@ prepare_shader_images(
|
|||
img_stride = 0;
|
||||
|
||||
/* everything specified in number of elements here. */
|
||||
width0 = view->u.buf.size / view_blocksize;
|
||||
width = view->u.buf.size / view_blocksize;
|
||||
addr = (uint8_t *)addr + view->u.buf.offset;
|
||||
assert(view->u.buf.offset + view->u.buf.size <= res->width0);
|
||||
}
|
||||
|
|
@ -440,7 +441,7 @@ prepare_shader_images(
|
|||
draw_set_mapped_image(lp->draw,
|
||||
shader_type,
|
||||
i,
|
||||
width0, img->height0, num_layers,
|
||||
width, height, num_layers,
|
||||
addr,
|
||||
row_stride, img_stride);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue