|
|
|
@ -725,16 +725,6 @@ void vrend_renderer_blit_gl(MAYBE_UNUSED struct vrend_context *ctx, |
|
|
|
|
} else |
|
|
|
|
glDisable(GL_SCISSOR_TEST); |
|
|
|
|
|
|
|
|
|
for (dst_z = 0; dst_z < info->dst.box.depth; dst_z++) { |
|
|
|
|
float dst2src_scale = info->src.box.depth / (float)info->dst.box.depth; |
|
|
|
|
float dst_offset = ((info->src.box.depth - 1) - |
|
|
|
|
(info->dst.box.depth - 1) * dst2src_scale) * 0.5; |
|
|
|
|
float src_z = (dst_z + dst_offset) * dst2src_scale; |
|
|
|
|
uint32_t layer = (dst_res->target == GL_TEXTURE_CUBE_MAP) ? info->dst.box.z : dst_z; |
|
|
|
|
|
|
|
|
|
glBindFramebuffer(GL_FRAMEBUFFER, blit_ctx->fb_id); |
|
|
|
|
vrend_fb_bind_texture_id(dst_res, blit_views[1], 0, info->dst.level, layer); |
|
|
|
|
|
|
|
|
|
if (has_srgb_write_control) { |
|
|
|
|
if (util_format_is_srgb(info->dst.format) || util_format_is_srgb(info->src.format)) { |
|
|
|
|
VREND_DEBUG(dbg_blit, ctx, "%s: Enable GL_FRAMEBUFFER_SRGB\n", __func__); |
|
|
|
@ -745,6 +735,16 @@ void vrend_renderer_blit_gl(MAYBE_UNUSED struct vrend_context *ctx, |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
for (dst_z = 0; dst_z < info->dst.box.depth; dst_z++) { |
|
|
|
|
float dst2src_scale = info->src.box.depth / (float)info->dst.box.depth; |
|
|
|
|
float dst_offset = ((info->src.box.depth - 1) - |
|
|
|
|
(info->dst.box.depth - 1) * dst2src_scale) * 0.5; |
|
|
|
|
float src_z = (dst_z + dst_offset) * dst2src_scale; |
|
|
|
|
uint32_t layer = (dst_res->target == GL_TEXTURE_CUBE_MAP) ? info->dst.box.z : dst_z; |
|
|
|
|
|
|
|
|
|
glBindFramebuffer(GL_FRAMEBUFFER, blit_ctx->fb_id); |
|
|
|
|
vrend_fb_bind_texture_id(dst_res, blit_views[1], 0, info->dst.level, layer); |
|
|
|
|
|
|
|
|
|
buffers = GL_COLOR_ATTACHMENT0; |
|
|
|
|
glDrawBuffers(1, &buffers); |
|
|
|
|
blitter_set_texcoords(blit_ctx, src_res, info->src.level, |
|
|
|
|