From: Jacek Caban jacek@codeweavers.com
--- dlls/opengl32/make_opengl | 6 ++++++ dlls/opengl32/unix_thunks.c | 18 ++++++---------- dlls/opengl32/unix_thunks.h | 6 ++++++ dlls/opengl32/unix_wgl.c | 42 +++++++++++++++++++++++++++++++++++++ 4 files changed, 60 insertions(+), 12 deletions(-)
diff --git a/dlls/opengl32/make_opengl b/dlls/opengl32/make_opengl index c6c08d27176..3ca110c7ddc 100755 --- a/dlls/opengl32/make_opengl +++ b/dlls/opengl32/make_opengl @@ -278,10 +278,14 @@ my %map_default_fbo_thunks = ); my %manual_wow64_wrappers = ( + "glBufferStorage" => 0, "glClientWaitSync" => 0, "glDeleteBuffers" => 0, "glDeleteSync" => 0, "glFenceSync" => 0, + "glFlushMappedBufferRange" => 0, + "glFlushMappedNamedBufferRange" => 0, + "glFlushMappedNamedBufferRangeEXT" => 0, "glGetBufferPointerv" => 0, "glGetBufferPointervARB" => 0, "glGetError" => 0, @@ -296,6 +300,8 @@ my %manual_wow64_wrappers = "glMapNamedBufferEXT" => 0, "glMapNamedBufferRange" => 0, "glMapNamedBufferRangeEXT" => 0, + "glNamedBufferStorage" => 0, + "glNamedBufferStorageEXT" => 0, "glUnmapBuffer" => 0, "glUnmapBufferARB" => 0, "glUnmapNamedBuffer" => 0, diff --git a/dlls/opengl32/unix_thunks.c b/dlls/opengl32/unix_thunks.c index c902279d233..a0e4e9c14c6 100644 --- a/dlls/opengl32/unix_thunks.c +++ b/dlls/opengl32/unix_thunks.c @@ -37669,10 +37669,9 @@ static NTSTATUS wow64_ext_glBufferStorage( void *args ) GLbitfield flags; } *params = args; TEB *teb = get_teb64( params->teb ); - const struct opengl_funcs *funcs = teb->glTable; pthread_mutex_lock( &wgl_lock ); invalidate_buffer_target( teb, params->target ); - funcs->p_glBufferStorage( params->target, (GLsizeiptr)ULongToPtr(params->size), ULongToPtr(params->data), params->flags ); + wow64_glBufferStorage( teb, params->target, (GLsizeiptr)ULongToPtr(params->size), ULongToPtr(params->data), params->flags ); pthread_mutex_unlock( &wgl_lock ); set_context_attribute( teb, -1 /* unsupported */, NULL, 0 ); return STATUS_SUCCESS; @@ -43895,8 +43894,7 @@ static NTSTATUS wow64_ext_glFlushMappedBufferRange( void *args ) PTR32 length; } *params = args; TEB *teb = get_teb64( params->teb ); - const struct opengl_funcs *funcs = teb->glTable; - funcs->p_glFlushMappedBufferRange( params->target, (GLintptr)ULongToPtr(params->offset), (GLsizeiptr)ULongToPtr(params->length) ); + wow64_glFlushMappedBufferRange( teb, params->target, (GLintptr)ULongToPtr(params->offset), (GLsizeiptr)ULongToPtr(params->length) ); set_context_attribute( teb, -1 /* unsupported */, NULL, 0 ); return STATUS_SUCCESS; } @@ -43927,8 +43925,7 @@ static NTSTATUS wow64_ext_glFlushMappedNamedBufferRange( void *args ) PTR32 length; } *params = args; TEB *teb = get_teb64( params->teb ); - const struct opengl_funcs *funcs = teb->glTable; - funcs->p_glFlushMappedNamedBufferRange( params->buffer, (GLintptr)ULongToPtr(params->offset), (GLsizeiptr)ULongToPtr(params->length) ); + wow64_glFlushMappedNamedBufferRange( teb, params->buffer, (GLintptr)ULongToPtr(params->offset), (GLsizeiptr)ULongToPtr(params->length) ); set_context_attribute( teb, -1 /* unsupported */, NULL, 0 ); return STATUS_SUCCESS; } @@ -43943,8 +43940,7 @@ static NTSTATUS wow64_ext_glFlushMappedNamedBufferRangeEXT( void *args ) PTR32 length; } *params = args; TEB *teb = get_teb64( params->teb ); - const struct opengl_funcs *funcs = teb->glTable; - funcs->p_glFlushMappedNamedBufferRangeEXT( params->buffer, (GLintptr)ULongToPtr(params->offset), (GLsizeiptr)ULongToPtr(params->length) ); + wow64_glFlushMappedNamedBufferRangeEXT( teb, params->buffer, (GLintptr)ULongToPtr(params->offset), (GLsizeiptr)ULongToPtr(params->length) ); set_context_attribute( teb, -1 /* unsupported */, NULL, 0 ); return STATUS_SUCCESS; } @@ -58557,10 +58553,9 @@ static NTSTATUS wow64_ext_glNamedBufferStorage( void *args ) GLbitfield flags; } *params = args; TEB *teb = get_teb64( params->teb ); - const struct opengl_funcs *funcs = teb->glTable; pthread_mutex_lock( &wgl_lock ); invalidate_buffer_name( teb, params->buffer ); - funcs->p_glNamedBufferStorage( params->buffer, (GLsizeiptr)ULongToPtr(params->size), ULongToPtr(params->data), params->flags ); + wow64_glNamedBufferStorage( teb, params->buffer, (GLsizeiptr)ULongToPtr(params->size), ULongToPtr(params->data), params->flags ); pthread_mutex_unlock( &wgl_lock ); set_context_attribute( teb, -1 /* unsupported */, NULL, 0 ); return STATUS_SUCCESS; @@ -58577,10 +58572,9 @@ static NTSTATUS wow64_ext_glNamedBufferStorageEXT( void *args ) GLbitfield flags; } *params = args; TEB *teb = get_teb64( params->teb ); - const struct opengl_funcs *funcs = teb->glTable; pthread_mutex_lock( &wgl_lock ); invalidate_buffer_name( teb, params->buffer ); - funcs->p_glNamedBufferStorageEXT( params->buffer, (GLsizeiptr)ULongToPtr(params->size), ULongToPtr(params->data), params->flags ); + wow64_glNamedBufferStorageEXT( teb, params->buffer, (GLsizeiptr)ULongToPtr(params->size), ULongToPtr(params->data), params->flags ); pthread_mutex_unlock( &wgl_lock ); set_context_attribute( teb, -1 /* unsupported */, NULL, 0 ); return STATUS_SUCCESS; diff --git a/dlls/opengl32/unix_thunks.h b/dlls/opengl32/unix_thunks.h index 83a53da6e87..f06960ba97b 100644 --- a/dlls/opengl32/unix_thunks.h +++ b/dlls/opengl32/unix_thunks.h @@ -48,10 +48,14 @@ extern BOOL wrap_wglSetPbufferAttribARB( TEB *teb, HPBUFFERARB hPbuffer, const i
#ifdef _WIN64 extern GLenum wow64_glGetError( TEB *teb ); +extern void wow64_glBufferStorage( TEB *teb, GLenum target, GLsizeiptr size, const void *data, GLbitfield flags ); extern GLenum wow64_glClientWaitSync( TEB *teb, GLsync sync, GLbitfield flags, GLuint64 timeout ); extern void wow64_glDeleteBuffers( TEB *teb, GLsizei n, const GLuint *buffers ); extern void wow64_glDeleteSync( TEB *teb, GLsync sync ); extern GLsync wow64_glFenceSync( TEB *teb, GLenum condition, GLbitfield flags ); +extern void wow64_glFlushMappedBufferRange( TEB *teb, GLenum target, GLintptr offset, GLsizeiptr length ); +extern void wow64_glFlushMappedNamedBufferRange( TEB *teb, GLuint buffer, GLintptr offset, GLsizeiptr length ); +extern void wow64_glFlushMappedNamedBufferRangeEXT( TEB *teb, GLuint buffer, GLintptr offset, GLsizeiptr length ); extern void wow64_glGetBufferPointerv( TEB *teb, GLenum target, GLenum pname, PTR32 *params ); extern void wow64_glGetBufferPointervARB( TEB *teb, GLenum target, GLenum pname, PTR32 *params ); extern void wow64_glGetNamedBufferPointerv( TEB *teb, GLuint buffer, GLenum pname, PTR32 *params ); @@ -65,6 +69,8 @@ extern PTR32 wow64_glMapNamedBuffer( TEB *teb, GLuint buffer, GLenum access ); extern PTR32 wow64_glMapNamedBufferEXT( TEB *teb, GLuint buffer, GLenum access ); extern PTR32 wow64_glMapNamedBufferRange( TEB *teb, GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access ); extern PTR32 wow64_glMapNamedBufferRangeEXT( TEB *teb, GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access ); +extern void wow64_glNamedBufferStorage( TEB *teb, GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags ); +extern void wow64_glNamedBufferStorageEXT( TEB *teb, GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags ); extern GLboolean wow64_glUnmapBuffer( TEB *teb, GLenum target ); extern GLboolean wow64_glUnmapBufferARB( TEB *teb, GLenum target ); extern GLboolean wow64_glUnmapNamedBuffer( TEB *teb, GLuint buffer ); diff --git a/dlls/opengl32/unix_wgl.c b/dlls/opengl32/unix_wgl.c index 27a6e43451e..df7159df732 100644 --- a/dlls/opengl32/unix_wgl.c +++ b/dlls/opengl32/unix_wgl.c @@ -2176,6 +2176,27 @@ void wow64_glDeleteBuffers( TEB *teb, GLsizei n, const GLuint *buffers ) pthread_mutex_unlock( &wgl_lock ); }
+void wow64_glBufferStorage( TEB *teb, GLenum target, GLsizeiptr size, const void *data, GLbitfield flags ) +{ + const struct opengl_funcs *funcs = teb->glTable; + + funcs->p_glBufferStorage( target, size, data, flags ); +} + +void wow64_glNamedBufferStorage( TEB *teb, GLuint name, GLsizeiptr size, const void *data, GLbitfield flags ) +{ + const struct opengl_funcs *funcs = teb->glTable; + + funcs->p_glNamedBufferStorage( name, size, data, flags ); +} + +void wow64_glNamedBufferStorageEXT( TEB *teb, GLuint name, GLsizeiptr size, const void *data, GLbitfield flags ) +{ + const struct opengl_funcs *funcs = teb->glTable; + + funcs->p_glNamedBufferStorageEXT( name, size, data, flags ); +} + static BOOL wow64_gl_get_buffer_pointer_v( TEB *teb, GLenum target, GLuint name, GLenum pname, PTR32 *wow_ptr ) { struct buffer *buffer; @@ -2383,6 +2404,27 @@ GLboolean wow64_glUnmapNamedBufferEXT( TEB *teb, GLuint buffer ) return wow64_gl_unmap_named_buffer( teb, buffer, funcs->p_glUnmapNamedBufferEXT ); }
+void wow64_glFlushMappedBufferRange( TEB *teb, GLenum target, GLintptr offset, GLsizeiptr length ) +{ + const struct opengl_funcs *funcs = teb->glTable; + + funcs->p_glFlushMappedBufferRange( target, offset, length ); +} + +void wow64_glFlushMappedNamedBufferRange( TEB *teb, GLuint name, GLintptr offset, GLsizeiptr length ) +{ + const struct opengl_funcs *funcs = teb->glTable; + + funcs->p_glFlushMappedNamedBufferRange( name, offset, length ); +} + +void wow64_glFlushMappedNamedBufferRangeEXT( TEB *teb, GLuint name, GLintptr offset, GLsizeiptr length ) +{ + const struct opengl_funcs *funcs = teb->glTable; + + funcs->p_glFlushMappedNamedBufferRangeEXT( name, offset, length ); +} + NTSTATUS wow64_thread_attach( void *args ) { return thread_attach( get_teb64( (ULONG_PTR)args ));