Module: wine Branch: master Commit: be8026adf648305a958eb55c8647d3a6a2302f07 URL: http://source.winehq.org/git/wine.git/?a=commit;h=be8026adf648305a958eb55c86...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Thu Oct 29 10:37:12 2009 +0100
wined3d: directly pass gl_info to stream_info_element_from_strided().
---
dlls/wined3d/device.c | 18 +++++++++--------- dlls/wined3d/state.c | 2 +- dlls/wined3d/wined3d_private.h | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 3929348..a1b8944 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -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; diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index e7b64d9..94fe19e 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -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); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index d1400aa..3af2703 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -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;