Signed-off-by: Michael Stefaniuc mstefani@winehq.org --- 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 d4e7cf5b37..0b54d287f3 100644 --- a/dlls/wined3d/query.c +++ b/dlls/wined3d/query.c @@ -100,7 +100,7 @@ static BOOL wined3d_query_buffer_queue_result(struct wined3d_context *context, s
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 Sat, 8 Dec 2018 at 00:28, Michael Stefaniuc mstefani@winehq.org wrote:
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));
I don't think that really makes it better. The code is passing the offset 0 through a pointer typed parameter (because, OpenGL), much like the line below it passes a different offset through the same parameter.
On 12/7/18 10:08 PM, Henri Verbeet wrote:
On Sat, 8 Dec 2018 at 00:28, Michael Stefaniuc mstefani@winehq.org wrote:
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));
I don't think that really makes it better. The code is passing the offset 0 through a pointer typed parameter (because, OpenGL), much like the line below it passes a different offset through the same parameter.
Ok, didn't recognize that an offset.
bye michael