wined3d: Avoid accessing gl_info in vertexdeclaration_init().
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
dfdecfc2eb
commit
25d55c4209
|
@ -3683,7 +3683,7 @@ static void context_update_stream_info(struct wined3d_context *context, const st
|
|||
|
||||
if (use_vs(state))
|
||||
{
|
||||
if (state->vertex_declaration->half_float_conv_needed)
|
||||
if (state->vertex_declaration->have_half_floats && !gl_info->supported[ARB_HALF_FLOAT_VERTEX])
|
||||
{
|
||||
TRACE("Using immediate mode draw with vertex shaders for FLOAT16 conversion.\n");
|
||||
context->use_immediate_mode_draw = TRUE;
|
||||
|
|
|
@ -174,7 +174,6 @@ static HRESULT vertexdeclaration_init(struct wined3d_vertex_declaration *declara
|
|||
void *parent, const struct wined3d_parent_ops *parent_ops)
|
||||
{
|
||||
const struct wined3d_adapter *adapter = device->adapter;
|
||||
const struct wined3d_gl_info *gl_info = &adapter->gl_info;
|
||||
unsigned int i;
|
||||
|
||||
if (TRACE_ON(d3d_decl))
|
||||
|
@ -218,7 +217,8 @@ static HRESULT vertexdeclaration_init(struct wined3d_vertex_declaration *declara
|
|||
|
||||
/* Find the streams used in the declaration. The vertex buffers have
|
||||
* to be loaded when drawing, but filter tesselation pseudo streams. */
|
||||
if (e->input_slot >= MAX_STREAMS) continue;
|
||||
if (e->input_slot >= MAX_STREAMS)
|
||||
continue;
|
||||
|
||||
if (!e->format->gl_vtx_format)
|
||||
{
|
||||
|
@ -254,7 +254,7 @@ static HRESULT vertexdeclaration_init(struct wined3d_vertex_declaration *declara
|
|||
|
||||
if (elements[i].format == WINED3DFMT_R16G16_FLOAT || elements[i].format == WINED3DFMT_R16G16B16A16_FLOAT)
|
||||
{
|
||||
if (!gl_info->supported[ARB_HALF_FLOAT_VERTEX]) declaration->half_float_conv_needed = TRUE;
|
||||
declaration->have_half_floats = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3463,10 +3463,10 @@ struct wined3d_vertex_declaration
|
|||
struct wined3d_device *device;
|
||||
|
||||
struct wined3d_vertex_declaration_element *elements;
|
||||
UINT element_count;
|
||||
unsigned int element_count;
|
||||
|
||||
BOOL position_transformed;
|
||||
BOOL half_float_conv_needed;
|
||||
BOOL have_half_floats;
|
||||
};
|
||||
|
||||
struct wined3d_saved_states
|
||||
|
|
Loading…
Reference in New Issue