Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/wined3d/device.c | 8 ++++++++ dlls/wined3d/wined3d.spec | 1 + include/wine/wined3d.h | 2 ++ 3 files changed, 11 insertions(+)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index e6406c7a04f..cf1e0e207de 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1901,6 +1901,14 @@ void CDECL wined3d_device_context_set_shader(struct wined3d_device_context *cont wined3d_shader_decref(prev); }
+struct wined3d_shader * CDECL wined3d_device_context_get_shader(const struct wined3d_device_context *context, + enum wined3d_shader_type type) +{ + TRACE("context %p, type %#x, shader %p.\n", context, type, shader); + + return context->state->shader[type]; +} + void CDECL wined3d_device_context_set_constant_buffer(struct wined3d_device_context *context, enum wined3d_shader_type type, unsigned int idx, struct wined3d_buffer *buffer) { diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index 34eba025b8a..ada2c79fb77 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -171,6 +171,7 @@ @ cdecl wined3d_device_context_dispatch_indirect(ptr ptr long) @ cdecl wined3d_device_context_flush(ptr) @ cdecl wined3d_device_context_generate_mipmaps(ptr ptr) +@ cdecl wined3d_device_context_get_shader(ptr long) @ cdecl wined3d_device_context_issue_query(ptr ptr long) @ cdecl wined3d_device_context_map(ptr ptr long ptr ptr long) @ cdecl wined3d_device_context_resolve_sub_resource(ptr ptr long ptr long long) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index db5f75d7aca..33844349968 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2567,6 +2567,8 @@ void __cdecl wined3d_device_context_draw_indirect(struct wined3d_device_context void __cdecl wined3d_device_context_flush(struct wined3d_device_context *context); void __cdecl wined3d_device_context_generate_mipmaps(struct wined3d_device_context *context, struct wined3d_shader_resource_view *view); +struct wined3d_shader * __cdecl wined3d_device_context_get_shader(const struct wined3d_device_context *context, + enum wined3d_shader_type type); void __cdecl wined3d_device_context_issue_query(struct wined3d_device_context *context, struct wined3d_query *query, unsigned int flags); HRESULT __cdecl wined3d_device_context_map(struct wined3d_device_context *context,
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/d3d11/device.c | 33 ++++++++++++++++++--------------- dlls/wined3d/device.c | 2 +- 2 files changed, 19 insertions(+), 16 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index 43fc18126ff..36fc6a084fa 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -1678,7 +1678,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_PSGetShaderResources(ID3D1 static void STDMETHODCALLTYPE d3d11_immediate_context_PSGetShader(ID3D11DeviceContext1 *iface, ID3D11PixelShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); + struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface); struct wined3d_shader *wined3d_shader; struct d3d_pixel_shader *shader_impl;
@@ -1691,7 +1691,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_PSGetShader(ID3D11DeviceCo *class_instance_count = 0;
wined3d_mutex_lock(); - if (!(wined3d_shader = wined3d_device_get_pixel_shader(device->wined3d_device))) + if (!(wined3d_shader = wined3d_device_context_get_shader(context->wined3d_context, WINED3D_SHADER_TYPE_PIXEL))) { wined3d_mutex_unlock(); *shader = NULL; @@ -1735,7 +1735,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_PSGetSamplers(ID3D11Device static void STDMETHODCALLTYPE d3d11_immediate_context_VSGetShader(ID3D11DeviceContext1 *iface, ID3D11VertexShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); + struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface); struct d3d_vertex_shader *shader_impl; struct wined3d_shader *wined3d_shader;
@@ -1748,7 +1748,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_VSGetShader(ID3D11DeviceCo *class_instance_count = 0;
wined3d_mutex_lock(); - if (!(wined3d_shader = wined3d_device_get_vertex_shader(device->wined3d_device))) + if (!(wined3d_shader = wined3d_device_context_get_shader(context->wined3d_context, WINED3D_SHADER_TYPE_VERTEX))) { wined3d_mutex_unlock(); *shader = NULL; @@ -1869,7 +1869,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_GSGetConstantBuffers(ID3D1 static void STDMETHODCALLTYPE d3d11_immediate_context_GSGetShader(ID3D11DeviceContext1 *iface, ID3D11GeometryShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); + struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface); struct d3d_geometry_shader *shader_impl; struct wined3d_shader *wined3d_shader;
@@ -1882,7 +1882,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_GSGetShader(ID3D11DeviceCo *class_instance_count = 0;
wined3d_mutex_lock(); - if (!(wined3d_shader = wined3d_device_get_geometry_shader(device->wined3d_device))) + if (!(wined3d_shader = wined3d_device_context_get_shader(context->wined3d_context, WINED3D_SHADER_TYPE_GEOMETRY))) { wined3d_mutex_unlock(); *shader = NULL; @@ -2318,7 +2318,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_HSGetShaderResources(ID3D1 static void STDMETHODCALLTYPE d3d11_immediate_context_HSGetShader(ID3D11DeviceContext1 *iface, ID3D11HullShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); + struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface); struct d3d11_hull_shader *shader_impl; struct wined3d_shader *wined3d_shader;
@@ -2331,7 +2331,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_HSGetShader(ID3D11DeviceCo *class_instance_count = 0;
wined3d_mutex_lock(); - if (!(wined3d_shader = wined3d_device_get_hull_shader(device->wined3d_device))) + if (!(wined3d_shader = wined3d_device_context_get_shader(context->wined3d_context, WINED3D_SHADER_TYPE_HULL))) { wined3d_mutex_unlock(); *shader = NULL; @@ -2410,7 +2410,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_DSGetShaderResources(ID3D1 static void STDMETHODCALLTYPE d3d11_immediate_context_DSGetShader(ID3D11DeviceContext1 *iface, ID3D11DomainShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); + struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface); struct d3d11_domain_shader *shader_impl; struct wined3d_shader *wined3d_shader;
@@ -2423,7 +2423,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_DSGetShader(ID3D11DeviceCo *class_instance_count = 0;
wined3d_mutex_lock(); - if (!(wined3d_shader = wined3d_device_get_domain_shader(device->wined3d_device))) + if (!(wined3d_shader = wined3d_device_context_get_shader(context->wined3d_context, WINED3D_SHADER_TYPE_DOMAIN))) { wined3d_mutex_unlock(); *shader = NULL; @@ -2527,7 +2527,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CSGetUnorderedAccessViews( static void STDMETHODCALLTYPE d3d11_immediate_context_CSGetShader(ID3D11DeviceContext1 *iface, ID3D11ComputeShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); + struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface); struct d3d11_compute_shader *shader_impl; struct wined3d_shader *wined3d_shader;
@@ -2540,7 +2540,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CSGetShader(ID3D11DeviceCo *class_instance_count = 0;
wined3d_mutex_lock(); - if (!(wined3d_shader = wined3d_device_get_compute_shader(device->wined3d_device))) + if (!(wined3d_shader = wined3d_device_context_get_shader(context->wined3d_context, WINED3D_SHADER_TYPE_COMPUTE))) { wined3d_mutex_unlock(); *shader = NULL; @@ -5046,7 +5046,8 @@ static void STDMETHODCALLTYPE d3d10_device_PSGetShader(ID3D10Device1 *iface, ID3 TRACE("iface %p, shader %p.\n", iface, shader);
wined3d_mutex_lock(); - if (!(wined3d_shader = wined3d_device_get_pixel_shader(device->wined3d_device))) + if (!(wined3d_shader = wined3d_device_context_get_shader(device->immediate_context.wined3d_context, + WINED3D_SHADER_TYPE_PIXEL))) { wined3d_mutex_unlock(); *shader = NULL; @@ -5096,7 +5097,8 @@ static void STDMETHODCALLTYPE d3d10_device_VSGetShader(ID3D10Device1 *iface, ID3 TRACE("iface %p, shader %p.\n", iface, shader);
wined3d_mutex_lock(); - if (!(wined3d_shader = wined3d_device_get_vertex_shader(device->wined3d_device))) + if (!(wined3d_shader = wined3d_device_context_get_shader(device->immediate_context.wined3d_context, + WINED3D_SHADER_TYPE_VERTEX))) { wined3d_mutex_unlock(); *shader = NULL; @@ -5218,7 +5220,8 @@ static void STDMETHODCALLTYPE d3d10_device_GSGetShader(ID3D10Device1 *iface, ID3 TRACE("iface %p, shader %p.\n", iface, shader);
wined3d_mutex_lock(); - if (!(wined3d_shader = wined3d_device_get_geometry_shader(device->wined3d_device))) + if (!(wined3d_shader = wined3d_device_context_get_shader(device->immediate_context.wined3d_context, + WINED3D_SHADER_TYPE_GEOMETRY))) { wined3d_mutex_unlock(); *shader = NULL; diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index cf1e0e207de..731a304a779 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1904,7 +1904,7 @@ void CDECL wined3d_device_context_set_shader(struct wined3d_device_context *cont struct wined3d_shader * CDECL wined3d_device_context_get_shader(const struct wined3d_device_context *context, enum wined3d_shader_type type) { - TRACE("context %p, type %#x, shader %p.\n", context, type, shader); + TRACE("context %p, type %#x.\n", context, type);
return context->state->shader[type]; }
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=88758
Your paranoid android.
=== debiant2 (32 bit Chinese:China report) ===
d3d11: d3d11.c:9661: Test failed: d3d11.c:15005: Test marked todo: Got hr 0 for WRITE.
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/d3d11/device.c | 6 +++--- dlls/wined3d/device.c | 6 +++--- dlls/wined3d/wined3d.spec | 2 +- include/wine/wined3d.h | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index 36fc6a084fa..d93256e77ad 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -407,7 +407,7 @@ static ULONG STDMETHODCALLTYPE d3d11_immediate_context_Release(ID3D11DeviceConte static void d3d11_immediate_context_get_constant_buffers(ID3D11DeviceContext1 *iface, enum wined3d_shader_type type, UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); + struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface); unsigned int i;
wined3d_mutex_lock(); @@ -416,7 +416,7 @@ static void d3d11_immediate_context_get_constant_buffers(ID3D11DeviceContext1 *i struct wined3d_buffer *wined3d_buffer; struct d3d_buffer *buffer_impl;
- if (!(wined3d_buffer = wined3d_device_get_constant_buffer(device->wined3d_device, + if (!(wined3d_buffer = wined3d_device_context_get_constant_buffer(context->wined3d_context, type, start_slot + i))) { buffers[i] = NULL; @@ -4358,7 +4358,7 @@ static void d3d10_device_get_constant_buffers(ID3D10Device1 *iface, struct wined3d_buffer *wined3d_buffer; struct d3d_buffer *buffer_impl;
- if (!(wined3d_buffer = wined3d_device_get_constant_buffer(device->wined3d_device, + if (!(wined3d_buffer = wined3d_device_context_get_constant_buffer(device->immediate_context.wined3d_context, type, start_slot + i))) { buffers[i] = NULL; diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 731a304a779..974db90037d 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -2451,10 +2451,10 @@ void CDECL wined3d_device_set_constant_buffer(struct wined3d_device *device, return wined3d_device_context_set_constant_buffer(&device->cs->c, type, idx, buffer); }
-struct wined3d_buffer * CDECL wined3d_device_get_constant_buffer(const struct wined3d_device *device, +struct wined3d_buffer * CDECL wined3d_device_context_get_constant_buffer(const struct wined3d_device_context *context, enum wined3d_shader_type shader_type, unsigned int idx) { - TRACE("device %p, shader_type %#x, idx %u.\n", device, shader_type, idx); + TRACE("context %p, shader_type %#x, idx %u.\n", context, shader_type, idx);
if (idx >= MAX_CONSTANT_BUFFERS) { @@ -2462,7 +2462,7 @@ struct wined3d_buffer * CDECL wined3d_device_get_constant_buffer(const struct wi return NULL; }
- return device->cs->c.state->cb[shader_type][idx]; + return context->state->cb[shader_type][idx]; }
void CDECL wined3d_device_set_vs_resource_view(struct wined3d_device *device, diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index ada2c79fb77..406e511c0f6 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -58,7 +58,6 @@ @ cdecl wined3d_device_get_blend_state(ptr ptr) @ cdecl wined3d_device_get_clip_status(ptr ptr) @ cdecl wined3d_device_get_compute_shader(ptr) -@ cdecl wined3d_device_get_constant_buffer(ptr long long) @ cdecl wined3d_device_get_creation_parameters(ptr ptr) @ cdecl wined3d_device_get_cs_resource_view(ptr long) @ cdecl wined3d_device_get_cs_sampler(ptr long) @@ -171,6 +170,7 @@ @ cdecl wined3d_device_context_dispatch_indirect(ptr ptr long) @ cdecl wined3d_device_context_flush(ptr) @ cdecl wined3d_device_context_generate_mipmaps(ptr ptr) +@ cdecl wined3d_device_context_get_constant_buffer(ptr long long) @ cdecl wined3d_device_context_get_shader(ptr long) @ cdecl wined3d_device_context_issue_query(ptr ptr long) @ cdecl wined3d_device_context_map(ptr ptr long ptr ptr long) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 33844349968..1a58c671934 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2380,8 +2380,6 @@ struct wined3d_blend_state * __cdecl wined3d_device_get_blend_state(const struct HRESULT __cdecl wined3d_device_get_clip_status(const struct wined3d_device *device, struct wined3d_clip_status *clip_status); struct wined3d_shader * __cdecl wined3d_device_get_compute_shader(const struct wined3d_device *device); -struct wined3d_buffer * __cdecl wined3d_device_get_constant_buffer(const struct wined3d_device *device, - enum wined3d_shader_type shader_type, unsigned int idx); void __cdecl wined3d_device_get_creation_parameters(const struct wined3d_device *device, struct wined3d_device_creation_parameters *creation_parameters); struct wined3d_shader_resource_view * __cdecl wined3d_device_get_cs_resource_view(const struct wined3d_device *device, @@ -2567,6 +2565,8 @@ void __cdecl wined3d_device_context_draw_indirect(struct wined3d_device_context void __cdecl wined3d_device_context_flush(struct wined3d_device_context *context); void __cdecl wined3d_device_context_generate_mipmaps(struct wined3d_device_context *context, struct wined3d_shader_resource_view *view); +struct wined3d_buffer * __cdecl wined3d_device_context_get_constant_buffer(const struct wined3d_device_context *context, + enum wined3d_shader_type shader_type, unsigned int idx); struct wined3d_shader * __cdecl wined3d_device_context_get_shader(const struct wined3d_device_context *context, enum wined3d_shader_type type); void __cdecl wined3d_device_context_issue_query(struct wined3d_device_context *context,
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=88759
Your paranoid android.
=== debiant2 (32 bit report) ===
d3d11: d3d11.c:9661: Test failed: d3d11.c:15027: Test marked todo: Got hr 0 for WRITE_DISCARD.
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/d3d11/device.c | 4 ++-- dlls/wined3d/device.c | 9 +++++---- dlls/wined3d/wined3d.spec | 2 +- include/wine/wined3d.h | 2 ++ 4 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index d93256e77ad..70d14c7f2c5 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -2137,7 +2137,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMGetRenderTargetsAndUnord static void STDMETHODCALLTYPE d3d11_immediate_context_OMGetBlendState(ID3D11DeviceContext1 *iface, ID3D11BlendState **blend_state, FLOAT blend_factor[4], UINT *sample_mask) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); + struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface); struct wined3d_blend_state *wined3d_state; struct d3d_blend_state *blend_state_impl;
@@ -2145,7 +2145,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMGetBlendState(ID3D11Devi iface, blend_state, blend_factor, sample_mask);
wined3d_mutex_lock(); - if ((wined3d_state = wined3d_device_get_blend_state(device->wined3d_device, + if ((wined3d_state = wined3d_device_context_get_blend_state(context->wined3d_context, (struct wined3d_color *)blend_factor, sample_mask))) { blend_state_impl = wined3d_blend_state_get_parent(wined3d_state); diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 974db90037d..39701886450 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1603,12 +1603,12 @@ void CDECL wined3d_device_set_blend_state(struct wined3d_device *device, wined3d_device_context_set_blend_state(&device->cs->c, blend_state, blend_factor, sample_mask); }
-struct wined3d_blend_state * CDECL wined3d_device_get_blend_state(const struct wined3d_device *device, +struct wined3d_blend_state * CDECL wined3d_device_context_get_blend_state(const struct wined3d_device_context *context, struct wined3d_color *blend_factor, unsigned int *sample_mask) { - const struct wined3d_state *state = device->cs->c.state; + const struct wined3d_state *state = context->state;
- TRACE("device %p, blend_factor %p, sample_mask %p.\n", device, blend_factor, sample_mask); + TRACE("context %p, blend_factor %p, sample_mask %p.\n", context, blend_factor, sample_mask);
*blend_factor = state->blend_factor; *sample_mask = state->sample_mask; @@ -3921,6 +3921,7 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, const struct wined3d_stateblock_state *state = &stateblock->stateblock_state; const struct wined3d_saved_states *changed = &stateblock->changed; const unsigned int word_bit_count = sizeof(DWORD) * CHAR_BIT; + struct wined3d_device_context *context = &device->cs->c; unsigned int i, j, start, idx; struct wined3d_range range; uint32_t map; @@ -4153,7 +4154,7 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, if (wined3d_bitmap_is_set(changed->renderState, WINED3D_RS_BLENDFACTOR)) wined3d_color_from_d3dcolor(&colour, state->rs[WINED3D_RS_BLENDFACTOR]); else - wined3d_device_get_blend_state(device, &colour, &sample_mask); + wined3d_device_context_get_blend_state(context, &colour, &sample_mask);
if ((entry = wine_rb_get(&device->blend_states, &desc))) { diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index 406e511c0f6..a8f88667a27 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -55,7 +55,6 @@ @ cdecl wined3d_device_end_scene(ptr) @ cdecl wined3d_device_evict_managed_resources(ptr) @ cdecl wined3d_device_get_available_texture_mem(ptr) -@ cdecl wined3d_device_get_blend_state(ptr ptr) @ cdecl wined3d_device_get_clip_status(ptr ptr) @ cdecl wined3d_device_get_compute_shader(ptr) @ cdecl wined3d_device_get_creation_parameters(ptr ptr) @@ -170,6 +169,7 @@ @ cdecl wined3d_device_context_dispatch_indirect(ptr ptr long) @ cdecl wined3d_device_context_flush(ptr) @ cdecl wined3d_device_context_generate_mipmaps(ptr ptr) +@ cdecl wined3d_device_context_get_blend_state(ptr ptr) @ cdecl wined3d_device_context_get_constant_buffer(ptr long long) @ cdecl wined3d_device_context_get_shader(ptr long) @ cdecl wined3d_device_context_issue_query(ptr ptr long) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 1a58c671934..5b936017191 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2565,6 +2565,8 @@ void __cdecl wined3d_device_context_draw_indirect(struct wined3d_device_context void __cdecl wined3d_device_context_flush(struct wined3d_device_context *context); void __cdecl wined3d_device_context_generate_mipmaps(struct wined3d_device_context *context, struct wined3d_shader_resource_view *view); +struct wined3d_blend_state * __cdecl wined3d_device_context_get_blend_state( + const struct wined3d_device_context *context, struct wined3d_color *blend_factor, unsigned int *sample_mask); struct wined3d_buffer * __cdecl wined3d_device_context_get_constant_buffer(const struct wined3d_device_context *context, enum wined3d_shader_type shader_type, unsigned int idx); struct wined3d_shader * __cdecl wined3d_device_context_get_shader(const struct wined3d_device_context *context,
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/d3d11/device.c | 4 ++-- dlls/wined3d/device.c | 10 +++++----- dlls/wined3d/wined3d.spec | 2 +- include/wine/wined3d.h | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index 70d14c7f2c5..d56be188cf6 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -2161,7 +2161,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMGetBlendState(ID3D11Devi static void STDMETHODCALLTYPE d3d11_immediate_context_OMGetDepthStencilState(ID3D11DeviceContext1 *iface, ID3D11DepthStencilState **depth_stencil_state, UINT *stencil_ref) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); + struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface); struct wined3d_depth_stencil_state *wined3d_state; struct d3d_depthstencil_state *state_impl;
@@ -2169,7 +2169,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMGetDepthStencilState(ID3 iface, depth_stencil_state, stencil_ref);
wined3d_mutex_lock(); - if ((wined3d_state = wined3d_device_get_depth_stencil_state(device->wined3d_device, stencil_ref))) + if ((wined3d_state = wined3d_device_context_get_depth_stencil_state(context->wined3d_context, stencil_ref))) { state_impl = wined3d_depth_stencil_state_get_parent(wined3d_state); ID3D11DepthStencilState_AddRef(*depth_stencil_state = &state_impl->ID3D11DepthStencilState_iface); diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 39701886450..c370c5dff7c 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1623,12 +1623,12 @@ void CDECL wined3d_device_set_depth_stencil_state(struct wined3d_device *device, wined3d_device_context_set_depth_stencil_state(&device->cs->c, depth_stencil_state, stencil_ref); }
-struct wined3d_depth_stencil_state * CDECL wined3d_device_get_depth_stencil_state(const struct wined3d_device *device, - unsigned int *stencil_ref) +struct wined3d_depth_stencil_state * CDECL wined3d_device_context_get_depth_stencil_state( + const struct wined3d_device_context *context, unsigned int *stencil_ref) { - const struct wined3d_state *state = device->cs->c.state; + const struct wined3d_state *state = context->state;
- TRACE("device %p, stencil_ref %p.\n", device, stencil_ref); + TRACE("context %p, stencil_ref %p.\n", context, stencil_ref);
*stencil_ref = state->stencil_ref; return state->depth_stencil_state; @@ -4221,7 +4221,7 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, if (wined3d_bitmap_is_set(changed->renderState, WINED3D_RS_STENCILREF)) stencil_ref = state->rs[WINED3D_RS_STENCILREF]; else - wined3d_device_get_depth_stencil_state(device, &stencil_ref); + wined3d_device_context_get_depth_stencil_state(context, &stencil_ref);
if ((entry = wine_rb_get(&device->depth_stencil_states, &desc))) { diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index a8f88667a27..4e7a31b58df 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -61,7 +61,6 @@ @ cdecl wined3d_device_get_cs_resource_view(ptr long) @ cdecl wined3d_device_get_cs_sampler(ptr long) @ cdecl wined3d_device_get_cs_uav(ptr long) -@ cdecl wined3d_device_get_depth_stencil_state(ptr) @ cdecl wined3d_device_get_depth_stencil_view(ptr) @ cdecl wined3d_device_get_device_caps(ptr ptr) @ cdecl wined3d_device_get_display_mode(ptr long ptr ptr) @@ -171,6 +170,7 @@ @ cdecl wined3d_device_context_generate_mipmaps(ptr ptr) @ cdecl wined3d_device_context_get_blend_state(ptr ptr) @ cdecl wined3d_device_context_get_constant_buffer(ptr long long) +@ cdecl wined3d_device_context_get_depth_stencil_state(ptr) @ cdecl wined3d_device_context_get_shader(ptr long) @ cdecl wined3d_device_context_issue_query(ptr ptr long) @ cdecl wined3d_device_context_map(ptr ptr long ptr ptr long) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 5b936017191..165e69b89f3 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2387,8 +2387,6 @@ struct wined3d_shader_resource_view * __cdecl wined3d_device_get_cs_resource_vie struct wined3d_sampler * __cdecl wined3d_device_get_cs_sampler(const struct wined3d_device *device, unsigned int idx); struct wined3d_unordered_access_view * __cdecl wined3d_device_get_cs_uav(const struct wined3d_device *device, unsigned int idx); -struct wined3d_depth_stencil_state * __cdecl wined3d_device_get_depth_stencil_state( - const struct wined3d_device *device, unsigned int *stencil_ref); struct wined3d_rendertarget_view * __cdecl wined3d_device_get_depth_stencil_view(const struct wined3d_device *device); HRESULT __cdecl wined3d_device_get_device_caps(const struct wined3d_device *device, struct wined3d_caps *caps); HRESULT __cdecl wined3d_device_get_display_mode(const struct wined3d_device *device, UINT swapchain_idx, @@ -2569,6 +2567,8 @@ struct wined3d_blend_state * __cdecl wined3d_device_context_get_blend_state( const struct wined3d_device_context *context, struct wined3d_color *blend_factor, unsigned int *sample_mask); struct wined3d_buffer * __cdecl wined3d_device_context_get_constant_buffer(const struct wined3d_device_context *context, enum wined3d_shader_type shader_type, unsigned int idx); +struct wined3d_depth_stencil_state * __cdecl wined3d_device_context_get_depth_stencil_state( + const struct wined3d_device_context *context, unsigned int *stencil_ref); struct wined3d_shader * __cdecl wined3d_device_context_get_shader(const struct wined3d_device_context *context, enum wined3d_shader_type type); void __cdecl wined3d_device_context_issue_query(struct wined3d_device_context *context,
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=88761
Your paranoid android.
=== debiant2 (32 bit Chinese:China report) ===
d3d11: Unhandled exception: page fault on read access to 0x00000008 in 32-bit code (0x6e94338d).
On Thu, 15 Apr 2021 at 06:47, Zebediah Figura z.figura12@gmail.com wrote:
@@ -171,6 +170,7 @@ @ cdecl wined3d_device_context_generate_mipmaps(ptr ptr) @ cdecl wined3d_device_context_get_blend_state(ptr ptr) @ cdecl wined3d_device_context_get_constant_buffer(ptr long long) +@ cdecl wined3d_device_context_get_depth_stencil_state(ptr) @ cdecl wined3d_device_context_get_shader(ptr long) @ cdecl wined3d_device_context_issue_query(ptr ptr long) @ cdecl wined3d_device_context_map(ptr ptr long ptr ptr long)
Like in patch 4/5, this doesn't match the prototype.
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=88757
Your paranoid android.
=== debiant2 (build log) ===
../wine/dlls/wined3d/device.c:1907:64: error: ‘shader’ undeclared (first use in this function) Task: The win32 Wine build failed
=== debiant2 (build log) ===
../wine/dlls/wined3d/device.c:1907:64: error: ‘shader’ undeclared (first use in this function) Task: The wow64 Wine build failed