Signed-off-by: Józef Kucia jkucia@codeweavers.com --- dlls/wined3d/device.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 648e35203709..92dfa0ccf931 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -949,15 +949,12 @@ static void device_init_swapchain_state(struct wined3d_device *device, struct wi BOOL ds_enable = swapchain->desc.enable_auto_depth_stencil; unsigned int i;
- if (device->fb.render_targets) + for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i) { - for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i) - { - wined3d_device_set_rendertarget_view(device, i, NULL, FALSE); - } - if (device->back_buffer_view) - wined3d_device_set_rendertarget_view(device, 0, device->back_buffer_view, TRUE); + wined3d_device_set_rendertarget_view(device, i, NULL, FALSE); } + if (device->back_buffer_view) + wined3d_device_set_rendertarget_view(device, 0, device->back_buffer_view, TRUE);
wined3d_device_set_depth_stencil_view(device, ds_enable ? device->auto_depth_stencil_view : NULL); }
Supported when ARB_framebuffer_no_attachments is available.
It was reported that no attachments framebuffers trigger GPU hangs in The Witcher 3 on some system configurations with radeonsi driver. MESA_EXTENSION_OVERRIDE=-GL_ARB_framebuffer_no_attachments can be used as a workaround until it's fixed.
Signed-off-by: Józef Kucia jkucia@codeweavers.com ---
I wasn't able to reproduce the mentioned issue. The game works fine here on 2 different AMD GPUs with radeonsi.
--- dlls/wined3d/context.c | 35 ++++++++++++++++++++++++++++------- dlls/wined3d/directx.c | 13 +++++++++++++ dlls/wined3d/state.c | 13 ++++--------- dlls/wined3d/wined3d_private.h | 3 +++ 4 files changed, 48 insertions(+), 16 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 975a79c9b660..c73e4d12b5ce 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -700,8 +700,8 @@ static struct fbo_entry *context_find_fbo_entry(struct wined3d_context *context, static void context_apply_fbo_entry(struct wined3d_context *context, GLenum target, struct fbo_entry *entry) { const struct wined3d_gl_info *gl_info = context->gl_info; - unsigned int i; GLuint read_binding, draw_binding; + unsigned int i;
if (entry->flags & WINED3D_FBO_ENTRY_FLAG_ATTACHED) { @@ -713,6 +713,16 @@ static void context_apply_fbo_entry(struct wined3d_context *context, GLenum targ draw_binding = context->fbo_draw_binding; context_bind_fbo(context, GL_FRAMEBUFFER, entry->id);
+ if (gl_info->supported[ARB_FRAMEBUFFER_NO_ATTACHMENTS]) + { + GL_EXTCALL(glFramebufferParameteri(GL_FRAMEBUFFER, + GL_FRAMEBUFFER_DEFAULT_WIDTH, gl_info->limits.framebuffer_width)); + GL_EXTCALL(glFramebufferParameteri(GL_FRAMEBUFFER, + GL_FRAMEBUFFER_DEFAULT_HEIGHT, gl_info->limits.framebuffer_height)); + GL_EXTCALL(glFramebufferParameteri(GL_FRAMEBUFFER, GL_FRAMEBUFFER_DEFAULT_LAYERS, 1)); + GL_EXTCALL(glFramebufferParameteri(GL_FRAMEBUFFER, GL_FRAMEBUFFER_DEFAULT_SAMPLES, 1)); + } + /* Apply render targets */ for (i = 0; i < gl_info->limits.buffers; ++i) { @@ -2996,12 +3006,13 @@ void context_apply_blit_state(struct wined3d_context *context, const struct wine context_invalidate_state(context, STATE_FRAMEBUFFER); }
-static BOOL context_validate_rt_config(UINT rt_count, struct wined3d_rendertarget_view * const *rts, +static BOOL have_framebuffer_attachment(unsigned int rt_count, struct wined3d_rendertarget_view * const *rts, const struct wined3d_rendertarget_view *ds) { unsigned int i;
- if (ds) return TRUE; + if (ds) + return TRUE;
for (i = 0; i < rt_count; ++i) { @@ -3009,7 +3020,6 @@ static BOOL context_validate_rt_config(UINT rt_count, struct wined3d_rendertarge return TRUE; }
- WARN("Invalid render target config, need at least one attachment.\n"); return FALSE; }
@@ -3026,8 +3036,11 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win if (isStateDirty(context, STATE_FRAMEBUFFER) || fb != state->fb || rt_count != gl_info->limits.buffers) { - if (!context_validate_rt_config(rt_count, rts, dsv)) + if (!have_framebuffer_attachment(rt_count, rts, dsv)) + { + WARN("Invalid render target config, need at least one attachment.\n"); return FALSE; + }
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) { @@ -3908,8 +3921,16 @@ static BOOL context_apply_draw_state(struct wined3d_context *context, unsigned int i; WORD map;
- if (!context_validate_rt_config(gl_info->limits.buffers, fb->render_targets, fb->depth_stencil)) - return FALSE; + if (!have_framebuffer_attachment(gl_info->limits.buffers, fb->render_targets, fb->depth_stencil)) + { + if (!gl_info->supported[ARB_FRAMEBUFFER_NO_ATTACHMENTS]) + { + FIXME("OpenGL implementation does not support framebuffers with no attachments.\n"); + return FALSE; + } + + context_set_render_offscreen(context, TRUE); + }
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO && isStateDirty(context, STATE_FRAMEBUFFER)) { diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index a95ded351dde..b73966afec26 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -3779,6 +3779,19 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info) gl_info->limits.samples = gl_max; }
+ if (gl_info->supported[ARB_FRAMEBUFFER_NO_ATTACHMENTS]) + { + gl_info->gl_ops.gl.p_glGetIntegerv(GL_MAX_FRAMEBUFFER_WIDTH, &gl_max); + gl_info->limits.framebuffer_width = gl_max; + gl_info->gl_ops.gl.p_glGetIntegerv(GL_MAX_FRAMEBUFFER_HEIGHT, &gl_max); + gl_info->limits.framebuffer_height = gl_max; + } + else + { + gl_info->limits.framebuffer_width = gl_info->limits.texture_size; + gl_info->limits.framebuffer_height = gl_info->limits.texture_size; + } + gl_info->limits.samplers[WINED3D_SHADER_TYPE_PIXEL] = min(gl_info->limits.samplers[WINED3D_SHADER_TYPE_PIXEL], MAX_GL_FRAGMENT_SAMPLERS); sampler_count = 0; diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 407ad623802d..fd858c505391 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -4671,17 +4671,15 @@ static void viewport_miscpart(struct wined3d_context *context, const struct wine } else if (depth_stencil) { - width = depth_stencil->width; height = depth_stencil->height; } else { - FIXME("No attachments draw calls not supported.\n"); - return; + height = gl_info->limits.framebuffer_height; }
gl_info->gl_ops.gl.p_glDepthRange(vp.min_z, vp.max_z); - checkGLcall("glDepthRange"); + /* Note: GL requires lower left, DirectX supplies upper left. This is * reversed when using offscreen rendering. */ y = context->render_offscreen ? vp.y : height - (vp.y + vp.height); @@ -4690,7 +4688,7 @@ static void viewport_miscpart(struct wined3d_context *context, const struct wine GL_EXTCALL(glViewportIndexedf(0, vp.x, y, vp.width, vp.height)); else gl_info->gl_ops.gl.p_glViewport(vp.x, y, vp.width, vp.height); - checkGLcall("glViewport"); + checkGLcall("setting clip space and viewport"); }
static void viewport_miscpart_cc(struct wined3d_context *context, @@ -4717,17 +4715,14 @@ static void viewport_miscpart_cc(struct wined3d_context *context, } else if (depth_stencil) { - width = depth_stencil->width; height = depth_stencil->height; } else { - FIXME("No attachments draw calls not supported.\n"); - return; + height = gl_info->limits.framebuffer_height; }
gl_info->gl_ops.gl.p_glDepthRange(vp.min_z, vp.max_z); - checkGLcall("glDepthRange");
if (context->render_offscreen) { diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index f085f2d8b85e..1c4c3ef2b49a 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2533,6 +2533,9 @@ struct wined3d_gl_limits
unsigned int texture_buffer_offset_alignment;
+ unsigned int framebuffer_width; + unsigned int framebuffer_height; + UINT glsl_varyings; UINT glsl_vs_float_constants; UINT glsl_ps_float_constants;
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
No attachment draw calls are always offscreen.
Signed-off-by: Józef Kucia jkucia@codeweavers.com --- dlls/wined3d/state.c | 89 +++++++++++++++++++++++----------------------------- 1 file changed, 39 insertions(+), 50 deletions(-)
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index fd858c505391..e3c39f64e0dd 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -4651,22 +4651,32 @@ static void vertexdeclaration(struct wined3d_context *context, const struct wine } }
-static void viewport_miscpart(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) +static void get_viewport(struct wined3d_context *context, const struct wined3d_state *state, + struct wined3d_viewport *viewport) { const struct wined3d_rendertarget_view *depth_stencil = state->fb->depth_stencil; const struct wined3d_rendertarget_view *target = state->fb->render_targets[0]; - const struct wined3d_gl_info *gl_info = context->gl_info; - struct wined3d_viewport vp = state->viewport; unsigned int width, height; - float y; + + *viewport = state->viewport;
if (target) { - if (vp.width > target->width) - vp.width = target->width; - if (vp.height > target->height) - vp.height = target->height; + if (viewport->width > target->width) + viewport->width = target->width; + if (viewport->height > target->height) + viewport->height = target->height; + } + + /* + * Note: GL requires lower left, DirectX supplies upper left. This is + * reversed when using offscreen rendering. + */ + if (context->render_offscreen) + return;
+ if (target) + { wined3d_rendertarget_view_get_drawable_size(target, context, &width, &height); } else if (depth_stencil) @@ -4675,67 +4685,46 @@ static void viewport_miscpart(struct wined3d_context *context, const struct wine } else { - height = gl_info->limits.framebuffer_height; + FIXME("Could not get the height of render targets.\n"); + return; }
- gl_info->gl_ops.gl.p_glDepthRange(vp.min_z, vp.max_z); + viewport->y = height - (viewport->y + viewport->height); +} + +static void viewport_miscpart(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) +{ + const struct wined3d_gl_info *gl_info = context->gl_info; + struct wined3d_viewport vp;
- /* Note: GL requires lower left, DirectX supplies upper left. This is - * reversed when using offscreen rendering. */ - y = context->render_offscreen ? vp.y : height - (vp.y + vp.height); + get_viewport(context, state, &vp); + + gl_info->gl_ops.gl.p_glDepthRange(vp.min_z, vp.max_z);
if (gl_info->supported[ARB_VIEWPORT_ARRAY]) - GL_EXTCALL(glViewportIndexedf(0, vp.x, y, vp.width, vp.height)); + GL_EXTCALL(glViewportIndexedf(0, vp.x, vp.y, vp.width, vp.height)); else - gl_info->gl_ops.gl.p_glViewport(vp.x, y, vp.width, vp.height); + gl_info->gl_ops.gl.p_glViewport(vp.x, vp.y, vp.width, vp.height); checkGLcall("setting clip space and viewport"); }
static void viewport_miscpart_cc(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { - const struct wined3d_rendertarget_view *depth_stencil = state->fb->depth_stencil; - const struct wined3d_rendertarget_view *target = state->fb->render_targets[0]; - /* See get_projection_matrix() in utils.c for a discussion about those - * values. */ + /* See get_projection_matrix() in utils.c for a discussion about those values. */ float pixel_center_offset = context->d3d_info->wined3d_creation_flags & WINED3D_PIXEL_CENTER_INTEGER ? 63.0f / 128.0f : -1.0f / 128.0f; const struct wined3d_gl_info *gl_info = context->gl_info; - struct wined3d_viewport vp = state->viewport; - unsigned int width, height; - - if (target) - { - if (vp.width > target->width) - vp.width = target->width; - if (vp.height > target->height) - vp.height = target->height; + struct wined3d_viewport vp;
- wined3d_rendertarget_view_get_drawable_size(target, context, &width, &height); - } - else if (depth_stencil) - { - height = depth_stencil->height; - } - else - { - height = gl_info->limits.framebuffer_height; - } + get_viewport(context, state, &vp); + vp.x += pixel_center_offset; + vp.y += pixel_center_offset;
gl_info->gl_ops.gl.p_glDepthRange(vp.min_z, vp.max_z);
- if (context->render_offscreen) - { - GL_EXTCALL(glClipControl(GL_UPPER_LEFT, GL_ZERO_TO_ONE)); - GL_EXTCALL(glViewportIndexedf(0, vp.x + pixel_center_offset, vp.y + pixel_center_offset, - vp.width, vp.height)); - } - else - { - GL_EXTCALL(glClipControl(GL_LOWER_LEFT, GL_ZERO_TO_ONE)); - GL_EXTCALL(glViewportIndexedf(0, vp.x + pixel_center_offset, - (height - (vp.y + vp.height)) + pixel_center_offset, vp.width, vp.height)); - } + GL_EXTCALL(glClipControl(context->render_offscreen ? GL_UPPER_LEFT : GL_LOWER_LEFT, GL_ZERO_TO_ONE)); + GL_EXTCALL(glViewportIndexedf(0, vp.x, vp.y, vp.width, vp.height)); checkGLcall("setting clip space and viewport"); }
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
In Direct3D 10+, the render target at index 0 can be set to NULL.
Signed-off-by: Józef Kucia jkucia@codeweavers.com ---
Maybe we should consider looking into draw_binding for each render target separately, but it should be a separate patch, probably. For now just use draw_binding from the first non-NULL render target.
--- dlls/wined3d/context.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index c73e4d12b5ce..c9efad03db1e 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -3168,6 +3168,7 @@ void context_state_fb(struct wined3d_context *context, const struct wined3d_stat { DWORD rt_mask = find_draw_buffers_mask(context, state); const struct wined3d_fb_state *fb = state->fb; + DWORD color_location = 0; DWORD *cur_mask;
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) @@ -3184,18 +3185,20 @@ void context_state_fb(struct wined3d_context *context, const struct wined3d_stat memset(context->blit_targets, 0, sizeof(context->blit_targets)); for (i = 0; i < context->gl_info->limits.buffers; ++i) { - if (fb->render_targets[i]) - { - context->blit_targets[i].gl_view = fb->render_targets[i]->gl_view; - context->blit_targets[i].resource = fb->render_targets[i]->resource; - context->blit_targets[i].sub_resource_idx = fb->render_targets[i]->sub_resource_idx; - context->blit_targets[i].layer_count = fb->render_targets[i]->layer_count; - } + if (!fb->render_targets[i]) + continue; + + context->blit_targets[i].gl_view = fb->render_targets[i]->gl_view; + context->blit_targets[i].resource = fb->render_targets[i]->resource; + context->blit_targets[i].sub_resource_idx = fb->render_targets[i]->sub_resource_idx; + context->blit_targets[i].layer_count = fb->render_targets[i]->layer_count; + + if (!color_location) + color_location = fb->render_targets[i]->resource->draw_binding; } context_apply_fbo_state(context, GL_FRAMEBUFFER, context->blit_targets, wined3d_rendertarget_view_get_surface(fb->depth_stencil), - fb->render_targets[0] ? fb->render_targets[0]->resource->draw_binding : 0, - fb->depth_stencil ? fb->depth_stencil->resource->draw_binding : 0); + color_location, fb->depth_stencil ? fb->depth_stencil->resource->draw_binding : 0); } }
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
On 1 March 2018 at 19:36, Józef Kucia jkucia@codeweavers.com wrote:
Maybe we should consider looking into draw_binding for each render target separately, but it should be a separate patch, probably. For now just use draw_binding from the first non-NULL render target.
Yeah. IIRC previously this wasn't an issue because you couldn't mix render targets with different sample counts, so the location would have to match for all attachments.
Signed-off-by: Józef Kucia jkucia@codeweavers.com --- dlls/d3d11/tests/d3d11.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index 713a03099bf8..1826114c2c81 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -7887,10 +7887,10 @@ static void test_sample_c_lz(void)
static void test_multiple_render_targets(void) { + ID3D11RenderTargetView *rtv[4], *tmp_rtv[4]; D3D11_TEXTURE2D_DESC texture_desc; ID3D11InputLayout *input_layout; unsigned int stride, offset, i; - ID3D11RenderTargetView *rtv[4]; ID3D11DeviceContext *context; ID3D11Texture2D *rt[4]; ID3D11VertexShader *vs; @@ -8025,9 +8025,21 @@ static void test_multiple_render_targets(void)
for (i = 0; i < ARRAY_SIZE(rtv); ++i) ID3D11DeviceContext_ClearRenderTargetView(context, rtv[i], red); - ID3D11DeviceContext_Draw(context, 4, 0); + check_texture_color(rt[0], 0xffffffff, 2); + check_texture_color(rt[1], 0x7f7f7f7f, 2); + check_texture_color(rt[2], 0x33333333, 2); + check_texture_color(rt[3], 0xff7f3300, 2);
+ for (i = 0; i < ARRAY_SIZE(rtv); ++i) + ID3D11DeviceContext_ClearRenderTargetView(context, rtv[i], red); + for (i = 0; i < ARRAY_SIZE(tmp_rtv); ++i) + { + memset(tmp_rtv, 0, sizeof(tmp_rtv)); + tmp_rtv[i] = rtv[i]; + ID3D11DeviceContext_OMSetRenderTargets(context, 4, tmp_rtv, NULL); + ID3D11DeviceContext_Draw(context, 4, 0); + } check_texture_color(rt[0], 0xffffffff, 2); check_texture_color(rt[1], 0x7f7f7f7f, 2); check_texture_color(rt[2], 0x33333333, 2);
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Józef Kucia jkucia@codeweavers.com --- dlls/d3d11/tests/d3d11.c | 38 +++++++------------------------------- 1 file changed, 7 insertions(+), 31 deletions(-)
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index 1826114c2c81..6d7fccdcfb6f 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -12614,14 +12614,13 @@ static void test_draw_uav_only(void) ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr);
ID3D11DeviceContext_PSSetShader(context, ps, NULL, 0); - /* FIXME: Set the render targets to NULL when no attachment draw calls are supported in wined3d. */ - ID3D11DeviceContext_OMSetRenderTargetsAndUnorderedAccessViews(context, 1, &test_context.backbuffer_rtv, NULL, + ID3D11DeviceContext_OMSetRenderTargetsAndUnorderedAccessViews(context, 0, NULL, NULL, 0, 1, &uav, NULL);
ID3D11DeviceContext_ClearUnorderedAccessViewUint(context, uav, values); memset(&vp, 0, sizeof(vp)); - vp.Width = 1.0f; - vp.Height = 100.0f; + vp.Width = 10.0f; + vp.Height = 10.0f; ID3D11DeviceContext_RSSetViewports(context, 1, &vp); ID3D11DeviceContext_ClearUnorderedAccessViewUint(context, uav, values); draw_quad(&test_context); @@ -17685,9 +17684,8 @@ static void test_ps_cs_uav_binding(void) ID3D11DeviceContext_CSSetConstantBuffers(context, 0, 1, &cs_cb); ID3D11DeviceContext_CSSetUnorderedAccessViews(context, 0, 1, &cs_uav, NULL); ID3D11DeviceContext_PSSetConstantBuffers(context, 0, 1, &ps_cb); - /* FIXME: Set the render targets to NULL when no attachment draw calls are supported in wined3d. */ ID3D11DeviceContext_OMSetRenderTargetsAndUnorderedAccessViews(context, - 1, &test_context.backbuffer_rtv, NULL, 1, 1, &ps_uav, NULL); + 0, NULL, NULL, 1, 1, &ps_uav, NULL);
ID3D11DeviceContext_ClearUnorderedAccessViewFloat(context, cs_uav, zero); check_texture_float(cs_texture, 0.0f, 2); @@ -17749,11 +17747,8 @@ static void test_atomic_instructions(void) D3D11_UNORDERED_ACCESS_VIEW_DESC uav_desc; struct d3d11_test_context test_context; struct resource_readback rb, out_rb; - D3D11_TEXTURE2D_DESC texture_desc; D3D11_BUFFER_DESC buffer_desc; ID3D11DeviceContext *context; - ID3D11RenderTargetView *rtv; - ID3D11Texture2D *texture; ID3D11ComputeShader *cs; ID3D11PixelShader *ps; ID3D11Device *device; @@ -17883,22 +17878,6 @@ static void test_atomic_instructions(void) device = test_context.device; context = test_context.immediate_context;
- texture_desc.Width = 1; - texture_desc.Height = 1; - texture_desc.MipLevels = 1; - texture_desc.ArraySize = 1; - texture_desc.Format = DXGI_FORMAT_R32_FLOAT; - texture_desc.SampleDesc.Count = 1; - texture_desc.SampleDesc.Quality = 0; - texture_desc.Usage = D3D11_USAGE_DEFAULT; - texture_desc.BindFlags = D3D11_BIND_RENDER_TARGET; - texture_desc.CPUAccessFlags = 0; - texture_desc.MiscFlags = 0; - hr = ID3D11Device_CreateTexture2D(device, &texture_desc, NULL, &texture); - ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr); - hr = ID3D11Device_CreateRenderTargetView(device, (ID3D11Resource *)texture, NULL, &rtv); - ok(SUCCEEDED(hr), "Failed to create rendertarget view, hr %#x.\n", hr); - cb = create_buffer(device, D3D11_BIND_CONSTANT_BUFFER, 2 * sizeof(struct uvec4), NULL); ID3D11DeviceContext_PSSetConstantBuffers(context, 0, 1, &cb); ID3D11DeviceContext_CSSetConstantBuffers(context, 0, 1, &cb); @@ -17925,8 +17904,8 @@ static void test_atomic_instructions(void)
vp.TopLeftX = 0.0f; vp.TopLeftY = 0.0f; - vp.Width = texture_desc.Width; - vp.Height = texture_desc.Height; + vp.Width = 1.0f; + vp.Height = 1.0f; vp.MinDepth = 0.0f; vp.MaxDepth = 1.0f; ID3D11DeviceContext_RSSetViewports(context, 1, &vp); @@ -17949,8 +17928,7 @@ static void test_atomic_instructions(void) ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)in_buffer, 0, NULL, test->input, 0, 0);
- /* FIXME: Set the render targets to NULL when no attachment draw calls are supported in wined3d. */ - ID3D11DeviceContext_OMSetRenderTargetsAndUnorderedAccessViews(context, 1, &rtv, NULL, + ID3D11DeviceContext_OMSetRenderTargetsAndUnorderedAccessViews(context, 0, NULL, NULL, 0, 1, &in_uav, NULL);
draw_quad(&test_context); @@ -18007,8 +17985,6 @@ static void test_atomic_instructions(void) ID3D11Buffer_Release(out_buffer); ID3D11ComputeShader_Release(cs); ID3D11PixelShader_Release(ps); - ID3D11RenderTargetView_Release(rtv); - ID3D11Texture2D_Release(texture); ID3D11UnorderedAccessView_Release(in_uav); ID3D11UnorderedAccessView_Release(out_uav); release_test_context(&test_context);
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com