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
July
June
May
April
March
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
March 2015
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 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
775 discussions
Start a n
N
ew thread
Andrew Eikum : oleaut32: Allow typelib filenames longer than MAX_PATH.
by Alexandre Julliard
24 Mar '15
24 Mar '15
Module: wine Branch: master Commit: 4a7b5856daa5ce09bb52c2baa3d524a5ea1cae1b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4a7b5856daa5ce09bb52c2baa…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Mon Mar 23 09:56:58 2015 -0500 oleaut32: Allow typelib filenames longer than MAX_PATH. --- dlls/oleaut32/typelib.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 54dbc05..b8325c0 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -3353,18 +3353,27 @@ static HRESULT TLB_ReadTypeLib(LPCWSTR pszFileName, LPWSTR pszPath, UINT cchPath h = CreateFileW(pszPath, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if(h != INVALID_HANDLE_VALUE){ - FILE_NAME_INFORMATION *info; - char data[MAX_PATH * sizeof(WCHAR) + sizeof(info->FileNameLength)]; + FILE_NAME_INFORMATION size_info; BOOL br; - info = (FILE_NAME_INFORMATION*)data; /* GetFileInformationByHandleEx returns the path of the file without * WOW64 redirection */ - br = GetFileInformationByHandleEx(h, FileNameInfo, data, sizeof(data)); - if(br){ - info->FileName[info->FileNameLength / sizeof(WCHAR)] = 0; - lstrcpynW(pszPath + 2, info->FileName, cchPath - 2); + br = GetFileInformationByHandleEx(h, FileNameInfo, &size_info, sizeof(size_info)); + if(br || GetLastError() == ERROR_MORE_DATA){ + FILE_NAME_INFORMATION *info; + DWORD size = sizeof(*info) + size_info.FileNameLength + sizeof(WCHAR); + + info = HeapAlloc(GetProcessHeap(), 0, size); + + br = GetFileInformationByHandleEx(h, FileNameInfo, info, size); + if(br){ + info->FileName[info->FileNameLength / sizeof(WCHAR)] = 0; + lstrcpynW(pszPath + 2, info->FileName, cchPath - 2); + } + + HeapFree(GetProcessHeap(), 0, info); } + CloseHandle(h); }
1
0
0
0
Sebastian Lackner : user32: Use C_ASSERT to ensure user_thread_info fits into TEB->Win32ClientInfo.
by Alexandre Julliard
23 Mar '15
23 Mar '15
Module: wine Branch: master Commit: 5e5adcffb5e665d3d1562fd8598c5e1ae016054f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5e5adcffb5e665d3d1562fd85…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Mon Mar 23 14:12:38 2015 +0100 user32: Use C_ASSERT to ensure user_thread_info fits into TEB->Win32ClientInfo. --- dlls/user32/user_private.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h index adf3f7d..919540d 100644 --- a/dlls/user32/user_private.h +++ b/dlls/user32/user_private.h @@ -189,10 +189,10 @@ struct user_thread_info HWND top_window; /* Desktop window */ HWND msg_window; /* HWND_MESSAGE parent window */ RAWINPUT *rawinput; - - ULONG pad[6]; /* Available for more data */ }; +C_ASSERT( sizeof(struct user_thread_info) <= sizeof(((TEB *)0)->Win32ClientInfo) ); + struct hook_extra_info { HHOOK handle;
1
0
0
0
Matteo Bruni : wined3d: Introduce a get_texture_matrix() function.
by Alexandre Julliard
23 Mar '15
23 Mar '15
Module: wine Branch: master Commit: 74cda79ac3d813aa8d9364e4d619d4c4605a09c9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=74cda79ac3d813aa8d9364e4d…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Fri Mar 20 13:50:55 2015 +0100 wined3d: Introduce a get_texture_matrix() function. --- dlls/wined3d/state.c | 40 +++++++++-------------------------- dlls/wined3d/utils.c | 47 +++++++++++++++++++++++++++++++++--------- dlls/wined3d/wined3d_private.h | 5 ++--- 3 files changed, 49 insertions(+), 43 deletions(-) diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 9a40876..bfef4b0 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -3278,12 +3278,10 @@ void tex_alphaop(struct wined3d_context *context, const struct wined3d_state *st void transform_texture(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { - DWORD texUnit = (state_id - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1); - const struct wined3d_device *device = context->swapchain->device; const struct wined3d_gl_info *gl_info = context->gl_info; - DWORD mapped_stage = context->tex_unit_map[texUnit]; - BOOL generated; - int coordIdx; + unsigned int tex = (state_id - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1); + unsigned int mapped_stage = context->tex_unit_map[tex]; + struct wined3d_matrix mat; /* Ignore this when a vertex shader is used, or if the streams aren't sorted out yet */ if (use_vs(state) || isStateDirty(context, STATE_VDECL)) @@ -3296,31 +3294,13 @@ void transform_texture(struct wined3d_context *context, const struct wined3d_sta if (mapped_stage >= gl_info->limits.textures) return; context_active_texture(context, gl_info, mapped_stage); - generated = (state->texture_states[texUnit][WINED3D_TSS_TEXCOORD_INDEX] & 0xffff0000) != WINED3DTSS_TCI_PASSTHRU; - coordIdx = min(state->texture_states[texUnit][WINED3D_TSS_TEXCOORD_INDEX & 0x0000ffff], MAX_TEXTURES - 1); - - set_texture_matrix(gl_info, &state->transforms[WINED3D_TS_TEXTURE0 + texUnit], - state->texture_states[texUnit][WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS], - generated, context->last_was_rhw, - context->stream_info.use_map & (1 << (WINED3D_FFP_TEXCOORD0 + coordIdx)) - ? context->stream_info.elements[WINED3D_FFP_TEXCOORD0 + coordIdx].format->id - : WINED3DFMT_UNKNOWN, - device->shader_backend->shader_has_ffp_proj_control(device->shader_priv)); - - /* The sampler applying function calls us if this changes */ - if ((context->lastWasPow2Texture & (1 << texUnit)) && state->textures[texUnit]) - { - if(generated) { - FIXME("Non-power2 texture being used with generated texture coords\n"); - } - /* NP2 texcoord fixup is implemented for pixelshaders so only enable the - fixed-function-pipeline fixup via pow2Matrix when no PS is used. */ - if (!use_ps(state)) - { - TRACE("Non power two matrix multiply fixup\n"); - gl_info->gl_ops.gl.p_glMultMatrixf(state->textures[texUnit]->pow2_matrix); - } - } + gl_info->gl_ops.gl.p_glMatrixMode(GL_TEXTURE); + checkGLcall("glMatrixMode(GL_TEXTURE)"); + + get_texture_matrix(context, state, mapped_stage, &mat); + + gl_info->gl_ops.gl.p_glLoadMatrixf(&mat._11); + checkGLcall("glLoadMatrixf"); } static void unload_tex_coords(const struct wined3d_gl_info *gl_info) diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 4452f7c..b28142c 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -3203,19 +3203,15 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w } /* Setup this textures matrix according to the texture flags. */ -/* Context activation is done by the caller (state handler). */ -void set_texture_matrix(const struct wined3d_gl_info *gl_info, const struct wined3d_matrix *matrix, DWORD flags, - BOOL calculated_coords, BOOL transformed, enum wined3d_format_id format_id, BOOL ffp_proj_control) +static void compute_texture_matrix(const struct wined3d_gl_info *gl_info, const struct wined3d_matrix *matrix, + DWORD flags, BOOL calculated_coords, BOOL transformed, enum wined3d_format_id format_id, + BOOL ffp_proj_control, struct wined3d_matrix *out_matrix) { struct wined3d_matrix mat; - gl_info->gl_ops.gl.p_glMatrixMode(GL_TEXTURE); - checkGLcall("glMatrixMode(GL_TEXTURE)"); - if (flags == WINED3D_TTFF_DISABLE || flags == WINED3D_TTFF_COUNT1 || transformed) { - gl_info->gl_ops.gl.p_glLoadIdentity(); - checkGLcall("glLoadIdentity()"); + get_identity_matrix(out_matrix); return; } @@ -3314,8 +3310,39 @@ void set_texture_matrix(const struct wined3d_gl_info *gl_info, const struct wine } } - gl_info->gl_ops.gl.p_glLoadMatrixf(&mat._11); - checkGLcall("glLoadMatrixf(mat)"); + *out_matrix = mat; +} + +void get_texture_matrix(const struct wined3d_context *context, const struct wined3d_state *state, + unsigned int tex, struct wined3d_matrix *mat) +{ + const struct wined3d_device *device = context->swapchain->device; + const struct wined3d_gl_info *gl_info = context->gl_info; + BOOL generated = (state->texture_states[tex][WINED3D_TSS_TEXCOORD_INDEX] & 0xffff0000) + != WINED3DTSS_TCI_PASSTHRU; + unsigned int coord_idx = min(state->texture_states[tex][WINED3D_TSS_TEXCOORD_INDEX & 0x0000ffff], + MAX_TEXTURES - 1); + + compute_texture_matrix(gl_info, &state->transforms[WINED3D_TS_TEXTURE0 + tex], + state->texture_states[tex][WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS], + generated, context->last_was_rhw, + context->stream_info.use_map & (1 << (WINED3D_FFP_TEXCOORD0 + coord_idx)) + ? context->stream_info.elements[WINED3D_FFP_TEXCOORD0 + coord_idx].format->id + : WINED3DFMT_UNKNOWN, + device->shader_backend->shader_has_ffp_proj_control(device->shader_priv), mat); + + if ((context->lastWasPow2Texture & (1 << tex)) && state->textures[tex]) + { + if (generated) + FIXME("Non-power-of-two texture being used with generated texture coords.\n"); + /* NP2 texcoord fixup is implemented for pixelshaders so only enable the + * fixed-function-pipeline fixup via pow2Matrix when no PS is used. */ + if (!use_ps(state)) + { + TRACE("Non-power-of-two texture matrix multiply fixup.\n"); + multiply_matrix(mat, mat, (struct wined3d_matrix *)state->textures[tex]->pow2_matrix); + } + } } /* This small helper function is used to convert a bitmask into the number of masked bits */ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index bd4f2e2..4e36969 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2782,9 +2782,6 @@ BOOL is_invalid_op(const struct wined3d_state *state, int stage, void set_tex_op_nvrc(const struct wined3d_gl_info *gl_info, const struct wined3d_state *state, BOOL is_alpha, int stage, enum wined3d_texture_op op, DWORD arg1, DWORD arg2, DWORD arg3, INT texture_idx, DWORD dst) DECLSPEC_HIDDEN; -void set_texture_matrix(const struct wined3d_gl_info *gl_info, const struct wined3d_matrix *matrix, - DWORD flags, BOOL calculated_coords, BOOL transformed, enum wined3d_format_id format_id, - BOOL ffp_can_disable_proj) DECLSPEC_HIDDEN; void texture_activate_dimensions(const struct wined3d_texture *texture, const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN; void sampler_texdim(struct wined3d_context *context, @@ -3039,6 +3036,8 @@ void get_modelview_matrix(const struct wined3d_context *context, const struct wi struct wined3d_matrix *mat) DECLSPEC_HIDDEN; void get_projection_matrix(const struct wined3d_context *context, const struct wined3d_state *state, struct wined3d_matrix *mat) DECLSPEC_HIDDEN; +void get_texture_matrix(const struct wined3d_context *context, const struct wined3d_state *state, + unsigned int tex, struct wined3d_matrix *mat) DECLSPEC_HIDDEN; /* Using additional shader constants (uniforms in GLSL / program environment * or local parameters in ARB) is costly:
1
0
0
0
Matteo Bruni : wined3d: Introduce a get_projection_matrix() function.
by Alexandre Julliard
23 Mar '15
23 Mar '15
Module: wine Branch: master Commit: 2d270f31c67f1e7f93917bde3ba18936d384195a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2d270f31c67f1e7f93917bde3…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Fri Mar 20 13:50:53 2015 +0100 wined3d: Introduce a get_projection_matrix() function. Notice that I'm using floats instead of doubles in the new function, mostly to be able to use struct wined3d_matrix and multiply_matrix(). At a rough estimate the precision should still be good enough. --- dlls/wined3d/state.c | 68 +++--------------------------------------- dlls/wined3d/utils.c | 64 +++++++++++++++++++++++++++++++++++++++ dlls/wined3d/wined3d_private.h | 2 ++ 3 files changed, 70 insertions(+), 64 deletions(-) diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 774e6dd..9a40876 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -4052,74 +4052,14 @@ static void transform_view(struct wined3d_context *context, const struct wined3d void transform_projection(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { const struct wined3d_gl_info *gl_info = context->gl_info; + struct wined3d_matrix projection; gl_info->gl_ops.gl.p_glMatrixMode(GL_PROJECTION); checkGLcall("glMatrixMode(GL_PROJECTION)"); - /* There are a couple of additional things we have to take into account - * here besides the projection transformation itself: - * - We need to flip along the y-axis in case of offscreen rendering. - * - OpenGL Z range is {-Wc,...,Wc} while D3D Z range is {0,...,Wc}. - * - D3D coordinates refer to pixel centers while GL coordinates refer - * to pixel corners. - * - D3D has a top-left filling convention. We need to maintain this - * even after the y-flip mentioned above. - * In order to handle the last two points, we translate by - * (63.0 / 128.0) / VPw and (63.0 / 128.0) / VPh. This is equivalent to - * translating slightly less than half a pixel. We want the difference to - * be large enough that it doesn't get lost due to rounding inside the - * driver, but small enough to prevent it from interfering with any - * anti-aliasing. */ - - if (context->last_was_rhw) - { - /* Transform D3D RHW coordinates to OpenGL clip coordinates. */ - double x = state->viewport.x; - double y = state->viewport.y; - double w = state->viewport.width; - double h = state->viewport.height; - double x_scale = 2.0 / w; - double x_offset = ((63.0 / 64.0) - (2.0 * x) - w) / w; - double y_scale = context->render_offscreen ? 2.0 / h : 2.0 / -h; - double y_offset = context->render_offscreen - ? ((63.0 / 64.0) - (2.0 * y) - h) / h - : ((63.0 / 64.0) - (2.0 * y) - h) / -h; - enum wined3d_depth_buffer_type zenable = state->fb->depth_stencil ? - state->render_states[WINED3D_RS_ZENABLE] : WINED3D_ZB_FALSE; - double z_scale = zenable ? 2.0f : 0.0f; - double z_offset = zenable ? -1.0f : 0.0f; - const GLdouble projection[] = - { - x_scale, 0.0, 0.0, 0.0, - 0.0, y_scale, 0.0, 0.0, - 0.0, 0.0, z_scale, 0.0, - x_offset, y_offset, z_offset, 1.0, - }; - - gl_info->gl_ops.gl.p_glLoadMatrixd(projection); - checkGLcall("glLoadMatrixd"); - } - else - { - double y_scale = context->render_offscreen ? -1.0 : 1.0; - double x_offset = (63.0 / 64.0) / state->viewport.width; - double y_offset = context->render_offscreen - ? (63.0 / 64.0) / state->viewport.height - : -(63.0 / 64.0) / state->viewport.height; - const GLdouble projection[] = - { - 1.0, 0.0, 0.0, 0.0, - 0.0, y_scale, 0.0, 0.0, - 0.0, 0.0, 2.0, 0.0, - x_offset, y_offset, -1.0, 1.0, - }; - - gl_info->gl_ops.gl.p_glLoadMatrixd(projection); - checkGLcall("glLoadMatrixd"); - - gl_info->gl_ops.gl.p_glMultMatrixf(&state->transforms[WINED3D_TS_PROJECTION]._11); - checkGLcall("glLoadMatrixf"); - } + get_projection_matrix(context, state, &projection); + gl_info->gl_ops.gl.p_glLoadMatrixf(&projection._11); + checkGLcall("glLoadMatrixf"); } /* This should match any arrays loaded in load_vertex_data. diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index a43029c..4452f7c 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -3138,6 +3138,70 @@ void get_modelview_matrix(const struct wined3d_context *context, const struct wi multiply_matrix(mat, &state->transforms[WINED3D_TS_VIEW], &state->transforms[WINED3D_TS_WORLD_MATRIX(0)]); } +void get_projection_matrix(const struct wined3d_context *context, const struct wined3d_state *state, + struct wined3d_matrix *mat) +{ + /* There are a couple of additional things we have to take into account + * here besides the projection transformation itself: + * - We need to flip along the y-axis in case of offscreen rendering. + * - OpenGL Z range is {-Wc,...,Wc} while D3D Z range is {0,...,Wc}. + * - D3D coordinates refer to pixel centers while GL coordinates refer + * to pixel corners. + * - D3D has a top-left filling convention. We need to maintain this + * even after the y-flip mentioned above. + * In order to handle the last two points, we translate by + * (63.0 / 128.0) / VPw and (63.0 / 128.0) / VPh. This is equivalent to + * translating slightly less than half a pixel. We want the difference to + * be large enough that it doesn't get lost due to rounding inside the + * driver, but small enough to prevent it from interfering with any + * anti-aliasing. */ + + if (context->last_was_rhw) + { + /* Transform D3D RHW coordinates to OpenGL clip coordinates. */ + float x = state->viewport.x; + float y = state->viewport.y; + float w = state->viewport.width; + float h = state->viewport.height; + float x_scale = 2.0f / w; + float x_offset = (float)((63.0 / 64.0 - (2.0 * x) - w) / w); + float y_scale = context->render_offscreen ? 2.0f / h : 2.0f / -h; + float y_offset = (float)(context->render_offscreen + ? (63.0 / 64.0 - (2.0 * y) - h) / h + : (63.0 / 64.0 - (2.0 * y) - h) / -h); + enum wined3d_depth_buffer_type zenable = state->fb->depth_stencil ? + state->render_states[WINED3D_RS_ZENABLE] : WINED3D_ZB_FALSE; + float z_scale = zenable ? 2.0f : 0.0f; + float z_offset = zenable ? -1.0f : 0.0f; + const struct wined3d_matrix projection = + { + x_scale, 0.0f, 0.0f, 0.0f, + 0.0f, y_scale, 0.0f, 0.0f, + 0.0f, 0.0f, z_scale, 0.0f, + x_offset, y_offset, z_offset, 1.0f, + }; + + *mat = projection; + } + else + { + float y_scale = context->render_offscreen ? -1.0f : 1.0f; + float x_offset = 63.0f / 64.0f * (1.0f / state->viewport.width); + float y_offset = context->render_offscreen + ? 63.0f / 64.0f * (1.0f / state->viewport.height) + : -63.0f / 64.0f * (1.0f / state->viewport.height); + const struct wined3d_matrix projection = + { + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, y_scale, 0.0f, 0.0f, + 0.0f, 0.0f, 2.0f, 0.0f, + x_offset, y_offset, -1.0f, 1.0f, + }; + + multiply_matrix(mat, &projection, &state->transforms[WINED3D_TS_PROJECTION]); + } +} + /* Setup this textures matrix according to the texture flags. */ /* Context activation is done by the caller (state handler). */ void set_texture_matrix(const struct wined3d_gl_info *gl_info, const struct wined3d_matrix *matrix, DWORD flags, diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 98df60c..bd4f2e2 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -3037,6 +3037,8 @@ static inline BOOL shader_constant_is_local(const struct wined3d_shader *shader, void get_identity_matrix(struct wined3d_matrix *mat) DECLSPEC_HIDDEN; void get_modelview_matrix(const struct wined3d_context *context, const struct wined3d_state *state, struct wined3d_matrix *mat) DECLSPEC_HIDDEN; +void get_projection_matrix(const struct wined3d_context *context, const struct wined3d_state *state, + struct wined3d_matrix *mat) DECLSPEC_HIDDEN; /* Using additional shader constants (uniforms in GLSL / program environment * or local parameters in ARB) is costly:
1
0
0
0
Matteo Bruni : wined3d: Use a separate STATE_VIEWPORT state handler in the GLSL pipeline.
by Alexandre Julliard
23 Mar '15
23 Mar '15
Module: wine Branch: master Commit: 65c8c40b18fc1445939809655d18c4fd0be64338 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=65c8c40b18fc1445939809655…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Fri Mar 20 13:50:52 2015 +0100 wined3d: Use a separate STATE_VIEWPORT state handler in the GLSL pipeline. --- dlls/wined3d/glsl_shader.c | 13 ++++++++++++- dlls/wined3d/state.c | 2 +- dlls/wined3d/wined3d_private.h | 2 -- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 4240b08..0b307d3 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -7100,6 +7100,17 @@ static void glsl_vertex_pipe_projection(struct wined3d_context *context, transform_projection(context, state, state_id); } +static void glsl_vertex_pipe_viewport(struct wined3d_context *context, + const struct wined3d_state *state, DWORD state_id) +{ + if (!isStateDirty(context, STATE_TRANSFORM(WINED3D_TS_PROJECTION))) + glsl_vertex_pipe_projection(context, state, STATE_TRANSFORM(WINED3D_TS_PROJECTION)); + if (!isStateDirty(context, STATE_RENDER(WINED3D_RS_POINTSCALEENABLE)) + && state->render_states[WINED3D_RS_POINTSCALEENABLE]) + state_pscale(context, state, STATE_RENDER(WINED3D_RS_POINTSCALEENABLE)); + context->constant_update_mask |= WINED3D_SHADER_CONST_VS_POS_FIXUP; +} + static const struct StateEntryTemplate glsl_vertex_pipe_vp_states[] = { {STATE_VDECL, {STATE_VDECL, glsl_vertex_pipe_vdecl }, WINED3D_GL_EXT_NONE }, @@ -7150,7 +7161,7 @@ static const struct StateEntryTemplate glsl_vertex_pipe_vp_states[] = {STATE_ACTIVELIGHT(6), {STATE_ACTIVELIGHT(6), light }, WINED3D_GL_EXT_NONE }, {STATE_ACTIVELIGHT(7), {STATE_ACTIVELIGHT(7), light }, WINED3D_GL_EXT_NONE }, /* Viewport */ - {STATE_VIEWPORT, {STATE_VIEWPORT, viewport_vertexpart }, WINED3D_GL_EXT_NONE }, + {STATE_VIEWPORT, {STATE_VIEWPORT, glsl_vertex_pipe_viewport}, WINED3D_GL_EXT_NONE }, /* Transform states */ {STATE_TRANSFORM(WINED3D_TS_VIEW), {STATE_TRANSFORM(WINED3D_TS_VIEW), glsl_vertex_pipe_view }, WINED3D_GL_EXT_NONE }, {STATE_TRANSFORM(WINED3D_TS_PROJECTION), {STATE_TRANSFORM(WINED3D_TS_PROJECTION), glsl_vertex_pipe_projection}, WINED3D_GL_EXT_NONE }, diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 1c5edb3..774e6dd 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -4790,7 +4790,7 @@ static void viewport_miscpart(struct wined3d_context *context, const struct wine checkGLcall("glViewport"); } -void viewport_vertexpart(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) +static void viewport_vertexpart(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { if (!isStateDirty(context, STATE_TRANSFORM(WINED3D_TS_PROJECTION))) transform_projection(context, state, STATE_TRANSFORM(WINED3D_TS_PROJECTION)); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 70f07a1..98df60c 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2814,8 +2814,6 @@ void transform_texture(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; void state_ambient(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; -void viewport_vertexpart(struct wined3d_context *context, - const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; void state_clipping(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; void light(struct wined3d_context *context,
1
0
0
0
Stefan Dösinger : ddraw/tests: Correct executebuffer offsets.
by Alexandre Julliard
23 Mar '15
23 Mar '15
Module: wine Branch: master Commit: 70c6666d1e84d2e602e0c51a89ff6aaea7f1d76a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=70c6666d1e84d2e602e0c51a8…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Fri Mar 20 12:47:12 2015 +0100 ddraw/tests: Correct executebuffer offsets. --- dlls/ddraw/tests/ddraw1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c index ca61f13..68821e4 100644 --- a/dlls/ddraw/tests/ddraw1.c +++ b/dlls/ddraw/tests/ddraw1.c @@ -6189,7 +6189,7 @@ static void test_texturemapblend(void) memcpy(exec_desc.lpData, test2_quads, sizeof(test2_quads)); - ptr = ((BYTE *)exec_desc.lpData) + sizeof(test1_quads); + ptr = ((BYTE *)exec_desc.lpData) + sizeof(test2_quads); emit_process_vertices(&ptr, D3DPROCESSVERTICES_COPY, 0, 8); emit_set_rs(&ptr, D3DRENDERSTATE_ALPHABLENDENABLE, FALSE); emit_set_rs(&ptr, D3DRENDERSTATE_TEXTUREHANDLE, texture_handle); @@ -6202,7 +6202,7 @@ static void test_texturemapblend(void) inst_length -= sizeof(test2_quads); hr = IDirect3DExecuteBuffer_Unlock(execute_buffer); ok(SUCCEEDED(hr), "Failed to unlock execute buffer, hr %#x.\n", hr); - set_execute_data(execute_buffer, 8, sizeof(test1_quads), inst_length); + set_execute_data(execute_buffer, 8, sizeof(test2_quads), inst_length); hr = IDirect3DDevice_BeginScene(device); ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr);
1
0
0
0
Stefan Dösinger : ddraw/tests: The testbot applies color keying without a key.
by Alexandre Julliard
23 Mar '15
23 Mar '15
Module: wine Branch: master Commit: daf3e8a0dcde52b33af53db7d540af5e4e913306 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=daf3e8a0dcde52b33af53db7d…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Fri Mar 20 12:47:11 2015 +0100 ddraw/tests: The testbot applies color keying without a key. --- dlls/ddraw/tests/ddraw1.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c index f59355e..ca61f13 100644 --- a/dlls/ddraw/tests/ddraw1.c +++ b/dlls/ddraw/tests/ddraw1.c @@ -6211,14 +6211,24 @@ static void test_texturemapblend(void) hr = IDirect3DDevice_EndScene(device); ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + /* WARP (Win8 testbot) emulates color keying with the alpha channel like Wine does, + * but even applies it when there's no color key assigned. The surface alpha is zero + * here, so nothing gets drawn. + * + * The ddraw2 version of this test draws these quads with color keying off due to + * different defaults in ddraw1 and ddraw2. */ color = get_surface_color(rt, 5, 5); - ok(compare_color(color, 0x00ff0040, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0040, 2) || broken(compare_color(color, 0x00000000, 1)), + "Got unexpected color 0x%08x.\n", color); color = get_surface_color(rt, 400, 5); - ok(compare_color(color, 0x00ff0080, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00ff0080, 2) || broken(compare_color(color, 0x00000000, 1)), + "Got unexpected color 0x%08x.\n", color); color = get_surface_color(rt, 5, 245); - ok(compare_color(color, 0x00800080, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00800080, 2) || broken(compare_color(color, 0x00000000, 1)), + "Got unexpected color 0x%08x.\n", color); color = get_surface_color(rt, 400, 245); - ok(compare_color(color, 0x008000ff, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x008000ff, 2) || broken(compare_color(color, 0x00000000, 1)), + "Got unexpected color 0x%08x.\n", color); IDirect3DTexture_Release(texture); ref = IDirectDrawSurface_Release(surface);
1
0
0
0
Stefan Dösinger : ddraw: Update the palette before presents to the NULL window.
by Alexandre Julliard
23 Mar '15
23 Mar '15
Module: wine Branch: master Commit: 02be2e38a8e3ff783132b675dabbfe41173841d3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=02be2e38a8e3ff783132b675d…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Fri Mar 20 12:47:10 2015 +0100 ddraw: Update the palette before presents to the NULL window. --- dlls/ddraw/surface.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index b8c9872..0d2d731 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -81,6 +81,8 @@ HRESULT ddraw_surface_update_frontbuffer(struct ddraw_surface *surface, const RE ERR("Failed to get surface DC, hr %#x.\n", hr); return hr; } + if (surface->palette) + wined3d_palette_apply_to_dc(surface->palette->wineD3DPalette, surface_dc); if (!(screen_dc = GetDC(NULL))) {
1
0
0
0
Henri Verbeet : d3d10core: Also pass unused input layout elements to wined3d.
by Alexandre Julliard
23 Mar '15
23 Mar '15
Module: wine Branch: master Commit: 88f230b56e13c26e4b7a2040bc103850ef6f0078 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=88f230b56e13c26e4b7a2040b…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Mar 23 09:17:16 2015 +0100 d3d10core: Also pass unused input layout elements to wined3d. While these won't be used by the shader, they potentially affect the calculated offset for WINED3D_APPEND_ALIGNED_ELEMENT elements. --- dlls/d3d10core/inputlayout.c | 41 +++++++++++++++++++--------------------- dlls/d3d9/vertexdeclaration.c | 2 +- dlls/wined3d/context.c | 6 +++++- dlls/wined3d/vertexdeclaration.c | 2 +- include/wine/wined3d.h | 3 +++ 5 files changed, 29 insertions(+), 25 deletions(-) diff --git a/dlls/d3d10core/inputlayout.c b/dlls/d3d10core/inputlayout.c index bb3e4c5..fa08822 100644 --- a/dlls/d3d10core/inputlayout.c +++ b/dlls/d3d10core/inputlayout.c @@ -41,7 +41,7 @@ static HRESULT isgn_handler(const char *data, DWORD data_size, DWORD tag, void * static HRESULT d3d10_input_layout_to_wined3d_declaration(const D3D10_INPUT_ELEMENT_DESC *element_descs, UINT element_count, const void *shader_byte_code, SIZE_T shader_byte_code_length, - struct wined3d_vertex_element **wined3d_elements, UINT *wined3d_element_count) + struct wined3d_vertex_element **wined3d_elements) { struct wined3d_shader_signature is; HRESULT hr; @@ -61,33 +61,32 @@ static HRESULT d3d10_input_layout_to_wined3d_declaration(const D3D10_INPUT_ELEME HeapFree(GetProcessHeap(), 0, is.elements); return E_OUTOFMEMORY; } - *wined3d_element_count = 0; for (i = 0; i < element_count; ++i) { + struct wined3d_vertex_element *e = &(*wined3d_elements)[i]; + const D3D10_INPUT_ELEMENT_DESC *f = &element_descs[i]; UINT j; + e->format = wined3dformat_from_dxgi_format(f->Format); + e->input_slot = f->InputSlot; + e->offset = f->AlignedByteOffset; + e->output_slot = WINED3D_OUTPUT_SLOT_UNUSED; + e->method = WINED3D_DECL_METHOD_DEFAULT; + e->usage = 0; + e->usage_idx = 0; + + if (f->InputSlotClass != D3D10_INPUT_PER_VERTEX_DATA) + FIXME("Ignoring input slot class (%#x)\n", f->InputSlotClass); + if (f->InstanceDataStepRate) + FIXME("Ignoring instance data step rate (%#x)\n", f->InstanceDataStepRate); + for (j = 0; j < is.element_count; ++j) { if (!strcmp(element_descs[i].SemanticName, is.elements[j].semantic_name) && element_descs[i].SemanticIndex == is.elements[j].semantic_idx) { - struct wined3d_vertex_element *e = &(*wined3d_elements)[(*wined3d_element_count)++]; - const D3D10_INPUT_ELEMENT_DESC *f = &element_descs[i]; - - e->format = wined3dformat_from_dxgi_format(f->Format); - e->input_slot = f->InputSlot; - e->offset = f->AlignedByteOffset; e->output_slot = is.elements[j].register_idx; - e->method = WINED3D_DECL_METHOD_DEFAULT; - e->usage = 0; - e->usage_idx = 0; - - if (f->InputSlotClass != D3D10_INPUT_PER_VERTEX_DATA) - FIXME("Ignoring input slot class (%#x)\n", f->InputSlotClass); - if (f->InstanceDataStepRate) - FIXME("Ignoring instance data step rate (%#x)\n", f->InstanceDataStepRate); - break; } } @@ -225,23 +224,21 @@ HRESULT d3d10_input_layout_init(struct d3d10_input_layout *layout, struct d3d10_ const void *shader_byte_code, SIZE_T shader_byte_code_length) { struct wined3d_vertex_element *wined3d_elements; - UINT wined3d_element_count; HRESULT hr; layout->ID3D10InputLayout_iface.lpVtbl = &d3d10_input_layout_vtbl; layout->refcount = 1; wined3d_private_store_init(&layout->private_store); - hr = d3d10_input_layout_to_wined3d_declaration(element_descs, element_count, - shader_byte_code, shader_byte_code_length, &wined3d_elements, &wined3d_element_count); - if (FAILED(hr)) + if (FAILED(hr = d3d10_input_layout_to_wined3d_declaration(element_descs, element_count, + shader_byte_code, shader_byte_code_length, &wined3d_elements))) { WARN("Failed to create wined3d vertex declaration elements, hr %#x.\n", hr); wined3d_private_store_cleanup(&layout->private_store); return hr; } - hr = wined3d_vertex_declaration_create(device->wined3d_device, wined3d_elements, wined3d_element_count, + hr = wined3d_vertex_declaration_create(device->wined3d_device, wined3d_elements, element_count, layout, &d3d10_input_layout_wined3d_parent_ops, &layout->wined3d_decl); HeapFree(GetProcessHeap(), 0, wined3d_elements); if (FAILED(hr)) diff --git a/dlls/d3d9/vertexdeclaration.c b/dlls/d3d9/vertexdeclaration.c index 502b7d3..086ac70 100644 --- a/dlls/d3d9/vertexdeclaration.c +++ b/dlls/d3d9/vertexdeclaration.c @@ -353,7 +353,7 @@ static HRESULT convert_to_wined3d_declaration(const D3DVERTEXELEMENT9 *d3d9_elem (*wined3d_elements)[i].format = d3d_dtype_lookup[d3d9_elements[i].Type].format; (*wined3d_elements)[i].input_slot = d3d9_elements[i].Stream; (*wined3d_elements)[i].offset = d3d9_elements[i].Offset; - (*wined3d_elements)[i].output_slot = ~0U; + (*wined3d_elements)[i].output_slot = WINED3D_OUTPUT_SLOT_SEMANTIC; (*wined3d_elements)[i].method = d3d9_elements[i].Method; (*wined3d_elements)[i].usage = d3d9_elements[i].Usage; (*wined3d_elements)[i].usage_idx = d3d9_elements[i].UsageIndex; diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 9cc68ab..894e259 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -2771,7 +2771,11 @@ void context_stream_info_from_declaration(struct wined3d_context *context, if (use_vshader) { - if (element->output_slot == ~0U) + if (element->output_slot == WINED3D_OUTPUT_SLOT_UNUSED) + { + stride_used = FALSE; + } + else if (element->output_slot == WINED3D_OUTPUT_SLOT_SEMANTIC) { /* TODO: Assuming vertexdeclarations are usually used with the * same or a similar shader, it might be worth it to store the diff --git a/dlls/wined3d/vertexdeclaration.c b/dlls/wined3d/vertexdeclaration.c index 97992d6..df54bdc 100644 --- a/dlls/wined3d/vertexdeclaration.c +++ b/dlls/wined3d/vertexdeclaration.c @@ -296,7 +296,7 @@ static void append_decl_element(struct wined3d_fvf_convert_state *state, elements[idx].format = format_id; elements[idx].input_slot = 0; elements[idx].offset = offset; - elements[idx].output_slot = 0; + elements[idx].output_slot = WINED3D_OUTPUT_SLOT_SEMANTIC; elements[idx].method = WINED3D_DECL_METHOD_DEFAULT; elements[idx].usage = usage; elements[idx].usage_idx = usage_idx; diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 6905585..b576e1a 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -1496,6 +1496,9 @@ enum wined3d_display_rotation #define WINED3D_APPEND_ALIGNED_ELEMENT 0xffffffff +#define WINED3D_OUTPUT_SLOT_SEMANTIC 0xffffffff +#define WINED3D_OUTPUT_SLOT_UNUSED 0xfffffffe + struct wined3d_display_mode { UINT width;
1
0
0
0
Henri Verbeet : wined3d: Take the input slot into account when handling WINED3D_APPEND_ALIGNED_ELEMENT.
by Alexandre Julliard
23 Mar '15
23 Mar '15
Module: wine Branch: master Commit: cbe717b8f3429a4ca30c1ac6276902cf486f1c27 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cbe717b8f3429a4ca30c1ac62…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Mar 23 09:17:15 2015 +0100 wined3d: Take the input slot into account when handling WINED3D_APPEND_ALIGNED_ELEMENT. --- dlls/wined3d/vertexdeclaration.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/dlls/wined3d/vertexdeclaration.c b/dlls/wined3d/vertexdeclaration.c index df3d8ba..97992d6 100644 --- a/dlls/wined3d/vertexdeclaration.c +++ b/dlls/wined3d/vertexdeclaration.c @@ -218,14 +218,18 @@ static HRESULT vertexdeclaration_init(struct wined3d_vertex_declaration *declara if (e->offset == WINED3D_APPEND_ALIGNED_ELEMENT) { - if (!i) - { - e->offset = 0; - } - else + const struct wined3d_vertex_declaration_element *prev; + unsigned int j; + + e->offset = 0; + for (j = 1; j <= i; ++j) { - struct wined3d_vertex_declaration_element *prev = &declaration->elements[i - 1]; - e->offset = (prev->offset + prev->format->byte_count + 3) & ~3; + prev = &declaration->elements[i - j]; + if (prev->input_slot == e->input_slot) + { + e->offset = (prev->offset + prev->format->byte_count + 3) & ~3; + break; + } } }
1
0
0
0
← Newer
1
...
20
21
22
23
24
25
26
...
78
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
Results per page:
10
25
50
100
200