Signed-off-by: Józef Kucia jkucia@codeweavers.com --- dlls/wined3d/adapter_gl.c | 1 + dlls/wined3d/context.c | 8 +++----- dlls/wined3d/device.c | 2 +- dlls/wined3d/wined3d_private.h | 4 ++-- 4 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index 5bcb39f59c14..686f4f06cbb7 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -3741,6 +3741,7 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter, || gl_info->supported[ARB_TEXTURE_RECTANGLE];
d3d_info->draw_base_vertex_offset = !!gl_info->supported[ARB_DRAW_ELEMENTS_BASE_VERTEX]; + d3d_info->vertex_bgra = !!gl_info->supported[ARB_VERTEX_ARRAY_BGRA];
if (gl_info->supported[ARB_TEXTURE_MULTISAMPLE]) d3d_info->multisample_draw_location = WINED3D_LOCATION_TEXTURE_RGB; diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 267238dafa42..6d270a7eb693 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -3516,8 +3516,7 @@ static BOOL fixed_get_input(BYTE usage, BYTE usage_idx, unsigned int *regnum)
/* Context activation is done by the caller. */ void wined3d_stream_info_from_declaration(struct wined3d_stream_info *stream_info, - const struct wined3d_state *state, const struct wined3d_gl_info *gl_info, - const struct wined3d_d3d_info *d3d_info) + const struct wined3d_state *state, const struct wined3d_d3d_info *d3d_info) { /* We need to deal with frequency data! */ struct wined3d_vertex_declaration *declaration = state->vertex_declaration; @@ -3613,8 +3612,7 @@ void wined3d_stream_info_from_declaration(struct wined3d_stream_info *stream_inf stream_info->elements[idx].divisor = 0; }
- if (!gl_info->supported[ARB_VERTEX_ARRAY_BGRA] - && element->format->id == WINED3DFMT_B8G8R8A8_UNORM) + if (!d3d_info->vertex_bgra && element->format->id == WINED3DFMT_B8G8R8A8_UNORM) { stream_info->swizzle_map |= 1u << idx; } @@ -3633,7 +3631,7 @@ static void context_update_stream_info(struct wined3d_context *context, const st unsigned int i; WORD map;
- wined3d_stream_info_from_declaration(stream_info, state, gl_info, d3d_info); + wined3d_stream_info_from_declaration(stream_info, state, d3d_info);
stream_info->all_vbo = 1; context->buffer_fence_count = 0; diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 79a5b68c6f77..1328543186ad 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3422,7 +3422,7 @@ HRESULT CDECL wined3d_device_process_vertices(struct wined3d_device *device,
vs = state->shader[WINED3D_SHADER_TYPE_VERTEX]; state->shader[WINED3D_SHADER_TYPE_VERTEX] = NULL; - wined3d_stream_info_from_declaration(&stream_info, state, &device->adapter->gl_info, &device->adapter->d3d_info); + wined3d_stream_info_from_declaration(&stream_info, state, &device->adapter->d3d_info); state->shader[WINED3D_SHADER_TYPE_VERTEX] = vs;
/* We can't convert FROM a VBO, and vertex buffers used to source into diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index d0edb8c8bd86..e70010e74c94 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -206,6 +206,7 @@ struct wined3d_d3d_info unsigned int texture_npot : 1; unsigned int texture_npot_conditional : 1; unsigned int draw_base_vertex_offset : 1; + unsigned int vertex_bgra : 1; enum wined3d_feature_level feature_level;
DWORD multisample_draw_location; @@ -1511,8 +1512,7 @@ struct wined3d_stream_info };
void wined3d_stream_info_from_declaration(struct wined3d_stream_info *stream_info, - const struct wined3d_state *state, const struct wined3d_gl_info *gl_info, - const struct wined3d_d3d_info *d3d_info) DECLSPEC_HIDDEN; + const struct wined3d_state *state, const struct wined3d_d3d_info *d3d_info) DECLSPEC_HIDDEN;
struct wined3d_direct_dispatch_parameters {