mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 15:38:09 +02:00
st/mesa: ensure that images don't try to reference non-existent levels
Ideally the st_finalize_texture call would take care of that, but it doesn't seem to with KHR-GL45.shader_image_size.advanced-nonMS-*. This assertion makes sure that no such values are passed to the driver. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
c7b25005a1
commit
086c88551d
1 changed files with 1 additions and 0 deletions
|
|
@ -97,6 +97,7 @@ st_convert_image(const struct st_context *st, const struct gl_image_unit *u,
|
|||
|
||||
img->resource = stObj->pt;
|
||||
img->u.tex.level = u->Level + stObj->base.MinLevel;
|
||||
assert(img->u.tex.level <= img->resource->last_level);
|
||||
if (stObj->pt->target == PIPE_TEXTURE_3D) {
|
||||
if (u->Layered) {
|
||||
img->u.tex.first_layer = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue