winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
November 2018
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
951 discussions
Start a n
N
ew thread
Józef Kucia : d3d11/tests: Get rid of unnecessary clear from test_so_statistics_query().
by Alexandre Julliard
23 Nov '18
23 Nov '18
Module: wine Branch: master Commit: 5e86898626b2ba35b3be155311f463e33c3c0ff2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5e86898626b2ba35b3be1553…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Thu Nov 22 17:49:06 2018 +0100 d3d11/tests: Get rid of unnecessary clear from test_so_statistics_query(). Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d11/tests/d3d11.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index 016c32e..3efba83 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -5813,7 +5813,6 @@ static void test_so_statistics_query(void) unsigned int i; HRESULT hr; - static const float white[] = {1.0f, 1.0f, 1.0f, 1.0f}; static const DWORD vs_code[] = { #if 0 @@ -5994,8 +5993,6 @@ static void test_so_statistics_query(void) ID3D11DeviceContext_IASetPrimitiveTopology(context, D3D11_PRIMITIVE_TOPOLOGY_POINTLIST); - ID3D11DeviceContext_ClearRenderTargetView(context, test_context.backbuffer_rtv, white); - query_desc.Query = D3D11_QUERY_SO_STATISTICS; query_desc.MiscFlags = 0; hr = ID3D11Device_CreateQuery(device, &query_desc, (ID3D11Query **)&query);
1
0
0
0
Józef Kucia : d3d11/tests: Add test for SV_VertexID.
by Alexandre Julliard
23 Nov '18
23 Nov '18
Module: wine Branch: master Commit: f68a4b25a451929d1d688f2d845c09a5c12fa7d0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f68a4b25a451929d1d688f2d…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Fri Nov 23 10:13:11 2018 +0100 d3d11/tests: Add test for SV_VertexID. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d11/tests/d3d11.c | 189 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 189 insertions(+) diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index 5e0a3fe..016c32e 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -11736,6 +11736,194 @@ static void test_instance_id(void) release_test_context(&test_context); } +static void test_vertex_id(void) +{ + static const DWORD vs_code[] = + { +#if 0 + uint4 main(uint id : ID, uint instance_id : SV_InstanceID, uint vertex_id : SV_VertexID) : OUTPUT + { + return uint4(id, instance_id, vertex_id, 0); + } +#endif + 0x43425844, 0x5625197b, 0x588ccf8f, 0x48694905, 0x961d19ca, 0x00000001, 0x00000170, 0x00000003, + 0x0000002c, 0x000000a4, 0x000000d4, 0x4e475349, 0x00000070, 0x00000003, 0x00000008, 0x00000050, + 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000101, 0x00000053, 0x00000000, 0x00000008, + 0x00000001, 0x00000001, 0x00000101, 0x00000061, 0x00000000, 0x00000006, 0x00000001, 0x00000002, + 0x00000101, 0x53004449, 0x6e495f56, 0x6e617473, 0x44496563, 0x5f565300, 0x74726556, 0x44497865, + 0xababab00, 0x4e47534f, 0x00000028, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, + 0x00000001, 0x00000000, 0x0000000f, 0x5054554f, 0xab005455, 0x52444853, 0x00000094, 0x00010040, + 0x00000025, 0x0300005f, 0x00101012, 0x00000000, 0x04000060, 0x00101012, 0x00000001, 0x00000008, + 0x04000060, 0x00101012, 0x00000002, 0x00000006, 0x03000065, 0x001020f2, 0x00000000, 0x05000036, + 0x00102012, 0x00000000, 0x0010100a, 0x00000000, 0x05000036, 0x00102022, 0x00000000, 0x0010100a, + 0x00000001, 0x05000036, 0x00102042, 0x00000000, 0x0010100a, 0x00000002, 0x05000036, 0x00102082, + 0x00000000, 0x00004001, 0x00000000, 0x0100003e, + }; + D3D11_INPUT_ELEMENT_DESC layout_desc[] = + { + {"ID", 0, DXGI_FORMAT_R32_UINT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0}, + }; + static const D3D11_SO_DECLARATION_ENTRY so_declaration[] = + { + {0, "OUTPUT", 0, 0, 4, 0}, + }; + static const unsigned int vertices[] = + { + 0, + 1, + 2, + + 3, + 4, + 5, + + 6, + 7, + 8, + + 5, + 6, + 7, + }; + static const unsigned int indices[] = + { + 6, 7, 8, + + 0, 1, 2, + }; + struct uvec4 expected_values[] = + { + {0, 0, 0}, + {1, 0, 1}, + {2, 0, 2}, + {0, 1, 0}, + {1, 1, 1}, + {2, 1, 2}, + + {3, 0, 0}, + {4, 0, 1}, + {5, 0, 2}, + + {6, 0, 6}, + {7, 0, 7}, + {8, 0, 8}, + {6, 1, 6}, + {7, 1, 7}, + {8, 1, 8}, + + {5, 0, 0}, + {6, 0, 1}, + {7, 0, 2}, + }; + + BOOL found_values[ARRAY_SIZE(expected_values)] = {0}; + BOOL used_values[ARRAY_SIZE(expected_values)] = {0}; + struct d3d11_test_context test_context; + D3D11_QUERY_DATA_SO_STATISTICS data; + ID3D11Buffer *vb, *ib, *so_buffer; + ID3D11InputLayout *input_layout; + ID3D11DeviceContext *context; + D3D11_QUERY_DESC query_desc; + struct resource_readback rb; + unsigned int stride, offset; + ID3D11Asynchronous *query; + ID3D11GeometryShader *gs; + ID3D11VertexShader *vs; + ID3D11Device *device; + unsigned int count; + unsigned int i, j; + HRESULT hr; + + if (!init_test_context(&test_context, NULL)) + return; + device = test_context.device; + context = test_context.immediate_context; + + query_desc.Query = D3D11_QUERY_SO_STATISTICS; + query_desc.MiscFlags = 0; + hr = ID3D11Device_CreateQuery(device, &query_desc, (ID3D11Query **)&query); + ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + + hr = ID3D11Device_CreateInputLayout(device, layout_desc, ARRAY_SIZE(layout_desc), + vs_code, sizeof(vs_code), &input_layout); + ok(hr == S_OK, "Failed to create input layout, hr %#x.\n", hr); + + hr = ID3D11Device_CreateVertexShader(device, vs_code, sizeof(vs_code), NULL, &vs); + ok(hr == S_OK, "Failed to create vertex shader, hr %#x.\n", hr); + + stride = 16; + hr = ID3D11Device_CreateGeometryShaderWithStreamOutput(device, vs_code, sizeof(vs_code), + so_declaration, ARRAY_SIZE(so_declaration), &stride, 1, 0, NULL, &gs); + ok(hr == S_OK, "Failed to create geometry shader with stream output, hr %#x.\n", hr); + + vb = create_buffer(device, D3D11_BIND_VERTEX_BUFFER, sizeof(vertices), vertices); + ib = create_buffer(device, D3D11_BIND_INDEX_BUFFER, sizeof(indices), indices); + so_buffer = create_buffer(device, D3D11_BIND_STREAM_OUTPUT, 1024, NULL); + + ID3D11DeviceContext_VSSetShader(context, vs, NULL, 0); + ID3D11DeviceContext_GSSetShader(context, gs, NULL, 0); + ID3D11DeviceContext_IASetInputLayout(context, input_layout); + ID3D11DeviceContext_IASetPrimitiveTopology(context, D3D11_PRIMITIVE_TOPOLOGY_POINTLIST); + ID3D11DeviceContext_IASetIndexBuffer(context, ib, DXGI_FORMAT_R32_UINT, 0); + offset = 0; + stride = sizeof(*vertices); + ID3D11DeviceContext_IASetVertexBuffers(context, 0, 1, &vb, &stride, &offset); + + offset = 0; + ID3D11DeviceContext_SOSetTargets(context, 1, &so_buffer, &offset); + + ID3D11DeviceContext_Begin(context, query); + + ID3D11DeviceContext_DrawInstanced(context, 3, 2, 0, 0); + ID3D11DeviceContext_DrawInstanced(context, 3, 1, 3, 16); + + ID3D11DeviceContext_DrawIndexedInstanced(context, 3, 2, 0, 0, 0); + ID3D11DeviceContext_DrawIndexedInstanced(context, 3, 1, 3, 9, 7); + + ID3D11DeviceContext_End(context, query); + + get_query_data(context, query, &data, sizeof(data)); + count = data.NumPrimitivesWritten; + ok(count == ARRAY_SIZE(expected_values), "Got unexpected value %u.\n", count); + + count = min(count, ARRAY_SIZE(used_values)); + get_buffer_readback(so_buffer, &rb); + for (i = 0; i < ARRAY_SIZE(expected_values); ++i) + { + for (j = 0; j < count; ++j) + { + if (!used_values[j] && compare_uvec4(get_readback_uvec4(&rb, j, 0), &expected_values[i])) + { + found_values[i] = TRUE; + used_values[j] = TRUE; + break; + } + } + } + + for (i = 0; i < count; ++i) + { + const struct uvec4 *v = get_readback_uvec4(&rb, i, 0); + ok(used_values[i], "Found unexpected value {0x%08x, 0x%08x, 0x%08x, 0x%08x}.\n", v->x, v->y, v->z, v->w); + } + release_resource_readback(&rb); + + for (i = 0; i < ARRAY_SIZE(expected_values); ++i) + { + ok(found_values[i], "Failed to find value {0x%08x, 0x%08x, 0x%08x, 0x%08x}.\n", + expected_values[i].x, expected_values[i].y, expected_values[i].z, expected_values[i].w); + } + + ID3D11Asynchronous_Release(query); + ID3D11Buffer_Release(so_buffer); + ID3D11Buffer_Release(vb); + ID3D11Buffer_Release(ib); + ID3D11GeometryShader_Release(gs); + ID3D11VertexShader_Release(vs); + ID3D11InputLayout_Release(input_layout); + release_test_context(&test_context); +} + static void test_fragment_coords(void) { struct d3d11_test_context test_context; @@ -29024,6 +29212,7 @@ START_TEST(d3d11) queue_test(test_clear_state); queue_test(test_il_append_aligned); queue_test(test_instance_id); + queue_test(test_vertex_id); queue_test(test_fragment_coords); queue_test(test_initial_texture_data); queue_test(test_update_subresource);
1
0
0
0
Józef Kucia : wined3d: Fix mapping of SV_VertexID to gl_VertexID.
by Alexandre Julliard
23 Nov '18
23 Nov '18
Module: wine Branch: master Commit: 60d9211f0f2862c503fdb1fe229bc96f2cc06be4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=60d9211f0f2862c503fdb1fe…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Thu Nov 22 17:49:04 2018 +0100 wined3d: Fix mapping of SV_VertexID to gl_VertexID. Based on a patch by Andrew Wesie. In Direct3D, SV_VertexID generally starts from zero. In OpenGL, gl_VertexID starts from "first" parameter passed to glDrawArrays(), or from "baseVertex" parameter for indexed draw calls. The GL_ARB_shader_draw_parameters extension doesn't help us much because gl_BaseVertexARB is zero for non-indexed draw calls [1]. If gl_BaseVertexARB would be equal to "first" for non-indexed draw calls, we could simply use gl_VertexID - gl_BaseVertexARB. After this commit, SV_VertexID is still wrong for indirect draw calls because we cannot easily access the "first" field from struct DrawArraysIndirectCommand in a vertex shader. [1] - The ARB_shader_draw_parameters spec says that "In the case where the command has no <baseVertex> parameter, the value of <gl_BaseVertexARB> is zero." Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/cs.c | 9 ++++++++- dlls/wined3d/glsl_shader.c | 29 +++++++++++++++++++---------- dlls/wined3d/wined3d_private.h | 1 + 3 files changed, 28 insertions(+), 11 deletions(-) diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index ca79b71..c7c0c0b 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -845,6 +845,7 @@ static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data) const struct wined3d_d3d_info *d3d_info = &cs->device->adapter->d3d_info; const struct wined3d_gl_info *gl_info = &cs->device->adapter->gl_info; const struct wined3d_shader *geometry_shader; + struct wined3d_device *device = cs->device; int base_vertex_idx, load_base_vertex_idx; struct wined3d_state *state = &cs->state; const struct wined3d_cs_draw *op = data; @@ -867,7 +868,13 @@ static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data) else load_base_vertex_idx = 0; - state->base_vertex_index = base_vertex_idx; + if (state->base_vertex_index != base_vertex_idx) + { + state->base_vertex_index = base_vertex_idx; + for (i = 0; i < device->context_count; ++i) + device->contexts[i]->constant_update_mask |= WINED3D_SHADER_CONST_BASE_VERTEX_ID; + } + if (state->load_base_vertex_index != load_base_vertex_idx) { state->load_base_vertex_index = load_base_vertex_idx; diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 545e1bf..ad59e97 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -155,6 +155,7 @@ struct glsl_vs_program GLint uniform_i_locations[WINED3D_MAX_CONSTS_I]; GLint uniform_b_locations[WINED3D_MAX_CONSTS_B]; GLint pos_fixup_location; + GLint base_vertex_id_location; GLint modelview_matrix_location[MAX_VERTEX_BLENDS]; GLint projection_matrix_location; @@ -1775,22 +1776,21 @@ static void shader_glsl_load_color_key_constant(const struct glsl_ps_program *ps static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context *context, const struct wined3d_state *state) { - const struct glsl_context_data *ctx_data = context->shader_backend_data; const struct wined3d_shader *vshader = state->shader[WINED3D_SHADER_TYPE_VERTEX]; const struct wined3d_shader *pshader = state->shader[WINED3D_SHADER_TYPE_PIXEL]; + const struct glsl_context_data *ctx_data = context->shader_backend_data; + struct glsl_shader_prog_link *prog = ctx_data->glsl_program; const struct wined3d_gl_info *gl_info = context->gl_info; - struct shader_glsl_priv *priv = shader_priv; float position_fixup[4 * WINED3D_MAX_VIEWPORTS]; + struct shader_glsl_priv *priv = shader_priv; + unsigned int constant_version; DWORD update_mask; - - struct glsl_shader_prog_link *prog = ctx_data->glsl_program; - UINT constant_version; int i; - if (!prog) { - /* No GLSL program set - nothing to do. */ + /* No GLSL program set - nothing to do. */ + if (!prog) return; - } + constant_version = prog->constant_version; update_mask = context->constant_update_mask & prog->constant_update_mask; @@ -1829,6 +1829,12 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context checkGLcall("glUniform4fv"); } + if (update_mask & WINED3D_SHADER_CONST_BASE_VERTEX_ID) + { + GL_EXTCALL(glUniform1i(prog->vs.base_vertex_id_location, state->base_vertex_index)); + checkGLcall("base vertex id"); + } + if (update_mask & WINED3D_SHADER_CONST_FFP_MODELVIEW) { struct wined3d_matrix mat; @@ -2359,8 +2365,8 @@ static void shader_glsl_declare_generic_vertex_attribute(struct wined3d_string_b if (e->sysval_semantic == WINED3D_SV_VERTEX_ID) { - shader_addline(buffer, "vec4 vs_in%u = vec4(intBitsToFloat(gl_VertexID), 0.0, 0.0, 0.0);\n", - index); + shader_addline(buffer, "uniform int base_vertex_id;\n"); + shader_addline(buffer, "vec4 vs_in%u = vec4(intBitsToFloat(gl_VertexID - base_vertex_id), 0.0, 0.0, 0.0);\n", index); return; } if (e->sysval_semantic == WINED3D_SV_INSTANCE_ID) @@ -10123,6 +10129,7 @@ static void shader_glsl_init_vs_uniform_locations(const struct wined3d_gl_info * } vs->pos_fixup_location = GL_EXTCALL(glGetUniformLocation(program_id, "pos_fixup")); + vs->base_vertex_id_location = GL_EXTCALL(glGetUniformLocation(program_id, "base_vertex_id")); for (i = 0; i < MAX_VERTEX_BLENDS; ++i) { @@ -10694,6 +10701,8 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const entry->constant_update_mask |= WINED3D_SHADER_CONST_VS_B; if (entry->vs.pos_fixup_location != -1) entry->constant_update_mask |= WINED3D_SHADER_CONST_POS_FIXUP; + if (entry->vs.base_vertex_id_location != -1) + entry->constant_update_mask |= WINED3D_SHADER_CONST_BASE_VERTEX_ID; shader_glsl_load_program_resources(context, priv, program_id, vshader); } diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index f908ff7..4e80cc7 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -445,6 +445,7 @@ enum wined3d_shader_resource_type #define WINED3D_SHADER_CONST_FFP_LIGHTS 0x00080000 #define WINED3D_SHADER_CONST_FFP_PS 0x00100000 #define WINED3D_SHADER_CONST_FFP_COLOR_KEY 0x00200000 +#define WINED3D_SHADER_CONST_BASE_VERTEX_ID 0x00400000 enum wined3d_shader_register_type {
1
0
0
0
Józef Kucia : wined3d: Set base vertex index also for non-indexed draws.
by Alexandre Julliard
23 Nov '18
23 Nov '18
Module: wine Branch: master Commit: ceef4e77cf8cc62fbfb5a1bbedf5e9cf0d71c135 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ceef4e77cf8cc62fbfb5a1bb…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Thu Nov 22 17:49:03 2018 +0100 wined3d: Set base vertex index also for non-indexed draws. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/cs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index 095e3e4..ca79b71 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -857,6 +857,8 @@ static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data) if (op->parameters.indexed && gl_info->supported[ARB_DRAW_ELEMENTS_BASE_VERTEX]) base_vertex_idx = direct->base_vertex_idx; + else if (!op->parameters.indexed) + base_vertex_idx = direct->start_idx; } /* ARB_draw_indirect always supports a base vertex offset. */
1
0
0
0
Józef Kucia : wined3d: Set base vertex index in CS state.
by Alexandre Julliard
23 Nov '18
23 Nov '18
Module: wine Branch: master Commit: 13c9fda28f2f524435fcdea0d41310ac0d99c1b1 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=13c9fda28f2f524435fcdea0…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Thu Nov 22 17:49:02 2018 +0100 wined3d: Set base vertex index in CS state. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/cs.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index ffa4951..095e3e4 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -845,17 +845,27 @@ static void wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data) const struct wined3d_d3d_info *d3d_info = &cs->device->adapter->d3d_info; const struct wined3d_gl_info *gl_info = &cs->device->adapter->gl_info; const struct wined3d_shader *geometry_shader; + int base_vertex_idx, load_base_vertex_idx; struct wined3d_state *state = &cs->state; const struct wined3d_cs_draw *op = data; - int load_base_vertex_idx; unsigned int i; + base_vertex_idx = 0; + if (!op->parameters.indirect) + { + const struct wined3d_direct_draw_parameters *direct = &op->parameters.u.direct; + + if (op->parameters.indexed && gl_info->supported[ARB_DRAW_ELEMENTS_BASE_VERTEX]) + base_vertex_idx = direct->base_vertex_idx; + } + /* ARB_draw_indirect always supports a base vertex offset. */ if (!op->parameters.indirect && !gl_info->supported[ARB_DRAW_ELEMENTS_BASE_VERTEX]) load_base_vertex_idx = op->parameters.u.direct.base_vertex_idx; else load_base_vertex_idx = 0; + state->base_vertex_index = base_vertex_idx; if (state->load_base_vertex_index != load_base_vertex_idx) { state->load_base_vertex_index = load_base_vertex_idx;
1
0
0
0
Mingcong Bai : po: Update Simplified Chinese translation.
by Alexandre Julliard
23 Nov '18
23 Nov '18
Module: wine Branch: master Commit: 88eb4014c940e03fbc2d03aef0d2083d9f2acf90 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=88eb4014c940e03fbc2d03ae…
Author: Mingcong Bai <jeffbai(a)aosc.xyz> Date: Fri Nov 23 23:41:58 2018 +0800 po: Update Simplified Chinese translation. Signed-off-by: Mingcong Bai <jeffbai(a)aosc.xyz> Signed-off-by: Jactry Zeng <jzeng(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- po/zh_CN.po | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/po/zh_CN.po b/po/zh_CN.po index 787dd9a..b377dc8 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -5,7 +5,7 @@ msgstr "" "Project-Id-Version: Wine\n" "Report-Msgid-Bugs-To:
https://bugs.winehq.org\n
" "POT-Creation-Date: N/A\n" -"PO-Revision-Date: 2018-10-25 11:43-0500\n" +"PO-Revision-Date: 2018-11-21 10:10-0600\n" "Last-Translator: Mingcong Bai <jeffbai(a)aosc.xyz>\n" "Language-Team: Chinese (PRC)\n" "Language: zh_CN\n" @@ -2414,16 +2414,12 @@ msgid "You have successfully completed the Certificate Export Wizard." msgstr "您已成功完成证书导出向导。" #: cryptui.rc:456 cryptui.rc:179 -#, fuzzy -#| msgid "Select Certificate Store" msgid "Select Certificate" -msgstr "选择证书存储" +msgstr "选择证书" #: cryptui.rc:459 -#, fuzzy -#| msgid "Select the certificate store you want to use:" msgid "Select a certificate you want to use" -msgstr "选择您要使用的证书存储" +msgstr "选择您要使用的证书" #: cryptui.rc:30 cryptui.rc:93 msgid "Certificate" @@ -2936,20 +2932,16 @@ msgid "Note: The private key for this certificate is not exportable." msgstr "注意:证书的私钥不可导出。" #: cryptui.rc:177 -#, fuzzy -#| msgid "I&ntended purpose:" msgid "Intended Use" -msgstr "预期用途:" +msgstr "预期用途" #: cryptui.rc:178 shell32.rc:152 msgid "Location" msgstr "位置" #: cryptui.rc:180 -#, fuzzy -#| msgid "Select Certificate Store" msgid "Select a certificate" -msgstr "选择证书存储" +msgstr "选择证书" #: cryptui.rc:181 winefile.rc:102 winhlp32.rc:110 winhlp32.rc:85 msgid "Not yet implemented"
1
0
0
0
Henri Verbeet : wined3d: Get rid of the redundant WINED3D_TEXTURE_CREATE_MAPPABLE flag in surface_convert_format ().
by Alexandre Julliard
23 Nov '18
23 Nov '18
Module: wine Branch: master Commit: 926c554d9453280587a37ad363305d9ff322f61a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=926c554d9453280587a37ad3…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Nov 23 19:18:48 2018 +0330 wined3d: Get rid of the redundant WINED3D_TEXTURE_CREATE_MAPPABLE flag in surface_convert_format(). We already set WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/surface.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 18542e1..85f9489 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -640,8 +640,7 @@ static struct wined3d_texture *surface_convert_format(struct wined3d_texture *sr desc.height = wined3d_texture_get_level_height(src_texture, texture_level); desc.depth = 1; desc.size = 0; - if (FAILED(wined3d_texture_create(device, &desc, 1, 1, - WINED3D_TEXTURE_CREATE_MAPPABLE | WINED3D_TEXTURE_CREATE_DISCARD, + if (FAILED(wined3d_texture_create(device, &desc, 1, 1, WINED3D_TEXTURE_CREATE_DISCARD, NULL, NULL, &wined3d_null_parent_ops, &dst_texture))) { ERR("Failed to create a destination texture for conversion.\n");
1
0
0
0
Henri Verbeet : d3d8: Pass wined3d parameter types to d3d8_device_create_surface().
by Alexandre Julliard
23 Nov '18
23 Nov '18
Module: wine Branch: master Commit: 9863c9a46f9490d91724599616fc7c6101804aa9 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9863c9a46f9490d917245996…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Nov 23 19:18:47 2018 +0330 d3d8: Pass wined3d parameter types to d3d8_device_create_surface(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d8/device.c | 47 +++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 67996a7..3c83811 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -1144,29 +1144,26 @@ static HRESULT WINAPI d3d8_device_CreateIndexBuffer(IDirect3DDevice8 *iface, UIN return D3D_OK; } -static HRESULT d3d8_device_create_surface(struct d3d8_device *device, UINT width, UINT height, - D3DFORMAT format, DWORD flags, IDirect3DSurface8 **surface, UINT usage, D3DPOOL pool, - D3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality) +static HRESULT d3d8_device_create_surface(struct d3d8_device *device, enum wined3d_format_id format, + enum wined3d_multisample_type multisample_type, unsigned int bind_flags, unsigned int access, + unsigned int width, unsigned int height, IDirect3DSurface8 **surface) { struct wined3d_resource_desc desc; struct d3d8_surface *surface_impl; struct wined3d_texture *texture; HRESULT hr; - TRACE("device %p, width %u, height %u, format %#x, flags %#x, surface %p, " - "usage %#x, pool %#x, multisample_type %#x, multisample_quality %u.\n", - device, width, height, format, flags, surface, - usage, pool, multisample_type, multisample_quality); + TRACE("device %p, format %#x, multisample_type %#x, bind_flags %#x, " + "access %#x, width %u, height %u, surface %p.\n", + device, format, multisample_type, bind_flags, access, width, height, surface); desc.resource_type = WINED3D_RTYPE_TEXTURE_2D; - desc.format = wined3dformat_from_d3dformat(format); + desc.format = format; desc.multisample_type = multisample_type; - desc.multisample_quality = multisample_quality; - desc.usage = usage & WINED3DUSAGE_MASK; - if (pool == D3DPOOL_SCRATCH) - desc.usage |= WINED3DUSAGE_SCRATCH; - desc.bind_flags = wined3d_bind_flags_from_d3d8_usage(usage); - desc.access = wined3daccess_from_d3dpool(pool, usage); + desc.multisample_quality = 0; + desc.usage = 0; + desc.bind_flags = bind_flags; + desc.access = access; desc.width = width; desc.height = height; desc.depth = 1; @@ -1175,7 +1172,7 @@ static HRESULT d3d8_device_create_surface(struct d3d8_device *device, UINT width wined3d_mutex_lock(); if (FAILED(hr = wined3d_texture_create(device->wined3d_device, &desc, - 1, 1, flags, NULL, NULL, &d3d8_null_wined3d_parent_ops, &texture))) + 1, 1, 0, NULL, NULL, &d3d8_null_wined3d_parent_ops, &texture))) { wined3d_mutex_unlock(); WARN("Failed to create texture, hr %#x.\n", hr); @@ -1198,7 +1195,7 @@ static HRESULT WINAPI d3d8_device_CreateRenderTarget(IDirect3DDevice8 *iface, UI IDirect3DSurface8 **surface) { struct d3d8_device *device = impl_from_IDirect3DDevice8(iface); - DWORD flags = 0; + unsigned int access = WINED3D_RESOURCE_ACCESS_GPU; TRACE("iface %p, width %u, height %u, format %#x, multisample_type %#x, lockable %#x, surface %p.\n", iface, width, height, format, multisample_type, lockable, surface); @@ -1208,10 +1205,10 @@ static HRESULT WINAPI d3d8_device_CreateRenderTarget(IDirect3DDevice8 *iface, UI *surface = NULL; if (lockable) - flags |= WINED3D_TEXTURE_CREATE_MAPPABLE; + access |= WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W; - return d3d8_device_create_surface(device, width, height, format, flags, surface, - D3DUSAGE_RENDERTARGET, D3DPOOL_DEFAULT, multisample_type, 0); + return d3d8_device_create_surface(device, wined3dformat_from_d3dformat(format), + multisample_type, WINED3D_BIND_RENDER_TARGET, access, width, height, surface); } static HRESULT WINAPI d3d8_device_CreateDepthStencilSurface(IDirect3DDevice8 *iface, @@ -1228,9 +1225,9 @@ static HRESULT WINAPI d3d8_device_CreateDepthStencilSurface(IDirect3DDevice8 *if *surface = NULL; - /* TODO: Verify that Discard is false */ - return d3d8_device_create_surface(device, width, height, format, 0, - surface, D3DUSAGE_DEPTHSTENCIL, D3DPOOL_DEFAULT, multisample_type, 0); + return d3d8_device_create_surface(device, wined3dformat_from_d3dformat(format), + multisample_type, WINED3D_BIND_DEPTH_STENCIL, + WINED3D_RESOURCE_ACCESS_GPU, width, height, surface); } /* IDirect3DDevice8Impl::CreateImageSurface returns surface with pool type SYSTEMMEM */ @@ -1238,14 +1235,16 @@ static HRESULT WINAPI d3d8_device_CreateImageSurface(IDirect3DDevice8 *iface, UI UINT height, D3DFORMAT format, IDirect3DSurface8 **surface) { struct d3d8_device *device = impl_from_IDirect3DDevice8(iface); + unsigned int access = WINED3D_RESOURCE_ACCESS_CPU + | WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W; TRACE("iface %p, width %u, height %u, format %#x, surface %p.\n", iface, width, height, format, surface); *surface = NULL; - return d3d8_device_create_surface(device, width, height, format, 0, - surface, 0, D3DPOOL_SYSTEMMEM, D3DMULTISAMPLE_NONE, 0); + return d3d8_device_create_surface(device, wined3dformat_from_d3dformat(format), + WINED3D_MULTISAMPLE_NONE, 0, access, width, height, surface); } static HRESULT WINAPI d3d8_device_CopyRects(IDirect3DDevice8 *iface,
1
0
0
0
Henri Verbeet : d3d9: Pass wined3d parameter types to d3d9_device_create_surface().
by Alexandre Julliard
23 Nov '18
23 Nov '18
Module: wine Branch: master Commit: 175785edeb93aee28c360be35d86712d0df3b1af URL:
https://source.winehq.org/git/wine.git/?a=commit;h=175785edeb93aee28c360be3…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Nov 23 19:18:46 2018 +0330 d3d9: Pass wined3d parameter types to d3d9_device_create_surface(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d9/device.c | 56 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 0dec4ce..f19e2ae 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -1377,29 +1377,28 @@ static HRESULT WINAPI d3d9_device_CreateIndexBuffer(IDirect3DDevice9Ex *iface, U return D3D_OK; } -static HRESULT d3d9_device_create_surface(struct d3d9_device *device, UINT width, UINT height, - D3DFORMAT format, DWORD flags, IDirect3DSurface9 **surface, UINT usage, D3DPOOL pool, - D3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality, void *user_mem) +static HRESULT d3d9_device_create_surface(struct d3d9_device *device, unsigned int flags, + enum wined3d_format_id format, enum wined3d_multisample_type multisample_type, + unsigned int multisample_quality, unsigned int usage, unsigned int bind_flags, unsigned int access, + unsigned int width, unsigned int height, void *user_mem, IDirect3DSurface9 **surface) { struct wined3d_resource_desc desc; struct d3d9_surface *surface_impl; struct wined3d_texture *texture; HRESULT hr; - TRACE("device %p, width %u, height %u, format %#x, flags %#x, surface %p.\n" - "usage %#x, pool %#x, multisample_type %#x, multisample_quality %u.\n", - device, width, height, format, flags, surface, usage, pool, - multisample_type, multisample_quality); + TRACE("device %p, flags %#x, format %#x, multisample_type %#x, multisample_quality %u, " + "usage %#x, bind_flags %#x, access %#x, width %u, height %u, user_mem %p, surface %p.\n", + device, flags, format, multisample_type, multisample_quality, usage, + bind_flags, access, width, height, user_mem, surface); desc.resource_type = WINED3D_RTYPE_TEXTURE_2D; - desc.format = wined3dformat_from_d3dformat(format); + desc.format = format; desc.multisample_type = multisample_type; desc.multisample_quality = multisample_quality; - desc.usage = usage & WINED3DUSAGE_MASK; - if (pool == D3DPOOL_SCRATCH) - desc.usage |= WINED3DUSAGE_SCRATCH; - desc.bind_flags = wined3d_bind_flags_from_d3d9_usage(usage); - desc.access = wined3daccess_from_d3dpool(pool, usage); + desc.usage = usage; + desc.bind_flags = bind_flags; + desc.access = access; desc.width = width; desc.height = height; desc.depth = 1; @@ -1457,7 +1456,7 @@ static HRESULT WINAPI d3d9_device_CreateRenderTarget(IDirect3DDevice9Ex *iface, BOOL lockable, IDirect3DSurface9 **surface, HANDLE *shared_handle) { struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface); - DWORD flags = 0; + unsigned int access = WINED3D_RESOURCE_ACCESS_GPU; TRACE("iface %p, width %u, height %u, format %#x, multisample_type %#x, multisample_quality %u.\n" "lockable %#x, surface %p, shared_handle %p.\n", @@ -1477,10 +1476,10 @@ static HRESULT WINAPI d3d9_device_CreateRenderTarget(IDirect3DDevice9Ex *iface, } if (lockable) - flags |= WINED3D_TEXTURE_CREATE_MAPPABLE; + access |= WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W; - return d3d9_device_create_surface(device, width, height, format, flags, surface, - D3DUSAGE_RENDERTARGET, D3DPOOL_DEFAULT, multisample_type, multisample_quality, NULL); + return d3d9_device_create_surface(device, 0, wined3dformat_from_d3dformat(format), multisample_type, + multisample_quality, 0, WINED3D_BIND_RENDER_TARGET, access, width, height, NULL, surface); } static HRESULT WINAPI d3d9_device_CreateDepthStencilSurface(IDirect3DDevice9Ex *iface, UINT width, UINT height, @@ -1510,8 +1509,9 @@ static HRESULT WINAPI d3d9_device_CreateDepthStencilSurface(IDirect3DDevice9Ex * if (discard) flags |= WINED3D_TEXTURE_CREATE_DISCARD; - return d3d9_device_create_surface(device, width, height, format, flags, surface, - D3DUSAGE_DEPTHSTENCIL, D3DPOOL_DEFAULT, multisample_type, multisample_quality, NULL); + return d3d9_device_create_surface(device, flags, wined3dformat_from_d3dformat(format), + multisample_type, multisample_quality, 0, WINED3D_BIND_DEPTH_STENCIL, + WINED3D_RESOURCE_ACCESS_GPU, width, height, NULL, surface); } @@ -1785,6 +1785,7 @@ static HRESULT WINAPI d3d9_device_CreateOffscreenPlainSurface(IDirect3DDevice9Ex HANDLE *shared_handle) { struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface); + unsigned int usage, access; void *user_mem = NULL; TRACE("iface %p, width %u, height %u, format %#x, pool %#x, surface %p, shared_handle %p.\n", @@ -1818,8 +1819,14 @@ static HRESULT WINAPI d3d9_device_CreateOffscreenPlainSurface(IDirect3DDevice9Ex } } - return d3d9_device_create_surface(device, width, height, format, - WINED3D_TEXTURE_CREATE_MAPPABLE, surface, 0, pool, D3DMULTISAMPLE_NONE, 0, user_mem); + usage = 0; + if (pool == D3DPOOL_SCRATCH) + usage |= WINED3DUSAGE_SCRATCH; + access = wined3daccess_from_d3dpool(pool, usage) + | WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W; + + return d3d9_device_create_surface(device, 0, wined3dformat_from_d3dformat(format), + WINED3D_MULTISAMPLE_NONE, 0, usage, 0, access, width, height, user_mem, surface); } static HRESULT WINAPI d3d9_device_SetRenderTarget(IDirect3DDevice9Ex *iface, DWORD idx, IDirect3DSurface9 *surface) @@ -3885,7 +3892,7 @@ static HRESULT WINAPI d3d9_device_CreateDepthStencilSurfaceEx(IDirect3DDevice9Ex iface, width, height, format, multisample_type, multisample_quality, discard, surface, shared_handle, usage); - if (usage & D3DUSAGE_DEPTHSTENCIL) + if (usage & (D3DUSAGE_DEPTHSTENCIL | D3DUSAGE_RENDERTARGET)) { WARN("Invalid usage %#x.\n", usage); return D3DERR_INVALIDCALL; @@ -3898,8 +3905,9 @@ static HRESULT WINAPI d3d9_device_CreateDepthStencilSurfaceEx(IDirect3DDevice9Ex flags |= WINED3D_TEXTURE_CREATE_DISCARD; *surface = NULL; - return d3d9_device_create_surface(device, width, height, format, flags, surface, - D3DUSAGE_DEPTHSTENCIL | usage, D3DPOOL_DEFAULT, multisample_type, multisample_quality, NULL); + return d3d9_device_create_surface(device, flags, wined3dformat_from_d3dformat(format), + multisample_type, multisample_quality, usage & WINED3DUSAGE_MASK, WINED3D_BIND_DEPTH_STENCIL, + WINED3D_RESOURCE_ACCESS_GPU, width, height, NULL, surface); } static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_device_ResetEx(IDirect3DDevice9Ex *iface,
1
0
0
0
Henri Verbeet : d3d9: Disallow creating managed 2D textures on d3d9ex devices.
by Alexandre Julliard
23 Nov '18
23 Nov '18
Module: wine Branch: master Commit: d511b67da3a0fc4869c2ddfd7a5308f9de107655 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d511b67da3a0fc4869c2ddfd…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Nov 23 19:18:45 2018 +0330 d3d9: Disallow creating managed 2D textures on d3d9ex devices. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d9/tests/d3d9ex.c | 4 ++-- dlls/d3d9/texture.c | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dlls/d3d9/tests/d3d9ex.c b/dlls/d3d9/tests/d3d9ex.c index 6601c94..82acaf4 100644 --- a/dlls/d3d9/tests/d3d9ex.c +++ b/dlls/d3d9/tests/d3d9ex.c @@ -4273,8 +4273,8 @@ static void test_resource_access(void) case SURFACE_2D: hr = IDirect3DDevice9Ex_CreateTexture(device, 16, 16, 1, tests[j].usage, format, tests[j].pool, &texture_2d, NULL); - todo_wine_if(!tests[j].valid && !tests[j].usage && (tests[j].format == FORMAT_DEPTH - || tests[j].pool == D3DPOOL_MANAGED)) + todo_wine_if(!tests[j].valid && tests[j].format == FORMAT_DEPTH + && !tests[j].usage && tests[j].pool != D3DPOOL_MANAGED) ok(hr == (tests[j].valid && (tests[j].format != FORMAT_DEPTH || depth_2d) ? D3D_OK : D3DERR_INVALIDCALL), "Test %s %u: Got unexpected hr %#x.\n", surface_types[i].name, j, hr); diff --git a/dlls/d3d9/texture.c b/dlls/d3d9/texture.c index 0c58519..c73cbc0 100644 --- a/dlls/d3d9/texture.c +++ b/dlls/d3d9/texture.c @@ -1301,6 +1301,12 @@ HRESULT texture_init(struct d3d9_texture *texture, struct d3d9_device *device, DWORD flags = 0; HRESULT hr; + if (pool == D3DPOOL_MANAGED && device->d3d_parent->extended) + { + WARN("Managed resources are not supported by d3d9ex devices.\n"); + return D3DERR_INVALIDCALL; + } + texture->IDirect3DBaseTexture9_iface.lpVtbl = (const IDirect3DBaseTexture9Vtbl *)&d3d9_texture_2d_vtbl; d3d9_resource_init(&texture->resource); list_init(&texture->rtv_list);
1
0
0
0
← Newer
1
...
40
41
42
43
44
45
46
...
96
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Results per page:
10
25
50
100
200