mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 11:18:08 +02:00
st/mesa: Fix source miptree level for copying data to finalized miptree.
Fixes WebGL texture mips conformance test, no piglit regressions.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44912
NOTE: This is a candidate for the stable branches.
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
(cherry picked from commit c2e37b1d2e)
This commit is contained in:
parent
3913cd19b8
commit
8f772b34b0
1 changed files with 5 additions and 1 deletions
|
|
@ -1130,11 +1130,15 @@ copy_image_data_to_texture(struct st_context *st,
|
|||
/* Copy potentially with the blitter:
|
||||
*/
|
||||
GLuint src_level;
|
||||
if (stImage->pt != stObj->pt)
|
||||
if (stImage->pt->last_level == 0)
|
||||
src_level = 0;
|
||||
else
|
||||
src_level = stImage->base.Level;
|
||||
|
||||
assert(src_level <= stImage->pt->last_level);
|
||||
assert(u_minify(stImage->pt->width0, src_level) == stImage->base.Width);
|
||||
assert(u_minify(stImage->pt->height0, src_level) == stImage->base.Height);
|
||||
|
||||
st_texture_image_copy(st->pipe,
|
||||
stObj->pt, dstLevel, /* dest texture, level */
|
||||
stImage->pt, src_level, /* src texture, level */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue