-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 03.05.2011 um 16:51 schrieb Adam Martinson:
+#ifndef WINE_NO_TRACE_MSGS
for (; i < query->n_ids; ++i)
TRACE("Allocated timestamp query %u in context %p.\n", query->ids[i], context);
+#endif
use if(TRACE_ON(d3d)) instead. It'll be statically FALSE if there are no trace messages, and you also avoid the loop at runtime when traces aren't on.
+struct _wined3d_timestamp_query +{
- struct list entry;
- struct wined3d_context *context;
- int n_ids;
- GLuint ids[1];
+};
I'm not sure if this is necessary, I think we can just give struct wined3d_timestamp_query a ids[3] field.
+typedef struct D3D10_QUERY_DATA_TIMESTAMP_DISJOINT {
- UINT64 Frequency;
- BOOL Disjoint;
+} D3D10_QUERY_DATA_TIMESTAMP_DISJOINT;
Wrong code style, it looks like you copypasted .idl code into a .c file. Please define this in wined3d.idl using WINED3D_QUERY_... names. The wined3d.idl file will soon be gone and replaced with a plain .h header.
If you don't need those types for implementing the d3d9 queries ignore the d3d10 stuff for now.
static BOOL warned = FALSE;
if (!warned)
{
WARN("GL_ARB_timer_query not supported, returning WINED3DERR_NOTAVAILABLE\n");
warned = TRUE;
}
I don't think we have to limit WARNs to one output only. WARNs aren't shown by default. This kind of limiting is used for FIXMEs only to make sure repeated FIXMEs don't spam the terminal and hide other output.
I have to go now, I'll be back later. If I have time and am not tired I'll read this a bit more and check the tests. But probably Henri has sent some comments by then too.