Re: [3/3] WineD3D: Update the scissor rect on a render target change
2009/7/20 Stefan Dösinger <stefan(a)codeweavers.com>:
+ scissor.top = 0; + scissor.left = 0; + scissor.right = viewport.Width; + scissor.bottom = viewport.Height; + IWineD3DDevice_SetScissorRect(iface, &scissor); + IWineD3DDeviceImpl_MarkStateDirty(This, STATE_SCISSORRECT); The MarkStateDirty() call looks redundant to me. Also, does this do the right thing when we're recording a stateblock?
Am Monday 20 July 2009 12:58:16 schrieb Henri Verbeet:
The MarkStateDirty() call looks redundant to me. Also, does this do the right thing when we're recording a stateblock? It's not redundant because the scissor rect needs updating on a RT switch anyway - I think it wasn't visible in this diff, but there is a SetViewport call above the SetScissorRect which explains the situation.
The stateblock recording is a good question. The SetScissorRect will update the update stateblock, not the device's stateblock if a recording happens, and SetRenderTarget is not recorded in a stateblock. I'll extend the test.
2009/7/20 Stefan Dösinger <stefan(a)codeweavers.com>:
Am Monday 20 July 2009 12:58:16 schrieb Henri Verbeet:
The MarkStateDirty() call looks redundant to me. Also, does this do the right thing when we're recording a stateblock? It's not redundant because the scissor rect needs updating on a RT switch anyway - I think it wasn't visible in this diff, but there is a SetViewport call above the SetScissorRect which explains the situation.
Ok, but that's for a different reason then. Also, the wording of that comment could use some work.
2009/7/20 Henri Verbeet <hverbeet(a)gmail.com>:
2009/7/20 Stefan Dösinger <stefan(a)codeweavers.com>:
Am Monday 20 July 2009 12:58:16 schrieb Henri Verbeet:
The MarkStateDirty() call looks redundant to me. Also, does this do the right thing when we're recording a stateblock? It's not redundant because the scissor rect needs updating on a RT switch anyway - I think it wasn't visible in this diff, but there is a SetViewport call above the SetScissorRect which explains the situation.
Ok, but that's for a different reason then. Also, the wording of that comment could use some work.
Actually, that is already handled by FindContext(), although perhaps "render_offscreen" should be tracked by the context rather than the device.
participants (2)
-
Henri Verbeet -
Stefan Dösinger