diff options
author | Ilia Mirkin <[email protected]> | 2015-11-05 00:33:22 -0500 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2015-11-05 11:22:18 -0500 |
commit | e587590a83588133d7a9044e3935585f675bbb30 (patch) | |
tree | ab4ad810480bde864401749ebabb5d2bc2f628be /src/mesa | |
parent | eea3c907cc480a105224b21be51d62bc64ea1057 (diff) |
st/mesa: account for texture views when doing CopyImageSubData
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_cb_copyimage.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_cb_copyimage.c b/src/mesa/state_tracker/st_cb_copyimage.c index 75114cdb712..03a7294e7c9 100644 --- a/src/mesa/state_tracker/st_cb_copyimage.c +++ b/src/mesa/state_tracker/st_cb_copyimage.c @@ -552,6 +552,10 @@ st_CopyImageSubData(struct gl_context *ctx, src_res = src->pt; src_level = src_image->Level; src_z += src_image->Face; + if (src_image->TexObject->Immutable) { + src_level += src_image->TexObject->MinLevel; + src_z += src_image->TexObject->MinLayer; + } } else { struct st_renderbuffer *src = st_renderbuffer(src_renderbuffer); src_res = src->texture; @@ -563,6 +567,10 @@ st_CopyImageSubData(struct gl_context *ctx, dst_res = dst->pt; dst_level = dst_image->Level; dst_z += dst_image->Face; + if (dst_image->TexObject->Immutable) { + dst_level += dst_image->TexObject->MinLevel; + dst_z += dst_image->TexObject->MinLayer; + } } else { struct st_renderbuffer *dst = st_renderbuffer(dst_renderbuffer); dst_res = dst->texture; |