Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/wined3d/cs.c | 80 ++++++++++++++++++++-------------- dlls/wined3d/wined3d_private.h | 1 + 2 files changed, 49 insertions(+), 32 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index b99e3bbac30..d70792084e8 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -480,6 +480,12 @@ static inline void wined3d_device_context_finish(struct wined3d_device_context * context->ops->finish(context, queue_id); }
+static inline void wined3d_device_context_acquire_resource(struct wined3d_device_context *context, + struct wined3d_resource *resource) +{ + context->ops->acquire_resource(context, resource); +} + static struct wined3d_cs *wined3d_cs_from_context(struct wined3d_device_context *context) { return CONTAINING_RECORD(context, struct wined3d_cs, c); @@ -765,15 +771,16 @@ void wined3d_device_context_emit_clear_rendertarget_view(struct wined3d_device_c op->rect_count = 1; op->rects[0] = *rect;
- wined3d_resource_acquire(view->resource); + wined3d_device_context_acquire_resource(context, view->resource);
wined3d_device_context_submit(context, WINED3D_CS_QUEUE_DEFAULT); if (flags & WINED3DCLEAR_SYNCHRONOUS) wined3d_device_context_finish(context, WINED3D_CS_QUEUE_DEFAULT); }
-static void acquire_shader_resources(const struct wined3d_state *state, unsigned int shader_mask) +static void acquire_shader_resources(struct wined3d_device_context *context, unsigned int shader_mask) { + const struct wined3d_state *state = context->state; struct wined3d_shader_sampler_map_entry *entry; struct wined3d_shader_resource_view *view; struct wined3d_shader *shader; @@ -790,7 +797,7 @@ static void acquire_shader_resources(const struct wined3d_state *state, unsigned for (j = 0; j < WINED3D_MAX_CBS; ++j) { if (state->cb[i][j]) - wined3d_resource_acquire(&state->cb[i][j]->resource); + wined3d_device_context_acquire_resource(context, &state->cb[i][j]->resource); }
for (j = 0; j < shader->reg_maps.sampler_map.count; ++j) @@ -800,7 +807,7 @@ static void acquire_shader_resources(const struct wined3d_state *state, unsigned if (!(view = state->shader_resource_view[i][entry->resource_idx])) continue;
- wined3d_resource_acquire(view->resource); + wined3d_device_context_acquire_resource(context, view->resource); } } } @@ -838,8 +845,8 @@ static void release_shader_resources(const struct wined3d_state *state, unsigned } }
-static void acquire_unordered_access_resources(const struct wined3d_shader *shader, - struct wined3d_unordered_access_view * const *views) +static void acquire_unordered_access_resources(struct wined3d_device_context *context, + const struct wined3d_shader *shader, struct wined3d_unordered_access_view * const *views) { unsigned int i;
@@ -854,7 +861,7 @@ static void acquire_unordered_access_resources(const struct wined3d_shader *shad if (!views[i]) continue;
- wined3d_resource_acquire(views[i]->resource); + wined3d_device_context_acquire_resource(context, views[i]->resource); } }
@@ -896,10 +903,12 @@ static void wined3d_cs_exec_dispatch(struct wined3d_cs *cs, const void *data) state->unordered_access_view[WINED3D_PIPELINE_COMPUTE]); }
-static void acquire_compute_pipeline_resources(const struct wined3d_state *state) +static void acquire_compute_pipeline_resources(struct wined3d_device_context *context) { - acquire_shader_resources(state, 1u << WINED3D_SHADER_TYPE_COMPUTE); - acquire_unordered_access_resources(state->shader[WINED3D_SHADER_TYPE_COMPUTE], + const struct wined3d_state *state = context->state; + + acquire_shader_resources(context, 1u << WINED3D_SHADER_TYPE_COMPUTE); + acquire_unordered_access_resources(context, state->shader[WINED3D_SHADER_TYPE_COMPUTE], state->unordered_access_view[WINED3D_PIPELINE_COMPUTE]); }
@@ -915,7 +924,7 @@ void CDECL wined3d_device_context_dispatch(struct wined3d_device_context *contex op->parameters.u.direct.group_count_y = group_count_y; op->parameters.u.direct.group_count_z = group_count_z;
- acquire_compute_pipeline_resources(context->state); + acquire_compute_pipeline_resources(context);
wined3d_device_context_submit(context, WINED3D_CS_QUEUE_DEFAULT); } @@ -931,8 +940,8 @@ void CDECL wined3d_device_context_dispatch_indirect(struct wined3d_device_contex op->parameters.u.indirect.buffer = buffer; op->parameters.u.indirect.offset = offset;
- acquire_compute_pipeline_resources(context->state); - wined3d_resource_acquire(&buffer->resource); + acquire_compute_pipeline_resources(context); + wined3d_device_context_acquire_resource(context, &buffer->resource);
wined3d_device_context_submit(context, WINED3D_CS_QUEUE_DEFAULT); } @@ -1024,37 +1033,38 @@ static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data) state->unordered_access_view[WINED3D_PIPELINE_GRAPHICS]); }
-static void acquire_graphics_pipeline_resources(const struct wined3d_state *state, +static void acquire_graphics_pipeline_resources(struct wined3d_device_context *context, BOOL indexed, const struct wined3d_d3d_info *d3d_info) { + const struct wined3d_state *state = context->state; unsigned int i;
if (indexed) - wined3d_resource_acquire(&state->index_buffer->resource); + wined3d_device_context_acquire_resource(context, &state->index_buffer->resource); for (i = 0; i < ARRAY_SIZE(state->streams); ++i) { if (state->streams[i].buffer) - wined3d_resource_acquire(&state->streams[i].buffer->resource); + wined3d_device_context_acquire_resource(context, &state->streams[i].buffer->resource); } for (i = 0; i < ARRAY_SIZE(state->stream_output); ++i) { if (state->stream_output[i].buffer) - wined3d_resource_acquire(&state->stream_output[i].buffer->resource); + wined3d_device_context_acquire_resource(context, &state->stream_output[i].buffer->resource); } for (i = 0; i < ARRAY_SIZE(state->textures); ++i) { if (state->textures[i]) - wined3d_resource_acquire(&state->textures[i]->resource); + wined3d_device_context_acquire_resource(context, &state->textures[i]->resource); } for (i = 0; i < d3d_info->limits.max_rt_count; ++i) { if (state->fb.render_targets[i]) - wined3d_resource_acquire(state->fb.render_targets[i]->resource); + wined3d_device_context_acquire_resource(context, state->fb.render_targets[i]->resource); } if (state->fb.depth_stencil) - wined3d_resource_acquire(state->fb.depth_stencil->resource); - acquire_shader_resources(state, ~(1u << WINED3D_SHADER_TYPE_COMPUTE)); - acquire_unordered_access_resources(state->shader[WINED3D_SHADER_TYPE_PIXEL], + wined3d_device_context_acquire_resource(context, state->fb.depth_stencil->resource); + acquire_shader_resources(context, ~(1u << WINED3D_SHADER_TYPE_COMPUTE)); + acquire_unordered_access_resources(context, state->shader[WINED3D_SHADER_TYPE_PIXEL], state->unordered_access_view[WINED3D_PIPELINE_GRAPHICS]); }
@@ -1064,7 +1074,6 @@ void wined3d_device_context_emit_draw(struct wined3d_device_context *context, bool indexed) { const struct wined3d_d3d_info *d3d_info = &context->device->adapter->d3d_info; - const struct wined3d_state *state = context->state; struct wined3d_cs_draw *op;
op = wined3d_device_context_require_space(context, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT); @@ -1079,7 +1088,7 @@ void wined3d_device_context_emit_draw(struct wined3d_device_context *context, op->parameters.u.direct.instance_count = instance_count; op->parameters.indexed = indexed;
- acquire_graphics_pipeline_resources(state, indexed, d3d_info); + acquire_graphics_pipeline_resources(context, indexed, d3d_info);
wined3d_device_context_submit(context, WINED3D_CS_QUEUE_DEFAULT); } @@ -1100,8 +1109,8 @@ void CDECL wined3d_device_context_draw_indirect(struct wined3d_device_context *c op->parameters.u.indirect.offset = offset; op->parameters.indexed = indexed;
- acquire_graphics_pipeline_resources(state, indexed, d3d_info); - wined3d_resource_acquire(&buffer->resource); + acquire_graphics_pipeline_resources(context, indexed, d3d_info); + wined3d_device_context_acquire_resource(context, &buffer->resource);
wined3d_device_context_submit(context, WINED3D_CS_QUEUE_DEFAULT); } @@ -2461,9 +2470,9 @@ void wined3d_device_context_emit_blt_sub_resource(struct wined3d_device_context memset(&op->fx, 0, sizeof(op->fx)); op->filter = filter;
- wined3d_resource_acquire(dst_resource); + wined3d_device_context_acquire_resource(context, dst_resource); if (src_resource) - wined3d_resource_acquire(src_resource); + wined3d_device_context_acquire_resource(context, src_resource);
wined3d_device_context_submit(context, WINED3D_CS_QUEUE_DEFAULT); if (flags & WINED3D_BLT_SYNCHRONOUS) @@ -2544,7 +2553,7 @@ void wined3d_device_context_emit_update_sub_resource(struct wined3d_device_conte op->data.slice_pitch = slice_pitch; op->data.data = data;
- wined3d_resource_acquire(resource); + wined3d_device_context_acquire_resource(context, resource);
wined3d_device_context_submit(context, WINED3D_CS_QUEUE_MAP); /* The data pointer may go away, so we need to wait until it is read. @@ -2611,7 +2620,7 @@ void wined3d_device_context_emit_clear_uav_uint(struct wined3d_device_context *c op->view = view; op->clear_value = *clear_value;
- wined3d_resource_acquire(view->resource); + wined3d_device_context_acquire_resource(context, view->resource);
wined3d_device_context_submit(context, WINED3D_CS_QUEUE_DEFAULT); } @@ -2640,7 +2649,7 @@ void wined3d_device_context_emit_copy_uav_counter(struct wined3d_device_context op->offset = offset; op->view = uav;
- wined3d_resource_acquire(&dst_buffer->resource); + wined3d_device_context_acquire_resource(context, &dst_buffer->resource);
wined3d_device_context_submit(context, WINED3D_CS_QUEUE_DEFAULT); } @@ -2667,7 +2676,7 @@ void wined3d_device_context_emit_generate_mipmaps(struct wined3d_device_context op->opcode = WINED3D_CS_OP_GENERATE_MIPMAPS; op->view = view;
- wined3d_resource_acquire(view->resource); + wined3d_device_context_acquire_resource(context, view->resource);
wined3d_device_context_submit(context, WINED3D_CS_QUEUE_DEFAULT); } @@ -2683,6 +2692,11 @@ static void wined3d_cs_emit_stop(struct wined3d_cs *cs) wined3d_cs_finish(cs, WINED3D_CS_QUEUE_DEFAULT); }
+static void wined3d_cs_acquire_resource(struct wined3d_device_context *context, struct wined3d_resource *resource) +{ + wined3d_resource_acquire(resource); +} + static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) = { /* WINED3D_CS_OP_NOP */ wined3d_cs_exec_nop, @@ -2801,6 +2815,7 @@ static const struct wined3d_device_context_ops wined3d_cs_st_ops = wined3d_cs_unmap, wined3d_cs_issue_query, wined3d_cs_flush, + wined3d_cs_acquire_resource, };
static BOOL wined3d_cs_queue_is_empty(const struct wined3d_cs *cs, const struct wined3d_cs_queue *queue) @@ -2926,6 +2941,7 @@ static const struct wined3d_device_context_ops wined3d_cs_mt_ops = wined3d_cs_unmap, wined3d_cs_issue_query, wined3d_cs_flush, + wined3d_cs_acquire_resource, };
static void poll_queries(struct wined3d_cs *cs) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 0ef6e89f1f1..f4060224de9 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -4696,6 +4696,7 @@ struct wined3d_device_context_ops unsigned int sub_resource_idx); void (*issue_query)(struct wined3d_device_context *context, struct wined3d_query *query, unsigned int flags); void (*flush)(struct wined3d_device_context *context); + void (*acquire_resource)(struct wined3d_device_context *context, struct wined3d_resource *resource); };
struct wined3d_device_context
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/wined3d/cs.c | 2 ++ dlls/wined3d/device.c | 1 - 2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index d70792084e8..8a78ad13dd2 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -2303,6 +2303,8 @@ static HRESULT wined3d_cs_map(struct wined3d_device_context *context, struct win * increasing the map count would be visible to applications. */ wined3d_not_from_cs(cs);
+ wined3d_resource_wait_idle(resource); + op = wined3d_device_context_require_space(context, sizeof(*op), WINED3D_CS_QUEUE_MAP); op->opcode = WINED3D_CS_OP_MAP; op->resource = resource; diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index fdde0a88cab..1b7fa29a65e 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -5360,7 +5360,6 @@ HRESULT CDECL wined3d_device_context_map(struct wined3d_device_context *context, }
flags = sanitise_map_flags(resource, flags); - wined3d_resource_wait_idle(resource);
return context->ops->map(context, resource, sub_resource_idx, map_desc, box, flags); }
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/wined3d/cs.c | 8 ++++++++ dlls/wined3d/device.c | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index 8a78ad13dd2..11f2d7cd5c7 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -2229,6 +2229,9 @@ static void wined3d_cs_issue_query(struct wined3d_device_context *context, struct wined3d_cs *cs = wined3d_cs_from_context(context); struct wined3d_cs_query_issue *op;
+ if (flags & WINED3DISSUE_END) + ++query->counter_main; + op = wined3d_device_context_require_space(context, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT); op->opcode = WINED3D_CS_OP_QUERY_ISSUE; op->query = query; @@ -2236,6 +2239,11 @@ static void wined3d_cs_issue_query(struct wined3d_device_context *context,
wined3d_device_context_submit(context, WINED3D_CS_QUEUE_DEFAULT); cs->queries_flushed = FALSE; + + if (flags & WINED3DISSUE_BEGIN) + query->state = QUERY_BUILDING; + else + query->state = QUERY_SIGNALLED; }
static void wined3d_cs_exec_preload_resource(struct wined3d_cs *cs, const void *data) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 1b7fa29a65e..4361a0637db 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -5377,15 +5377,7 @@ void CDECL wined3d_device_context_issue_query(struct wined3d_device_context *con { TRACE("context %p, query %p, flags %#x.\n", context, query, flags);
- if (flags & WINED3DISSUE_END) - ++query->counter_main; - query->device->cs->c.ops->issue_query(context, query, flags); - - if (flags & WINED3DISSUE_BEGIN) - query->state = QUERY_BUILDING; - else - query->state = QUERY_SIGNALLED; }
struct wined3d_rendertarget_view * CDECL wined3d_device_context_get_rendertarget_view(
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/wined3d/buffer.c | 2 +- dlls/wined3d/cs.c | 6 +++++- dlls/wined3d/device.c | 5 +---- dlls/wined3d/texture.c | 2 +- dlls/wined3d/wined3d_private.h | 6 +++--- 5 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index ea21f85bc9e..12d038c0120 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -1047,7 +1047,7 @@ static void wined3d_buffer_init_data(struct wined3d_buffer *buffer, if (buffer->flags & WINED3D_BUFFER_USE_BO) { wined3d_box_set(&box, 0, 0, resource->size, 1, 0, 1); - wined3d_device_context_emit_update_sub_resource(&device->cs->c, resource, + device->cs->c.ops->update_sub_resource(&device->cs->c, resource, 0, &box, data->data, data->row_pitch, data->slice_pitch); } else diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index 11f2d7cd5c7..5d9d19a85af 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -2548,12 +2548,14 @@ done: wined3d_resource_release(resource); }
-void wined3d_device_context_emit_update_sub_resource(struct wined3d_device_context *context, +static void wined3d_cs_update_sub_resource(struct wined3d_device_context *context, struct wined3d_resource *resource, unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch, unsigned int slice_pitch) { struct wined3d_cs_update_sub_resource *op;
+ wined3d_resource_wait_idle(resource); + op = wined3d_device_context_require_space(context, sizeof(*op), WINED3D_CS_QUEUE_MAP); op->opcode = WINED3D_CS_OP_UPDATE_SUB_RESOURCE; op->resource = resource; @@ -2823,6 +2825,7 @@ static const struct wined3d_device_context_ops wined3d_cs_st_ops = wined3d_cs_st_push_constants, wined3d_cs_map, wined3d_cs_unmap, + wined3d_cs_update_sub_resource, wined3d_cs_issue_query, wined3d_cs_flush, wined3d_cs_acquire_resource, @@ -2949,6 +2952,7 @@ static const struct wined3d_device_context_ops wined3d_cs_mt_ops = wined3d_cs_mt_push_constants, wined3d_cs_map, wined3d_cs_unmap, + wined3d_cs_update_sub_resource, wined3d_cs_issue_query, wined3d_cs_flush, wined3d_cs_acquire_resource, diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 4361a0637db..d9ce95b3f3e 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -5195,10 +5195,7 @@ void CDECL wined3d_device_context_update_sub_resource(struct wined3d_device_cont return; }
- wined3d_resource_wait_idle(resource); - - wined3d_device_context_emit_update_sub_resource(context, resource, - sub_resource_idx, box, data, row_pitch, depth_pitch); + context->ops->update_sub_resource(context, resource, sub_resource_idx, box, data, row_pitch, depth_pitch); }
void CDECL wined3d_device_context_resolve_sub_resource(struct wined3d_device_context *context, diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index e60ba8fff77..82facaecd29 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -4398,7 +4398,7 @@ HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct for (i = 0; i < sub_count; ++i) { wined3d_texture_get_level_box(*texture, i % (*texture)->level_count, &box); - wined3d_device_context_emit_update_sub_resource(&device->cs->c, &(*texture)->resource, + device->cs->c.ops->update_sub_resource(&device->cs->c, &(*texture)->resource, i, &box, data[i].data, data[i].row_pitch, data[i].slice_pitch); } } diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index f4060224de9..55fd7b450df 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -4694,6 +4694,9 @@ struct wined3d_device_context_ops unsigned int flags); HRESULT (*unmap)(struct wined3d_device_context *context, struct wined3d_resource *resource, unsigned int sub_resource_idx); + void (*update_sub_resource)(struct wined3d_device_context *context, struct wined3d_resource *resource, + unsigned int sub_resource_idx, const struct wined3d_box *box, + const void *data, unsigned int row_pitch, unsigned int slice_pitch); void (*issue_query)(struct wined3d_device_context *context, struct wined3d_query *query, unsigned int flags); void (*flush)(struct wined3d_device_context *context); void (*acquire_resource)(struct wined3d_device_context *context, struct wined3d_resource *resource); @@ -4829,9 +4832,6 @@ void wined3d_device_context_emit_set_vertex_declaration(struct wined3d_device_co struct wined3d_vertex_declaration *declaration) DECLSPEC_HIDDEN; void wined3d_device_context_emit_set_viewports(struct wined3d_device_context *context, unsigned int viewport_count, const struct wined3d_viewport *viewports) DECLSPEC_HIDDEN; -void wined3d_device_context_emit_update_sub_resource(struct wined3d_device_context *context, - struct wined3d_resource *resource, unsigned int sub_resource_idx, const struct wined3d_box *box, - const void *data, unsigned int row_pitch, unsigned int slice_pitch) DECLSPEC_HIDDEN;
static inline void wined3d_resource_wait_idle(struct wined3d_resource *resource) {
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/d3d11/tests/d3d11.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index 57e3955ac52..830fd7f1cc2 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -32226,8 +32226,12 @@ static void test_deferred_context_state(void) { ID3D11Buffer *green_buffer, *blue_buffer, *ret_buffer; ID3D11DeviceContext *immediate, *deferred; + ID3D11ShaderResourceView *srv, *ret_srv; struct d3d11_test_context test_context; + ID3D11RenderTargetView *rtv, *ret_rtv; + D3D11_TEXTURE2D_DESC texture_desc; ID3D11CommandList *list1, *list2; + ID3D11Texture2D *texture; ID3D11Device *device; HRESULT hr;
@@ -32287,6 +32291,32 @@ static void test_deferred_context_state(void) ID3D11DeviceContext_PSGetConstantBuffers(immediate, 0, 1, &ret_buffer); ok(!ret_buffer, "Got unexpected buffer %p.\n", ret_buffer);
+ /* Test unbinding an SRV when using the same resource as RTV. */ + + ID3D11Texture2D_GetDesc(test_context.backbuffer, &texture_desc); + texture_desc.BindFlags = D3D11_BIND_SHADER_RESOURCE | D3D11_BIND_RENDER_TARGET; + hr = ID3D11Device_CreateTexture2D(device, &texture_desc, NULL, &texture); + ok(hr == S_OK, "Failed to create texture, hr %#x.\n", hr); + hr = ID3D11Device_CreateRenderTargetView(device, (ID3D11Resource *)texture, NULL, &rtv); + ok(hr == S_OK, "Failed to create view, hr %#x.\n", hr); + hr = ID3D11Device_CreateShaderResourceView(device, (ID3D11Resource *)texture, NULL, &srv); + ok(hr == S_OK, "Failed to create view, hr %#x.\n", hr); + + ID3D11DeviceContext_PSSetShaderResources(deferred, 0, 1, &srv); + ID3D11DeviceContext_PSGetShaderResources(deferred, 0, 1, &ret_srv); + ok(ret_srv == srv, "Got unexpected SRV %p.\n", ret_srv); + ID3D11ShaderResourceView_Release(ret_srv); + + ID3D11DeviceContext_OMSetRenderTargets(deferred, 1, &rtv, NULL); + ID3D11DeviceContext_OMGetRenderTargets(deferred, 1, &ret_rtv, NULL); + ok(ret_rtv == rtv, "Got unexpected RTV %p.\n", ret_rtv); + ID3D11RenderTargetView_Release(ret_rtv); + ID3D11DeviceContext_PSGetShaderResources(deferred, 0, 1, &ret_srv); + ok(!ret_srv, "Got unexpected SRV %p.\n", ret_srv); + + ID3D11ShaderResourceView_Release(srv); + ID3D11RenderTargetView_Release(rtv); + ID3D11Texture2D_Release(texture); ID3D11CommandList_Release(list2); ID3D11CommandList_Release(list1); ID3D11DeviceContext_Release(deferred);
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=89972
Your paranoid android.
=== w1064 (32 bit report) ===
d3d11: d3d11.c:5811: Test failed: Got unexpected IAVertices count: 0. d3d11.c:5812: Test failed: Got unexpected IAPrimitives count: 0. d3d11.c:5813: Test failed: Got unexpected VSInvocations count: 0. d3d11.c:5816: Test failed: Got unexpected CInvocations count: 0. d3d11.c:5817: Test failed: Got unexpected CPrimitives count: 0.
=== w1064_tsign (32 bit report) ===
d3d11: d3d11.c:5811: Test failed: Got unexpected IAVertices count: 0. d3d11.c:5812: Test failed: Got unexpected IAPrimitives count: 0. d3d11.c:5813: Test failed: Got unexpected VSInvocations count: 0. d3d11.c:5816: Test failed: Got unexpected CInvocations count: 0. d3d11.c:5817: Test failed: Got unexpected CPrimitives count: 0.
=== w10pro64 (32 bit report) ===
d3d11: d3d11.c:5811: Test failed: Got unexpected IAVertices count: 0. d3d11.c:5812: Test failed: Got unexpected IAPrimitives count: 0. d3d11.c:5813: Test failed: Got unexpected VSInvocations count: 0. d3d11.c:5816: Test failed: Got unexpected CInvocations count: 0. d3d11.c:5817: Test failed: Got unexpected CPrimitives count: 0.
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com