Fix: Overlay: Assert when using selection

Caused by copying texture content to a texture
with different format.
This commit is contained in:
Clément Foucault
2024-11-12 15:07:40 +01:00
parent bbcece38ba
commit df07e91dff

View File

@@ -53,7 +53,9 @@ class Wireframe {
GPUTexture **depth_tex = (state.xray_enabled) ? &res.depth_tx : &tmp_depth_tx_;
do_depth_copy_workaround_ = (depth_tex == &tmp_depth_tx_);
/* Note: Depth buffer has different format when doing selection. Avoid copy in this case. */
do_depth_copy_workaround_ = (res.selection_type == SelectionType::DISABLED) &&
(depth_tex == &tmp_depth_tx_);
{
auto &pass = wireframe_ps_;