Signed-off-by: Francois Gouget fgouget@free.fr --- dlls/wined3d/query.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c index 81f5ba7d0d7..cdfc14c0cb0 100644 --- a/dlls/wined3d/query.c +++ b/dlls/wined3d/query.c @@ -101,7 +101,7 @@ static BOOL wined3d_query_buffer_queue_result(struct wined3d_context_gl *context
GL_EXTCALL(glBindBuffer(GL_QUERY_BUFFER, query->buffer_object)); /* Read the same value twice. We know we have the result if map_ptr[0] == map_ptr[1]. */ - GL_EXTCALL(glGetQueryObjectui64v(id, GL_QUERY_RESULT, (void *)0)); + GL_EXTCALL(glGetQueryObjectui64v(id, GL_QUERY_RESULT, NULL)); GL_EXTCALL(glGetQueryObjectui64v(id, GL_QUERY_RESULT, (void *)sizeof(query->map_ptr[0]))); GL_EXTCALL(glBindBuffer(GL_QUERY_BUFFER, 0)); checkGLcall("queue query result");
On Thu, 10 Jun 2021 at 14:28, Francois Gouget fgouget@free.fr wrote:
/* Read the same value twice. We know we have the result if map_ptr[0] == map_ptr[1]. */
- GL_EXTCALL(glGetQueryObjectui64v(id, GL_QUERY_RESULT, (void *)0));
- GL_EXTCALL(glGetQueryObjectui64v(id, GL_QUERY_RESULT, NULL)); GL_EXTCALL(glGetQueryObjectui64v(id, GL_QUERY_RESULT, (void *)sizeof(query->map_ptr[0])));
I don't feel too strongly about this, and I would certainly be fine with the change if e.g. Alexandre preferred it that way, but note that using NULL here slightly obfuscates the fact that we write the result to offset 0 in the currently bound buffer object. (I.e., "map_ptr[0]", compared to "map_ptr[1]" in the line following the changed one)