Commit be8026ad authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: directly pass gl_info to stream_info_element_from_strided().

parent 111307df
......@@ -321,10 +321,10 @@ void device_stream_info_from_declaration(IWineD3DDeviceImpl *This,
}
}
static void stream_info_element_from_strided(IWineD3DDeviceImpl *This,
static void stream_info_element_from_strided(const struct wined3d_gl_info *gl_info,
const struct WineDirect3DStridedData *strided, struct wined3d_stream_info_element *e)
{
const struct GlPixelFormatDesc *format_desc = getFormatDescEntry(strided->format, &This->adapter->gl_info);
const struct GlPixelFormatDesc *format_desc = getFormatDescEntry(strided->format, gl_info);
e->format_desc = format_desc;
e->stride = strided->dwStride;
e->data = strided->lpData;
......@@ -332,7 +332,7 @@ static void stream_info_element_from_strided(IWineD3DDeviceImpl *This,
e->buffer_object = 0;
}
void device_stream_info_from_strided(IWineD3DDeviceImpl *This,
void device_stream_info_from_strided(const struct wined3d_gl_info *gl_info,
const struct WineDirect3DVertexStridedData *strided, struct wined3d_stream_info *stream_info)
{
unsigned int i;
......@@ -340,18 +340,18 @@ void device_stream_info_from_strided(IWineD3DDeviceImpl *This,
memset(stream_info, 0, sizeof(*stream_info));
if (strided->position.lpData)
stream_info_element_from_strided(This, &strided->position, &stream_info->elements[WINED3D_FFP_POSITION]);
stream_info_element_from_strided(gl_info, &strided->position, &stream_info->elements[WINED3D_FFP_POSITION]);
if (strided->normal.lpData)
stream_info_element_from_strided(This, &strided->normal, &stream_info->elements[WINED3D_FFP_NORMAL]);
stream_info_element_from_strided(gl_info, &strided->normal, &stream_info->elements[WINED3D_FFP_NORMAL]);
if (strided->diffuse.lpData)
stream_info_element_from_strided(This, &strided->diffuse, &stream_info->elements[WINED3D_FFP_DIFFUSE]);
stream_info_element_from_strided(gl_info, &strided->diffuse, &stream_info->elements[WINED3D_FFP_DIFFUSE]);
if (strided->specular.lpData)
stream_info_element_from_strided(This, &strided->specular, &stream_info->elements[WINED3D_FFP_SPECULAR]);
stream_info_element_from_strided(gl_info, &strided->specular, &stream_info->elements[WINED3D_FFP_SPECULAR]);
for (i = 0; i < WINED3DDP_MAXTEXCOORD; ++i)
{
if (strided->texCoords[i].lpData)
stream_info_element_from_strided(This, &strided->texCoords[i],
stream_info_element_from_strided(gl_info, &strided->texCoords[i],
&stream_info->elements[WINED3D_FFP_TEXCOORD0 + i]);
}
......@@ -361,7 +361,7 @@ void device_stream_info_from_strided(IWineD3DDeviceImpl *This,
{
if (!stream_info->elements[i].format_desc) continue;
if (!This->adapter->gl_info.supported[EXT_VERTEX_ARRAY_BGRA]
if (!gl_info->supported[EXT_VERTEX_ARRAY_BGRA]
&& stream_info->elements[i].format_desc->format == WINED3DFMT_B8G8R8A8_UNORM)
{
stream_info->swizzle_map |= 1 << i;
......
......@@ -4484,7 +4484,7 @@ static void streamsrc(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wi
if(device->up_strided) {
/* Note: this is a ddraw fixed-function code path */
TRACE("================ Strided Input ===================\n");
device_stream_info_from_strided(device, device->up_strided, dataLocations);
device_stream_info_from_strided(context->gl_info, device->up_strided, dataLocations);
if(TRACE_ON(d3d)) {
drawPrimitiveTraceDataLocations(dataLocations);
......
......@@ -1591,7 +1591,7 @@ void device_resource_add(IWineD3DDeviceImpl *This, IWineD3DResource *resource) D
void device_resource_released(IWineD3DDeviceImpl *This, IWineD3DResource *resource) DECLSPEC_HIDDEN;
void device_stream_info_from_declaration(IWineD3DDeviceImpl *This,
BOOL use_vshader, struct wined3d_stream_info *stream_info, BOOL *fixup) DECLSPEC_HIDDEN;
void device_stream_info_from_strided(IWineD3DDeviceImpl *This,
void device_stream_info_from_strided(const struct wined3d_gl_info *gl_info,
const struct WineDirect3DVertexStridedData *strided, struct wined3d_stream_info *stream_info) DECLSPEC_HIDDEN;
HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *target, DWORD Count,
const WINED3DRECT *pRects, DWORD Flags, WINED3DCOLOR Color, float Z, DWORD Stencil) DECLSPEC_HIDDEN;
......
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