wined3d: Store BGRA vertex capabilities in struct wined3d_d3d_info.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f8361d27e4
commit
8d49fe4803
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue