glthread: don't sync when using pixel buffer objects

The pointer is a GPU offset if a PBO is bound.

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9029>
This commit is contained in:
Marek Olšák 2021-02-11 19:06:40 -05:00
parent 0b6739ef80
commit 638a184849
8 changed files with 158 additions and 71 deletions

View File

@ -374,7 +374,8 @@
<param name="fixedsamplelocations" type="GLboolean" />
</function>
<function name="TextureSubImage1D" no_error="true">
<function name="TextureSubImage1D" no_error="true"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="texture" type="GLuint" />
<param name="level" type="GLint" />
<param name="xoffset" type="GLint" />
@ -384,7 +385,8 @@
<param name="pixels" type="const GLvoid *" />
</function>
<function name="TextureSubImage2D" no_error="true">
<function name="TextureSubImage2D" no_error="true"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="texture" type="GLuint" />
<param name="level" type="GLint" />
<param name="xoffset" type="GLint" />
@ -396,7 +398,8 @@
<param name="pixels" type="const GLvoid *" />
</function>
<function name="TextureSubImage3D" no_error="true">
<function name="TextureSubImage3D" no_error="true"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="texture" type="GLuint" />
<param name="level" type="GLint" />
<param name="xoffset" type="GLint" />
@ -410,7 +413,8 @@
<param name="pixels" type="const GLvoid *" />
</function>
<function name="CompressedTextureSubImage1D" no_error="true">
<function name="CompressedTextureSubImage1D" no_error="true"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="texture" type="GLuint" />
<param name="level" type="GLint" />
<param name="xoffset" type="GLint" />
@ -420,7 +424,8 @@
<param name="data" type="const GLvoid *" />
</function>
<function name="CompressedTextureSubImage2D" no_error="true">
<function name="CompressedTextureSubImage2D" no_error="true"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="texture" type="GLuint" />
<param name="level" type="GLint" />
<param name="xoffset" type="GLint" />
@ -432,7 +437,8 @@
<param name="data" type="const GLvoid *" />
</function>
<function name="CompressedTextureSubImage3D" no_error="true">
<function name="CompressedTextureSubImage3D" no_error="true"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="texture" type="GLuint" />
<param name="level" type="GLint" />
<param name="xoffset" type="GLint" />
@ -523,7 +529,8 @@
<param name="texture" type="GLuint" />
</function>
<function name="GetTextureImage">
<function name="GetTextureImage"
marshal="async" marshal_sync="_mesa_glthread_has_no_pack_buffer(ctx)">
<param name="texture" type="GLuint" />
<param name="level" type="GLint" />
<param name="format" type="GLenum" />
@ -532,7 +539,8 @@
<param name="pixels" type="GLvoid *" />
</function>
<function name="GetCompressedTextureImage">
<function name="GetCompressedTextureImage"
marshal="async" marshal_sync="_mesa_glthread_has_no_pack_buffer(ctx)">
<param name="texture" type="GLuint" />
<param name="level" type="GLint" />
<param name="bufSize" type="GLsizei" />

View File

@ -7,7 +7,8 @@
<category name="GL_ARB_get_texture_sub_image" number="165">
<function name="GetTextureSubImage">
<function name="GetTextureSubImage"
marshal="async" marshal_sync="_mesa_glthread_has_no_pack_buffer(ctx)">
<param name="texture" type="GLuint"/>
<param name="level" type="GLint"/>
<param name="xoffset" type="GLint"/>
@ -22,7 +23,8 @@
<param name="pixels" type="GLvoid *"/>
</function>
<function name="GetCompressedTextureSubImage">
<function name="GetCompressedTextureSubImage"
marshal="async" marshal_sync="_mesa_glthread_has_no_pack_buffer(ctx)">
<param name="texture" type="GLuint"/>
<param name="level" type="GLint"/>
<param name="xoffset" type="GLint"/>

View File

@ -68,12 +68,14 @@
<function name="GetnPolygonStippleARB">
<function name="GetnPolygonStippleARB"
marshal="async" marshal_sync="_mesa_glthread_has_no_pack_buffer(ctx)">
<param name="bufSize" type="GLsizei"/>
<param name="pattern" type="GLubyte *" output="true"/>
</function>
<function name="GetnTexImageARB">
<function name="GetnTexImageARB"
marshal="async" marshal_sync="_mesa_glthread_has_no_pack_buffer(ctx)">
<param name="target" type="GLenum"/>
<param name="level" type="GLint"/>
<param name="format" type="GLenum"/>
@ -82,7 +84,8 @@
<param name="img" type="GLvoid *" output="true"/>
</function>
<function name="ReadnPixelsARB" no_error="true">
<function name="ReadnPixelsARB" no_error="true"
marshal="async" marshal_sync="_mesa_glthread_has_no_pack_buffer(ctx)">
<param name="x" type="GLint"/>
<param name="y" type="GLint"/>
<param name="width" type="GLsizei"/>
@ -142,7 +145,8 @@
<!-- OpenGL 1.3 sized buffer queries -->
<function name="GetnCompressedTexImageARB">
<function name="GetnCompressedTexImageARB"
marshal="async" marshal_sync="_mesa_glthread_has_no_pack_buffer(ctx)">
<param name="target" type="GLenum"/>
<param name="lod" type="GLint"/>
<param name="bufSize" type="GLsizei"/>

View File

@ -172,7 +172,8 @@
<param name="params" type="const float *" count="_mesa_tex_param_enum_to_count(pname)"/>
</function>
<function name="TextureImage1DEXT">
<function name="TextureImage1DEXT"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="texture" type="GLuint" />
<param name="target" type="GLenum" />
<param name="level" type="GLint" />
@ -184,7 +185,8 @@
<param name="pixels" type="const GLvoid *" />
</function>
<function name="TextureImage2DEXT">
<function name="TextureImage2DEXT"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="texture" type="GLuint" />
<param name="target" type="GLenum" />
<param name="level" type="GLint" />
@ -197,7 +199,8 @@
<param name="pixels" type="const GLvoid *" />
</function>
<function name="TextureImage3DEXT">
<function name="TextureImage3DEXT"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="texture" type="GLuint" />
<param name="target" type="GLenum" />
<param name="level" type="GLint" />
@ -211,7 +214,8 @@
<param name="pixels" type="const GLvoid *" />
</function>
<function name="TextureSubImage1DEXT">
<function name="TextureSubImage1DEXT"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="texture" type="GLuint" />
<param name="target" type="GLenum" />
<param name="level" type="GLint" />
@ -222,7 +226,8 @@
<param name="pixels" type="const GLvoid *" />
</function>
<function name="TextureSubImage2DEXT">
<function name="TextureSubImage2DEXT"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="texture" type="GLuint" />
<param name="target" type="GLenum" />
<param name="level" type="GLint" />
@ -235,7 +240,8 @@
<param name="pixels" type="const GLvoid *" />
</function>
<function name="TextureSubImage3DEXT">
<function name="TextureSubImage3DEXT"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="texture" type="GLuint" />
<param name="target" type="GLenum" />
<param name="level" type="GLint" />
@ -308,7 +314,8 @@
<param name="height" type="GLsizei" />
</function>
<function name="GetTextureImageEXT">
<function name="GetTextureImageEXT"
marshal="async" marshal_sync="_mesa_glthread_has_no_pack_buffer(ctx)">
<param name="texture" type="GLuint" />
<param name="target" type="GLenum" />
<param name="level" type="GLint" />
@ -437,7 +444,8 @@
<param name="params" type="GLfloat*" />
</function>
<function name="GetMultiTexImageEXT">
<function name="GetMultiTexImageEXT"
marshal="async" marshal_sync="_mesa_glthread_has_no_pack_buffer(ctx)">
<param name="texunit" type="GLenum" />
<param name="target" type="GLenum" />
<param name="level" type="GLint" />
@ -462,7 +470,8 @@
<param name="params" type="GLfloat*" />
</function>
<function name="MultiTexImage1DEXT">
<function name="MultiTexImage1DEXT"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="texunit" type="GLenum" />
<param name="target" type="GLenum" />
<param name="level" type="GLint" />
@ -474,7 +483,8 @@
<param name="pixels" type="const GLvoid*" />
</function>
<function name="MultiTexImage2DEXT">
<function name="MultiTexImage2DEXT"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="texunit" type="GLenum" />
<param name="target" type="GLenum" />
<param name="level" type="GLint" />
@ -487,7 +497,8 @@
<param name="pixels" type="const GLvoid*" />
</function>
<function name="MultiTexImage3DEXT">
<function name="MultiTexImage3DEXT"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="texunit" type="GLenum" />
<param name="target" type="GLenum" />
<param name="level" type="GLint" />
@ -501,7 +512,8 @@
<param name="pixels" type="const GLvoid*" />
</function>
<function name="MultiTexSubImage1DEXT">
<function name="MultiTexSubImage1DEXT"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="texunit" type="GLenum" />
<param name="target" type="GLenum" />
<param name="level" type="GLint" />
@ -512,7 +524,8 @@
<param name="pixels" type="const GLvoid*" />
</function>
<function name="MultiTexSubImage2DEXT">
<function name="MultiTexSubImage2DEXT"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="texunit" type="GLenum" />
<param name="target" type="GLenum" />
<param name="level" type="GLint" />
@ -525,7 +538,8 @@
<param name="pixels" type="const GLvoid*" />
</function>
<function name="MultiTexSubImage3DEXT">
<function name="MultiTexSubImage3DEXT"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="texunit" type="GLenum" />
<param name="target" type="GLenum" />
<param name="level" type="GLint" />
@ -692,7 +706,8 @@
<param name="m" type="const GLdouble *" count="16"/>
</function>
<function name="CompressedTextureImage1DEXT">
<function name="CompressedTextureImage1DEXT"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="texture" type="GLuint" />
<param name="target" type="GLenum" />
<param name="level" type="GLint" />
@ -703,7 +718,8 @@
<param name="data" type="const GLvoid *" />
</function>
<function name="CompressedTextureImage2DEXT">
<function name="CompressedTextureImage2DEXT"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="texture" type="GLuint" />
<param name="target" type="GLenum" />
<param name="level" type="GLint" />
@ -715,7 +731,8 @@
<param name="data" type="const GLvoid *" />
</function>
<function name="CompressedTextureImage3DEXT">
<function name="CompressedTextureImage3DEXT"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="texture" type="GLuint" />
<param name="target" type="GLenum" />
<param name="level" type="GLint" />
@ -728,7 +745,8 @@
<param name="data" type="const GLvoid *" />
</function>
<function name="CompressedTextureSubImage1DEXT">
<function name="CompressedTextureSubImage1DEXT"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="texture" type="GLuint" />
<param name="target" type="GLenum" />
<param name="level" type="GLint" />
@ -739,7 +757,8 @@
<param name="data" type="const GLvoid *" />
</function>
<function name="CompressedTextureSubImage2DEXT">
<function name="CompressedTextureSubImage2DEXT"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="texture" type="GLuint" />
<param name="target" type="GLenum" />
<param name="level" type="GLint" />
@ -752,7 +771,8 @@
<param name="data" type="const GLvoid *" />
</function>
<function name="CompressedTextureSubImage3DEXT">
<function name="CompressedTextureSubImage3DEXT"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="texture" type="GLuint" />
<param name="target" type="GLenum" />
<param name="level" type="GLint" />
@ -767,14 +787,16 @@
<param name="data" type="const GLvoid *" />
</function>
<function name="GetCompressedTextureImageEXT">
<function name="GetCompressedTextureImageEXT"
marshal="async" marshal_sync="_mesa_glthread_has_no_pack_buffer(ctx)">
<param name="texture" type="GLuint" />
<param name="target" type="GLenum" />
<param name="level" type="GLint" />
<param name="img" type="GLvoid *" />
</function>
<function name="CompressedMultiTexImage1DEXT">
<function name="CompressedMultiTexImage1DEXT"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="texunit" type="GLenum" />
<param name="target" type="GLenum" />
<param name="level" type="GLint" />
@ -785,7 +807,8 @@
<param name="data" type="const GLvoid *" />
</function>
<function name="CompressedMultiTexImage2DEXT">
<function name="CompressedMultiTexImage2DEXT"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="texunit" type="GLenum" />
<param name="target" type="GLenum" />
<param name="level" type="GLint" />
@ -797,7 +820,8 @@
<param name="data" type="const GLvoid *" />
</function>
<function name="CompressedMultiTexImage3DEXT">
<function name="CompressedMultiTexImage3DEXT"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="texunit" type="GLenum" />
<param name="target" type="GLenum" />
<param name="level" type="GLint" />
@ -810,7 +834,8 @@
<param name="data" type="const GLvoid *" />
</function>
<function name="CompressedMultiTexSubImage1DEXT">
<function name="CompressedMultiTexSubImage1DEXT"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="texunit" type="GLenum" />
<param name="target" type="GLenum" />
<param name="level" type="GLint" />
@ -821,7 +846,8 @@
<param name="data" type="const GLvoid *" />
</function>
<function name="CompressedMultiTexSubImage2DEXT">
<function name="CompressedMultiTexSubImage2DEXT"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="texunit" type="GLenum" />
<param name="target" type="GLenum" />
<param name="level" type="GLint" />
@ -834,7 +860,8 @@
<param name="data" type="const GLvoid *" />
</function>
<function name="CompressedMultiTexSubImage3DEXT">
<function name="CompressedMultiTexSubImage3DEXT"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="texunit" type="GLenum" />
<param name="target" type="GLenum" />
<param name="level" type="GLint" />
@ -849,7 +876,8 @@
<param name="data" type="const GLvoid *" />
</function>
<function name="GetCompressedMultiTexImageEXT">
<function name="GetCompressedMultiTexImageEXT"
marshal="async" marshal_sync="_mesa_glthread_has_no_pack_buffer(ctx)">
<param name="texunit" type="GLenum" />
<param name="target" type="GLenum" />
<param name="level" type="GLint" />

View File

@ -1161,7 +1161,8 @@
<glx rop="4"/>
</function>
<function name="Bitmap" deprecated="3.1">
<function name="Bitmap" deprecated="3.1"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="width" type="GLsizei"/>
<param name="height" type="GLsizei"/>
<param name="xorig" type="GLfloat"/>
@ -2119,7 +2120,8 @@
<glx rop="101"/>
</function>
<function name="PolygonStipple" deprecated="3.1">
<function name="PolygonStipple" deprecated="3.1"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="mask" type="const GLubyte *" img_width="32" img_height="32" img_format="GL_COLOR_INDEX" img_type="GL_BITMAP" img_target="0" img_pad_dimensions="false"/>
<glx rop="102"/>
</function>
@ -2167,7 +2169,8 @@
<glx rop="108"/>
</function>
<function name="TexImage1D" no_error="true">
<function name="TexImage1D" no_error="true"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="target" type="GLenum"/>
<param name="level" type="GLint"/>
<param name="internalformat" type="GLint"/>
@ -2179,7 +2182,8 @@
<glx rop="109" large="true"/>
</function>
<function name="TexImage2D" es1="1.0" es2="2.0" no_error="true">
<function name="TexImage2D" es1="1.0" es2="2.0" no_error="true"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="target" type="GLenum"/>
<param name="level" type="GLint"/>
<param name="internalformat" type="GLint"/>
@ -2632,21 +2636,24 @@
<glx sop="110" handcode="client"/>
</function>
<function name="PixelMapfv" deprecated="3.1" marshal="sync">
<function name="PixelMapfv" deprecated="3.1"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="map" type="GLenum"/>
<param name="mapsize" type="GLsizei" counter="true"/>
<param name="values" type="const GLfloat *" count="mapsize"/>
<glx rop="168" large="true"/>
</function>
<function name="PixelMapuiv" deprecated="3.1" marshal="sync">
<function name="PixelMapuiv" deprecated="3.1"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="map" type="GLenum"/>
<param name="mapsize" type="GLsizei" counter="true"/>
<param name="values" type="const GLuint *" count="mapsize"/>
<glx rop="169" large="true"/>
</function>
<function name="PixelMapusv" deprecated="3.1" marshal="sync">
<function name="PixelMapusv" deprecated="3.1"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="map" type="GLenum"/>
<param name="mapsize" type="GLsizei" counter="true"/>
<param name="values" type="const GLushort *" count="mapsize"/>
@ -2667,7 +2674,8 @@
<glx rop="172"/>
</function>
<function name="ReadPixels" es1="1.0" es2="2.0" no_error="true">
<function name="ReadPixels" es1="1.0" es2="2.0" no_error="true"
marshal="async" marshal_sync="_mesa_glthread_has_no_pack_buffer(ctx)">
<param name="x" type="GLint"/>
<param name="y" type="GLint"/>
<param name="width" type="GLsizei"/>
@ -2678,7 +2686,8 @@
<glx sop="111"/>
</function>
<function name="DrawPixels" deprecated="3.1">
<function name="DrawPixels" deprecated="3.1"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="width" type="GLsizei"/>
<param name="height" type="GLsizei"/>
<param name="format" type="GLenum"/>
@ -2771,25 +2780,29 @@
<glx sop="124"/>
</function>
<function name="GetPixelMapfv" deprecated="3.1">
<function name="GetPixelMapfv" deprecated="3.1"
marshal="async" marshal_sync="_mesa_glthread_has_no_pack_buffer(ctx)">
<param name="map" type="GLenum"/>
<param name="values" type="GLfloat *" output="true" variable_param="map"/>
<glx sop="125"/>
</function>
<function name="GetPixelMapuiv" deprecated="3.1">
<function name="GetPixelMapuiv" deprecated="3.1"
marshal="async" marshal_sync="_mesa_glthread_has_no_pack_buffer(ctx)">
<param name="map" type="GLenum"/>
<param name="values" type="GLuint *" output="true" variable_param="map"/>
<glx sop="126"/>
</function>
<function name="GetPixelMapusv" deprecated="3.1">
<function name="GetPixelMapusv" deprecated="3.1"
marshal="async" marshal_sync="_mesa_glthread_has_no_pack_buffer(ctx)">
<param name="map" type="GLenum"/>
<param name="values" type="GLushort *" output="true" variable_param="map"/>
<glx sop="127"/>
</function>
<function name="GetPolygonStipple" deprecated="3.1">
<function name="GetPolygonStipple" deprecated="3.1"
marshal="async" marshal_sync="_mesa_glthread_has_no_pack_buffer(ctx)">
<param name="mask" type="GLubyte *" output="true" img_width="32" img_height="32" img_format="GL_COLOR_INDEX" img_type="GL_BITMAP"/>
<glx sop="128"/>
</function>
@ -2835,7 +2848,8 @@
<glx sop="134"/>
</function>
<function name="GetTexImage">
<function name="GetTexImage"
marshal="async" marshal_sync="_mesa_glthread_has_no_pack_buffer(ctx)">
<param name="target" type="GLenum"/>
<param name="level" type="GLint"/>
<param name="format" type="GLenum"/>
@ -3331,7 +3345,8 @@
<glx rop="4122"/>
</function>
<function name="TexSubImage1D" no_error="true">
<function name="TexSubImage1D" no_error="true"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="target" type="GLenum"/>
<param name="level" type="GLint"/>
<param name="xoffset" type="GLint"/>
@ -3343,7 +3358,8 @@
<glx rop="4099" large="true"/>
</function>
<function name="TexSubImage2D" es1="1.0" es2="2.0" no_error="true">
<function name="TexSubImage2D" es1="1.0" es2="2.0" no_error="true"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="target" type="GLenum"/>
<param name="level" type="GLint"/>
<param name="xoffset" type="GLint"/>
@ -4044,7 +4060,8 @@
<glx rop="4113"/>
</function>
<function name="TexImage3D" es2="3.0" no_error="true">
<function name="TexImage3D" es2="3.0" no_error="true"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="target" type="GLenum"/>
<param name="level" type="GLint"/>
<param name="internalformat" type="GLint"/>
@ -4058,7 +4075,8 @@
<glx rop="4114" large="true"/>
</function>
<function name="TexSubImage3D" es2="3.0" no_error="true">
<function name="TexSubImage3D" es2="3.0" no_error="true"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="target" type="GLenum"/>
<param name="level" type="GLint"/>
<param name="xoffset" type="GLint"/>
@ -4542,8 +4560,8 @@
<glx rop="229"/>
</function>
<function name="CompressedTexImage3D" es2="3.0" marshal="sync"
no_error="true">
<function name="CompressedTexImage3D" es2="3.0" no_error="true"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="target" type="GLenum"/>
<param name="level" type="GLint"/>
<param name="internalformat" type="GLenum"/>
@ -4556,8 +4574,8 @@
<glx rop="216" handcode="client"/>
</function>
<function name="CompressedTexImage2D" es1="1.0" es2="2.0" marshal="sync"
no_error="true">
<function name="CompressedTexImage2D" es1="1.0" es2="2.0" no_error="true"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="target" type="GLenum"/>
<param name="level" type="GLint"/>
<param name="internalformat" type="GLenum"/>
@ -4569,7 +4587,8 @@
<glx rop="215" handcode="client"/>
</function>
<function name="CompressedTexImage1D" marshal="sync" no_error="true">
<function name="CompressedTexImage1D" no_error="true"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="target" type="GLenum"/>
<param name="level" type="GLint"/>
<param name="internalformat" type="GLenum"/>
@ -4580,8 +4599,8 @@
<glx rop="214" handcode="client"/>
</function>
<function name="CompressedTexSubImage3D" es2="3.0" marshal="sync"
no_error="true">
<function name="CompressedTexSubImage3D" es2="3.0" no_error="true"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="target" type="GLenum"/>
<param name="level" type="GLint"/>
<param name="xoffset" type="GLint"/>
@ -4596,8 +4615,8 @@
<glx rop="219" handcode="client"/>
</function>
<function name="CompressedTexSubImage2D" es1="1.0" es2="2.0" marshal="sync"
no_error="true">
<function name="CompressedTexSubImage2D" es1="1.0" es2="2.0" no_error="true"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="target" type="GLenum"/>
<param name="level" type="GLint"/>
<param name="xoffset" type="GLint"/>
@ -4610,7 +4629,8 @@
<glx rop="218" handcode="client"/>
</function>
<function name="CompressedTexSubImage1D" marshal="sync" no_error="true">
<function name="CompressedTexSubImage1D" no_error="true"
marshal="async" marshal_sync="_mesa_glthread_has_no_unpack_buffer(ctx)">
<param name="target" type="GLenum"/>
<param name="level" type="GLint"/>
<param name="xoffset" type="GLint"/>
@ -4621,7 +4641,8 @@
<glx rop="217" handcode="client"/>
</function>
<function name="GetCompressedTexImage">
<function name="GetCompressedTexImage"
marshal="async" marshal_sync="_mesa_glthread_has_no_pack_buffer(ctx)">
<param name="target" type="GLenum"/>
<param name="level" type="GLint"/>
<param name="img" type="GLvoid *" output="true"/>

View File

@ -205,6 +205,8 @@ struct glthread_state
/** Currently-bound buffer object IDs. */
GLuint CurrentArrayBufferName;
GLuint CurrentDrawIndirectBufferName;
GLuint CurrentPixelPackBufferName;
GLuint CurrentPixelUnpackBufferName;
/**
* The batch index of the last occurence of glLinkProgram or

View File

@ -189,6 +189,12 @@ _mesa_glthread_BindBuffer(struct gl_context *ctx, GLenum target, GLuint buffer)
case GL_DRAW_INDIRECT_BUFFER:
glthread->CurrentDrawIndirectBufferName = buffer;
break;
case GL_PIXEL_PACK_BUFFER:
glthread->CurrentPixelPackBufferName = buffer;
break;
case GL_PIXEL_UNPACK_BUFFER:
glthread->CurrentPixelUnpackBufferName = buffer;
break;
}
}
@ -210,6 +216,10 @@ _mesa_glthread_DeleteBuffers(struct gl_context *ctx, GLsizei n,
_mesa_glthread_BindBuffer(ctx, GL_ELEMENT_ARRAY_BUFFER, 0);
if (id == glthread->CurrentDrawIndirectBufferName)
_mesa_glthread_BindBuffer(ctx, GL_DRAW_INDIRECT_BUFFER, 0);
if (id == glthread->CurrentPixelPackBufferName)
_mesa_glthread_BindBuffer(ctx, GL_PIXEL_PACK_BUFFER, 0);
if (id == glthread->CurrentPixelUnpackBufferName)
_mesa_glthread_BindBuffer(ctx, GL_PIXEL_UNPACK_BUFFER, 0);
}
}

View File

@ -71,6 +71,18 @@ _mesa_glthread_allocate_command(struct gl_context *ctx,
return cmd_base;
}
static inline bool
_mesa_glthread_has_no_pack_buffer(const struct gl_context *ctx)
{
return ctx->GLThread.CurrentPixelPackBufferName == 0;
}
static inline bool
_mesa_glthread_has_no_unpack_buffer(const struct gl_context *ctx)
{
return ctx->GLThread.CurrentPixelUnpackBufferName == 0;
}
/**
* Instead of conditionally handling marshaling immediate index data in draw
* calls (deprecated and removed in GL core), we just disable threading.