Support for D3DQUERY_TIMESTAMP* queries...
Henri Verbeet
hverbeet at gmail.com
Tue May 3 13:48:38 CDT 2011
On 3 May 2011 16:51, Adam Martinson <amartinson at codeweavers.com> wrote:
> Feedback please.
This is in addition to what Stefan already said:
> +/* GL_ARB_timer_query */
> +#ifndef GL_ARB_timer_query
> +#define GL_ARB_timer_query 1
> +#define GL_TIME_ELAPSED_ARB 0x88BF
> +#define GL_TIMESTAMP_ARB 0x8E28
> +#endif
> +
> +typedef void (WINE_GLAPI *PFNGLQUERYCOUNTERPROC) (GLuint id, GLenum target);
> +typedef void (WINE_GLAPI *PFNGLGETQUERYOBJECTI64VPROC) (GLuint id, GLenum pname, GLint64 *params);
> +typedef void (WINE_GLAPI *PFNGLGETQUERYOBJECTUI64VPROC) (GLuint id, GLenum pname, GLuint64 *params);
Where did you get these? The style reminds me of glext.h.
> @@ -95,26 +95,31 @@ static HRESULT WINAPI IDirect3DQuery9Impl_GetDevice(IDirect3DQuery9 *iface,
> static D3DQUERYTYPE WINAPI IDirect3DQuery9Impl_GetType(IDirect3DQuery9 *iface)
> {
> IDirect3DQuery9Impl *This = impl_from_IDirect3DQuery9(iface);
> - HRESULT hr;
> + D3DQUERYTYPE ret;
>
> TRACE("iface %p.\n", iface);
>
> wined3d_mutex_lock();
> - hr = wined3d_query_get_type(This->wineD3DQuery);
> + ret = wined3d_query_get_type(This->wineD3DQuery);
> wined3d_mutex_unlock();
>
> - return hr;
> + return ret;
> }
This makes sense, but should clearly be a separate patch. If you're
changing the name anyway, "type" would probably be a more reasonable
name than "ret".
> +struct _wined3d_timestamp_query
> +{
> + struct list entry;
> + struct wined3d_context *context;
> + int n_ids;
> + GLuint ids[1];
> +};
...
> + query->extendedData = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct _wined3d_timestamp_query));
...
> +struct wined3d_timestamp_query
> +{
> + struct list entry;
> + struct wined3d_context *context;
> + int n_ids;
> + GLuint ids[];
> +};
That's ugly and fragile.
Please try to write coherent patches. Patch 4/7 in particular looks
like it was just copy-pasted together. Patch 5/7 could have easily
been at least 4 separate patches.
More information about the wine-devel
mailing list