Commit 5627ee49 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Remove FLOAT16 vertex attribute conversion support.

All mayor drivers support GL_ARB_half_float_vertex now and the half float conversion doesn't work well in practise. The only game that was ever playable with it was Eve online.
parent 46d879ee
...@@ -4132,7 +4132,6 @@ static void loadNumberedArrays(struct wined3d_stateblock *stateblock, ...@@ -4132,7 +4132,6 @@ static void loadNumberedArrays(struct wined3d_stateblock *stateblock,
GLuint curVBO = gl_info->supported[ARB_VERTEX_BUFFER_OBJECT] ? ~0U : 0; GLuint curVBO = gl_info->supported[ARB_VERTEX_BUFFER_OBJECT] ? ~0U : 0;
int i; int i;
struct wined3d_buffer *vb; struct wined3d_buffer *vb;
DWORD_PTR shift_index;
/* Default to no instancing */ /* Default to no instancing */
stateblock->device->instancedDraw = FALSE; stateblock->device->instancedDraw = FALSE;
...@@ -4172,31 +4171,12 @@ static void loadNumberedArrays(struct wined3d_stateblock *stateblock, ...@@ -4172,31 +4171,12 @@ static void loadNumberedArrays(struct wined3d_stateblock *stateblock,
* curVBO will be 0. If there is a vertex buffer but no vbo we * curVBO will be 0. If there is a vertex buffer but no vbo we
* won't be load converted attributes anyway. */ * won't be load converted attributes anyway. */
vb = stream->buffer; vb = stream->buffer;
if (curVBO && vb->conversion_shift) GL_EXTCALL(glVertexAttribPointerARB(i, stream_info->elements[i].format->gl_vtx_format,
{ stream_info->elements[i].format->gl_vtx_type,
TRACE("Loading attribute from shifted buffer\n"); stream_info->elements[i].format->gl_normalized,
TRACE("Attrib %d has original stride %d, new stride %d\n", stream_info->elements[i].stride, stream_info->elements[i].data
i, stream_info->elements[i].stride, vb->conversion_stride); + stateblock->state.load_base_vertex_index * stream_info->elements[i].stride
TRACE("Original offset %p, additional offset 0x%08x\n", + stream->offset));
stream_info->elements[i].data, vb->conversion_shift[(DWORD_PTR)stream_info->elements[i].data]);
TRACE("Opengl type %#x\n", stream_info->elements[i].format->gl_vtx_type);
shift_index = ((DWORD_PTR)stream_info->elements[i].data + stream->offset);
shift_index = shift_index % stream_info->elements[i].stride;
GL_EXTCALL(glVertexAttribPointerARB(i, stream_info->elements[i].format->gl_vtx_format,
stream_info->elements[i].format->gl_vtx_type,
stream_info->elements[i].format->gl_normalized,
vb->conversion_stride, stream_info->elements[i].data + vb->conversion_shift[shift_index]
+ stateblock->state.load_base_vertex_index * stream_info->elements[i].stride
+ stream->offset));
} else {
GL_EXTCALL(glVertexAttribPointerARB(i, stream_info->elements[i].format->gl_vtx_format,
stream_info->elements[i].format->gl_vtx_type,
stream_info->elements[i].format->gl_normalized,
stream_info->elements[i].stride, stream_info->elements[i].data
+ stateblock->state.load_base_vertex_index * stream_info->elements[i].stride
+ stream->offset));
}
if (!(context->numbered_array_mask & (1 << i))) if (!(context->numbered_array_mask & (1 << i)))
{ {
......
...@@ -2451,7 +2451,6 @@ enum wined3d_buffer_conversion_type ...@@ -2451,7 +2451,6 @@ enum wined3d_buffer_conversion_type
CONV_NONE, CONV_NONE,
CONV_D3DCOLOR, CONV_D3DCOLOR,
CONV_POSITIONT, CONV_POSITIONT,
CONV_FLOAT16_2, /* Also handles FLOAT16_4 */
}; };
struct wined3d_map_range struct wined3d_map_range
...@@ -2493,8 +2492,6 @@ struct wined3d_buffer ...@@ -2493,8 +2492,6 @@ struct wined3d_buffer
UINT stride; /* 0 if no conversion */ UINT stride; /* 0 if no conversion */
UINT conversion_stride; /* 0 if no shifted conversion */ UINT conversion_stride; /* 0 if no shifted conversion */
enum wined3d_buffer_conversion_type *conversion_map; /* NULL if no conversion */ enum wined3d_buffer_conversion_type *conversion_map; /* NULL if no conversion */
/* Extra load offsets, for FLOAT16 conversion */
UINT *conversion_shift; /* NULL if no shifted conversion */
}; };
static inline struct wined3d_buffer *buffer_from_resource(struct wined3d_resource *resource) static inline struct wined3d_buffer *buffer_from_resource(struct wined3d_resource *resource)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment