mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 06:40:08 +01:00
st/mesa: need to pass srcLevel to st_texture_image_copy()
Fixes a regression in mipmap setup.
This commit is contained in:
parent
87022efb4f
commit
c6fdb950e9
3 changed files with 6 additions and 7 deletions
|
|
@ -1778,7 +1778,7 @@ copy_image_data_to_texture(struct st_context *st,
|
|||
*/
|
||||
st_texture_image_copy(st->pipe,
|
||||
stObj->pt, dstLevel, /* dest texture, level */
|
||||
stImage->pt, /* src texture */
|
||||
stImage->pt, stImage->level, /* src texture, level */
|
||||
stImage->face);
|
||||
|
||||
pipe_resource_reference(&stImage->pt, NULL);
|
||||
|
|
|
|||
|
|
@ -280,7 +280,7 @@ print_center_pixel(struct pipe_context *pipe, struct pipe_resource *src)
|
|||
void
|
||||
st_texture_image_copy(struct pipe_context *pipe,
|
||||
struct pipe_resource *dst, GLuint dstLevel,
|
||||
struct pipe_resource *src,
|
||||
struct pipe_resource *src, GLuint srcLevel,
|
||||
GLuint face)
|
||||
{
|
||||
struct pipe_screen *screen = pipe->screen;
|
||||
|
|
@ -289,12 +289,11 @@ st_texture_image_copy(struct pipe_context *pipe,
|
|||
GLuint depth = u_minify(dst->depth0, dstLevel);
|
||||
struct pipe_surface *src_surface;
|
||||
struct pipe_surface *dst_surface;
|
||||
const GLuint srcLevel = 0;
|
||||
GLuint i;
|
||||
|
||||
assert(src->width0 == width);
|
||||
assert(src->height0 == height);
|
||||
assert(src->depth0 == depth);
|
||||
assert(u_minify(src->width0, srcLevel) == width);
|
||||
assert(u_minify(src->height0, srcLevel) == height);
|
||||
assert(u_minify(src->depth0, srcLevel) == depth);
|
||||
|
||||
/* Loop over 3D image slices */
|
||||
for (i = 0; i < depth; i++) {
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ st_texture_image_data(struct st_context *st,
|
|||
extern void
|
||||
st_texture_image_copy(struct pipe_context *pipe,
|
||||
struct pipe_resource *dst, GLuint dstLevel,
|
||||
struct pipe_resource *src,
|
||||
struct pipe_resource *src, GLuint srcLevel,
|
||||
GLuint face);
|
||||
|
||||
extern void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue