On Wed, 3 Feb 2021 at 11:00, Jan Sikorski jsikorski@codeweavers.com wrote:
wined3d_mutex_lock();
- device->stencil_ref = stencil_ref; if (!(state_impl = unsafe_impl_from_ID3D11DepthStencilState(depth_stencil_state))) {
wined3d_device_set_depth_stencil_state(device->wined3d_device, NULL);
}wined3d_device_set_depth_stencil_state(device->wined3d_device, NULL, 0); wined3d_mutex_unlock(); return;
This changes behaviour, although only slightly. Should we pass "stencil_ref" to wined3d_device_set_depth_stencil_state() above?
static void wined3d_cs_exec_set_depth_stencil_state(struct wined3d_cs *cs, const void *data) { const struct wined3d_cs_set_depth_stencil_state *op = data;
- struct wined3d_state *state = &cs->state;
- cs->state.depth_stencil_state = op->state;
- device_invalidate_state(cs->device, STATE_DEPTH_STENCIL);
- if (state->depth_stencil_state != op->state) {
The brace should go on its own line.
-#define STATE_COMPUTE_OFFSET (STATE_DEPTH_STENCIL + 1) +#define STATE_STENCIL_REF (STATE_DEPTH_STENCIL + 1) +#define STATE_IS_SAMPLE_REF(a) ((a) == STATE_STENCIL_REF)
I think you meant "STATE_IS_STENCIL_REF" here. Note that the STATE_IS_* macros are supposed to be used by debug_d3dstate(). It looks like STATE_SAMPLE_MASK and STATE_DEPTH_STENCIL handling is also missing there.