Support for D3DQUERY_TIMESTAMP* queries...

Stefan Dösinger stefandoesinger at gmx.at
Tue May 3 11:59:17 CDT 2011


-----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.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)

iQIcBAEBAgAGBQJNwDRoAAoJEN0/YqbEcdMwC+oQAJGAxuDNh2bGbBNGuFs5uxXo
Jkf7+Kgb4aXuhYReGzCX5l1nYK82UBMGWC4j53tKWnziw4VueHuyuKwpmHO+EpRk
cjgz5pi4WBT3EGTuvCbnQ9ayOKRI76OKa45mD0uFCMvsM/cHKh0QcUJD4SpkmHLM
97sZuNpBuWy6vqNTfSgTirpQCI/gBUlQZVHKBesVhsJJ7yVZG5TgZjARKasYzoVg
Q6hHKK6qWby2NnawYpKQp51ie0OV3W65JZPHQ3fn+3ogrCcsL27u2SQE8MqHhKt4
PYxzGRfl+LCjdIIJ7UekXKawFlh6DqCF+j+9KEonJwSVzduj96Y+j0La5QML9eFW
Kjk53LLgzrb8kQcSmMS6YLNot158am4twu9uE8Lf6KjO5ADXIdRqdISFCipqecu/
cJc0IyYEaKgcrFaRcCRuPtZreXaK8QjH0n7KzvEW9I+74UN0cegTIN37yIeAwev+
oPYTwGr6fUHtOUQ/8t/jYMvgm0Up8kLnK9OU9LWJPcTOVh+BtyeKI2vmg/QPvCCk
lbPLuZD59JHdxyBDrKqYqyxIRcX6aLGctnRH5t+QVh5RHLmr8rcbZDm3JIEsDyHN
dUE41KiDa/oad76pSW5OL2NU+QHLbVgnJ6IQjGQSdH7gF4zkLHX8VYTaWdFqYRMy
U2KFQKkMYUCWBaGxaS4B
=jvdN
-----END PGP SIGNATURE-----



More information about the wine-devel mailing list