d3d9_hlsl: a hardware view's copy leaves its slot's vertices to the first pass

Windows views under Wine failed every d3d9_hlsl exact-3ds case run
through a preset on the core's Direct3D 9 texture with a black screen,
since e2c75d8. The view copied into the chain's frame was right, read
back texel for texel, but d3d9_hlsl_views_hw_copy() then stored the
view's size as the slot's last_dims: the first pass took that to mean
the slot's vertex buffer was already made for that size and never
wrote it, so it drew from an empty buffer. The copy no longer stores
it; the first pass makes the vertices when the size differs and the
chain's end records it, as for a software frame.

Under Wine on 26.04 the five hardware preset cases pass, and the whole
d3d9_hlsl lane on Direct3D9Ex and on the legacy device.
This commit is contained in:
LibretroAdmin authored and libretroadmin committed 2026-11-08 14:50:04 +01:00
1 parent 2225f17144
commit 2c060e0973
1 file changed
+3 -3
+3 -3
View File
@@ -6972,11 +6972,11 @@ static bool d3d9_hlsl_views_hw_copy(hlsl_renderchain_t *c,
to.top = 0;
to.right = (LONG)v->width;
to.bottom = (LONG)v->height;
/* The slot's last_dims stays the size its vertices were made for:
* the first pass makes them again when the view's differs, and the
* chain's end records the new one */
ok = SUCCEEDED(IDirect3DDevice9_StretchRect(c->chain.dev, s, &from, t,
&to, D3DTEXF_POINT));
/* The size the first pass reads it at, as a software frame's put
* leaves it */
c->chain.prev.last_dims[slot] = dims;
end:
if (s)
IDirect3DSurface9_Release(s);