<div dir="ltr"><div>So is this an ack?</div><div><br></div><div>Marek<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 3, 2019 at 2:41 PM Ian Romanick <<a href="mailto:idr@freedesktop.org">idr@freedesktop.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 1/3/19 11:40 AM, Ian Romanick wrote:<br>
> On 11/28/18 6:59 PM, Marek Olšák wrote:<br>
>> From: Marek Olšák <<a href="mailto:marek.olsak@amd.com" target="_blank">marek.olsak@amd.com</a>><br>
>><br>
>> Tested by piglit.<br>
> <br>
> It doesn't look like there are any piglit test<br>
<br>
Ignore that. I started typing, checked the piglit list, then forgot to<br>
delete it.<br>
<br>
>> ---<br>
>> docs/features.txt | 2 +-<br>
>> docs/relnotes/19.0.0.html | 2 ++<br>
>> src/mapi/glapi/gen/gl_API.xml | 15 ++++++++++++++-<br>
>> src/mesa/main/dd.h | 7 +++++++<br>
>> src/mesa/main/extensions_table.h | 2 ++<br>
>> src/mesa/main/get_hash_params.py | 3 +++<br>
>> src/mesa/main/hint.c | 12 ++++++++++++<br>
>> src/mesa/main/hint.h | 4 ++++<br>
>> src/mesa/main/mtypes.h | 1 +<br>
>> src/mesa/main/shaderapi.c | 10 ++++++++++<br>
>> src/mesa/main/tests/dispatch_sanity.cpp | 4 ++++<br>
>> 11 files changed, 60 insertions(+), 2 deletions(-)<br>
>><br>
>> diff --git a/docs/features.txt b/docs/features.txt<br>
>> index 8999e42519c..7b827de6a92 100644<br>
>> --- a/docs/features.txt<br>
>> +++ b/docs/features.txt<br>
>> @@ -295,21 +295,21 @@ GLES3.2, GLSL ES 3.2 -- all DONE: i965/gen9+, radeonsi, virgl<br>
>> GL_OES_texture_storage_multisample_2d_array DONE (all drivers that support GL_ARB_texture_multisample)<br>
>> <br>
>> Khronos, ARB, and OES extensions that are not part of any OpenGL or OpenGL ES version:<br>
>> <br>
>> GL_ARB_bindless_texture DONE (nvc0, radeonsi)<br>
>> GL_ARB_cl_event not started<br>
>> GL_ARB_compute_variable_group_size DONE (nvc0, radeonsi)<br>
>> GL_ARB_ES3_2_compatibility DONE (i965/gen8+, radeonsi, virgl)<br>
>> GL_ARB_fragment_shader_interlock DONE (i965)<br>
>> GL_ARB_gpu_shader_int64 DONE (i965/gen8+, nvc0, radeonsi, softpipe, llvmpipe)<br>
>> - GL_ARB_parallel_shader_compile not started, but Chia-I Wu did some related work in 2014<br>
>> + GL_ARB_parallel_shader_compile DONE (all drivers)<br>
>> GL_ARB_post_depth_coverage DONE (i965, nvc0)<br>
>> GL_ARB_robustness_isolation not started<br>
>> GL_ARB_sample_locations DONE (nvc0)<br>
>> GL_ARB_seamless_cubemap_per_texture DONE (freedreno, i965, nvc0, radeonsi, r600, softpipe, swr, virgl)<br>
>> GL_ARB_shader_ballot DONE (i965/gen8+, nvc0, radeonsi)<br>
>> GL_ARB_shader_clock DONE (i965/gen7+, nv50, nvc0, r600, radeonsi, virgl)<br>
>> GL_ARB_shader_stencil_export DONE (i965/gen9+, r600, radeonsi, softpipe, llvmpipe, swr, virgl)<br>
>> GL_ARB_shader_viewport_layer_array DONE (i965/gen6+, nvc0, radeonsi)<br>
>> GL_ARB_sparse_buffer DONE (radeonsi/CIK+)<br>
>> GL_ARB_sparse_texture not started<br>
>> diff --git a/docs/relnotes/19.0.0.html b/docs/relnotes/19.0.0.html<br>
>> index bc1776e8f4e..540482bca5f 100644<br>
>> --- a/docs/relnotes/19.0.0.html<br>
>> +++ b/docs/relnotes/19.0.0.html<br>
>> @@ -33,24 +33,26 @@ Compatibility contexts may report a lower version depending on each driver.<br>
>> <h2>SHA256 checksums</h2><br>
>> <pre><br>
>> TBD.<br>
>> </pre><br>
>> <br>
>> <br>
>> <h2>New features</h2><br>
>> <br>
>> <ul><br>
>> <li>GL_AMD_texture_texture4 on all GL 4.0 drivers.</li><br>
>> +<li>GL_ARB_parallel_shader_compile on all drivers.</li><br>
>> <li>GL_EXT_shader_implicit_conversions on all drivers (ES extension).</li><br>
>> <li>GL_EXT_texture_compression_bptc on all GL 4.0 drivers (ES extension).<li><br>
>> <li>GL_EXT_texture_compression_rgtc on all GL 3.0 drivers (ES extension).<li><br>
>> <li>GL_EXT_texture_view on drivers supporting texture views (ES extension).<li><br>
>> +<li>GL_KHR_parallel_shader_compile on all drivers.</li><br>
>> <li>GL_OES_texture_view on drivers supporting texture views (ES extension).</li><br>
>> </ul><br>
>> <br>
>> <h2>Bug fixes</h2><br>
>> <br>
>> <ul><br>
>> <li>TBD</li><br>
>> </ul><br>
>> <br>
>> <h2>Changes</h2><br>
>> diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml<br>
>> index f4d0808f13b..4ce691b361b 100644<br>
>> --- a/src/mapi/glapi/gen/gl_API.xml<br>
>> +++ b/src/mapi/glapi/gen/gl_API.xml<br>
>> @@ -8402,21 +8402,34 @@<br>
>> <param name="maxX" type="GLfloat"/><br>
>> <param name="maxY" type="GLfloat"/><br>
>> <param name="maxZ" type="GLfloat"/><br>
>> <param name="maxW" type="GLfloat"/><br>
>> </function><br>
>> <br>
>> </category><br>
>> <br>
>> <xi:include href="ARB_gpu_shader_int64.xml" xmlns:xi="<a href="http://www.w3.org/2001/XInclude" rel="noreferrer" target="_blank">http://www.w3.org/2001/XInclude</a>"/><br>
>> <br>
>> -<!-- ARB extension 179 - 189 --><br>
>> +<category name="ARB_parallel_shader_compile" number="179"><br>
>> + <enum name="MAX_SHADER_COMPILER_THREADS_ARB" value="0x91B0"/><br>
>> + <enum name="COMPLETION_STATUS_ARB" value="0x91B1"/><br>
>> +<br>
>> + <function name="MaxShaderCompilerThreadsKHR" es2="2.0"><br>
>> + <param name="count" type="GLuint"/><br>
>> + </function><br>
>> +<br>
>> + <function name="MaxShaderCompilerThreadsARB" alias="MaxShaderCompilerThreadsKHR"><br>
>> + <param name="count" type="GLuint"/><br>
>> + </function><br>
>> +</category><br>
>> +<br>
>> +<!-- ARB extension 180 - 189 --><br>
>> <br>
>> <xi:include href="ARB_gl_spirv.xml" xmlns:xi="<a href="http://www.w3.org/2001/XInclude" rel="noreferrer" target="_blank">http://www.w3.org/2001/XInclude</a>"/><br>
>> <br>
>> <!-- Non-ARB extensions sorted by extension number. --><br>
>> <br>
>> <category name="GL_EXT_blend_color" number="2"><br>
>> <enum name="CONSTANT_COLOR_EXT" value="0x8001"/><br>
>> <enum name="ONE_MINUS_CONSTANT_COLOR_EXT" value="0x8002"/><br>
>> <enum name="CONSTANT_ALPHA_EXT" value="0x8003"/><br>
>> <enum name="ONE_MINUS_CONSTANT_ALPHA_EXT" value="0x8004"/><br>
>> diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h<br>
>> index f14c3e04e91..92b6ecac33c 100644<br>
>> --- a/src/mesa/main/dd.h<br>
>> +++ b/src/mesa/main/dd.h<br>
>> @@ -1292,20 +1292,27 @@ struct dd_function_table {<br>
>> /**<br>
>> * Called to initialize gl_program::driver_cache_blob (and size) with a<br>
>> * ralloc allocated buffer.<br>
>> *<br>
>> * This buffer will be saved and restored as part of the gl_program<br>
>> * serialization and deserialization.<br>
>> */<br>
>> void (*ShaderCacheSerializeDriverBlob)(struct gl_context *ctx,<br>
>> struct gl_program *prog);<br>
>> /*@}*/<br>
>> +<br>
>> + /**<br>
>> + * \name Set the number of compiler threads for ARB_parallel_shader_compile<br>
>> + */<br>
>> + void (*SetMaxShaderCompilerThreads)(struct gl_context *ctx, unsigned count);<br>
>> + bool (*GetShaderProgramCompletionStatus)(struct gl_context *ctx,<br>
>> + struct gl_shader_program *shprog);<br>
>> };<br>
>> <br>
>> <br>
>> /**<br>
>> * Per-vertex functions.<br>
>> *<br>
>> * These are the functions which can appear between glBegin and glEnd.<br>
>> * Depending on whether we're inside or outside a glBegin/End pair<br>
>> * and whether we're in immediate mode or building a display list, these<br>
>> * functions behave differently. This structure allows us to switch<br>
>> diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h<br>
>> index 2a3e1ab32ca..075d72f16c2 100644<br>
>> --- a/src/mesa/main/extensions_table.h<br>
>> +++ b/src/mesa/main/extensions_table.h<br>
>> @@ -92,20 +92,21 @@ EXT(ARB_internalformat_query , ARB_internalformat_query<br>
>> EXT(ARB_internalformat_query2 , ARB_internalformat_query2 , GLL, GLC, x , x , 2013)<br>
>> EXT(ARB_invalidate_subdata , dummy_true , GLL, GLC, x , x , 2012)<br>
>> EXT(ARB_map_buffer_alignment , dummy_true , GLL, GLC, x , x , 2011)<br>
>> EXT(ARB_map_buffer_range , ARB_map_buffer_range , GLL, GLC, x , x , 2008)<br>
>> EXT(ARB_multi_bind , dummy_true , GLL, GLC, x , x , 2013)<br>
>> EXT(ARB_multi_draw_indirect , ARB_draw_indirect , GLL, GLC, x , x , 2012)<br>
>> EXT(ARB_multisample , dummy_true , GLL, x , x , x , 1994)<br>
>> EXT(ARB_multitexture , dummy_true , GLL, x , x , x , 1998)<br>
>> EXT(ARB_occlusion_query , ARB_occlusion_query , GLL, x , x , x , 2001)<br>
>> EXT(ARB_occlusion_query2 , ARB_occlusion_query2 , GLL, GLC, x , x , 2003)<br>
>> +EXT(ARB_parallel_shader_compile , dummy_true , GLL, GLC, x , x , 2015)<br>
>> EXT(ARB_pipeline_statistics_query , ARB_pipeline_statistics_query , GLL, GLC, x , x , 2014)<br>
>> EXT(ARB_pixel_buffer_object , EXT_pixel_buffer_object , GLL, GLC, x , x , 2004)<br>
>> EXT(ARB_point_parameters , EXT_point_parameters , GLL, x , x , x , 1997)<br>
>> EXT(ARB_point_sprite , ARB_point_sprite , GLL, GLC, x , x , 2003)<br>
>> EXT(ARB_polygon_offset_clamp , ARB_polygon_offset_clamp , GLL, GLC, x , x , 2017)<br>
>> EXT(ARB_post_depth_coverage , ARB_post_depth_coverage , GLL, GLC, x , x, 2015)<br>
>> EXT(ARB_program_interface_query , dummy_true , GLL, GLC, x , x , 2012)<br>
>> EXT(ARB_provoking_vertex , EXT_provoking_vertex , GLL, GLC, x , x , 2009)<br>
>> EXT(ARB_query_buffer_object , ARB_query_buffer_object , GLL, GLC, x , x , 2013)<br>
>> EXT(ARB_robust_buffer_access_behavior , ARB_robust_buffer_access_behavior , GLL, GLC, x , x , 2012)<br>
>> @@ -324,20 +325,21 @@ EXT(INGR_blend_func_separate , EXT_blend_func_separate<br>
>> EXT(INTEL_conservative_rasterization , INTEL_conservative_rasterization , x , GLC, x , 31, 2013)<br>
>> EXT(INTEL_fragment_shader_ordering , INTEL_fragment_shader_ordering , GLL, GLC, x , x , 2013)<br>
>> EXT(INTEL_performance_query , INTEL_performance_query , GLL, GLC, x , ES2, 2013)<br>
>> EXT(INTEL_shader_atomic_float_minmax , INTEL_shader_atomic_float_minmax , GLL, GLC, x , x , 2018)<br>
>> <br>
>> EXT(KHR_blend_equation_advanced , KHR_blend_equation_advanced , GLL, GLC, x , ES2, 2014)<br>
>> EXT(KHR_blend_equation_advanced_coherent , KHR_blend_equation_advanced_coherent , GLL, GLC, x , ES2, 2014)<br>
>> EXT(KHR_context_flush_control , dummy_true , GLL, GLC, x , ES2, 2014)<br>
>> EXT(KHR_debug , dummy_true , GLL, GLC, 11, ES2, 2012)<br>
>> EXT(KHR_no_error , dummy_true , GLL, GLC, ES1, ES2, 2015)<br>
>> +EXT(KHR_parallel_shader_compile , dummy_true , GLL, GLC, x , ES2, 2017)<br>
>> EXT(KHR_robust_buffer_access_behavior , ARB_robust_buffer_access_behavior , GLL, GLC, x , ES2, 2014)<br>
>> EXT(KHR_robustness , KHR_robustness , GLL, GLC, x , ES2, 2012)<br>
>> EXT(KHR_texture_compression_astc_hdr , KHR_texture_compression_astc_hdr , GLL, GLC, x , ES2, 2012)<br>
>> EXT(KHR_texture_compression_astc_ldr , KHR_texture_compression_astc_ldr , GLL, GLC, x , ES2, 2012)<br>
>> EXT(KHR_texture_compression_astc_sliced_3d , KHR_texture_compression_astc_sliced_3d , GLL, GLC, x , ES2, 2015)<br>
>> <br>
>> EXT(MESA_framebuffer_flip_y , MESA_framebuffer_flip_y , x, x, x , 31, 2018)<br>
>> EXT(MESA_pack_invert , MESA_pack_invert , GLL, GLC, x , x , 2002)<br>
>> EXT(MESA_shader_integer_functions , MESA_shader_integer_functions , GLL, GLC, x , 30, 2016)<br>
>> EXT(MESA_texture_signed_rgba , EXT_texture_snorm , GLL, GLC, x , x , 2009)<br>
>> diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py<br>
>> index 0b8ec9ea0bb..579c6e459aa 100644<br>
>> --- a/src/mesa/main/get_hash_params.py<br>
>> +++ b/src/mesa/main/get_hash_params.py<br>
>> @@ -273,20 +273,23 @@ descriptor=[<br>
>> [ "PACK_SKIP_ROWS", "CONTEXT_INT(Pack.SkipRows), NO_EXTRA" ],<br>
>> [ "UNPACK_ROW_LENGTH", "CONTEXT_INT(Unpack.RowLength), NO_EXTRA" ],<br>
>> [ "UNPACK_SKIP_PIXELS", "CONTEXT_INT(Unpack.SkipPixels), NO_EXTRA" ],<br>
>> [ "UNPACK_SKIP_ROWS", "CONTEXT_INT(Unpack.SkipRows), NO_EXTRA" ],<br>
>> [ "UNPACK_SKIP_IMAGES", "CONTEXT_INT(Unpack.SkipImages), NO_EXTRA" ],<br>
>> [ "UNPACK_IMAGE_HEIGHT", "CONTEXT_INT(Unpack.ImageHeight), NO_EXTRA" ],<br>
>> <br>
>> # GL_ARB_draw_buffers<br>
>> [ "MAX_DRAW_BUFFERS_ARB", "CONTEXT_INT(Const.MaxDrawBuffers), NO_EXTRA" ],<br>
>> <br>
>> +# GL_ARB_parallel_shader_compile<br>
>> + [ "MAX_SHADER_COMPILER_THREADS_ARB", "CONTEXT_INT(Hint.MaxShaderCompilerThreads), NO_EXTRA" ],<br>
>> +<br>
>> # GL_EXT_framebuffer_object / GL_NV_fbo_color_attachments<br>
>> [ "MAX_COLOR_ATTACHMENTS", "CONTEXT_INT(Const.MaxColorAttachments), NO_EXTRA" ],<br>
>> <br>
>> # GL_ARB_draw_buffers / GL_NV_draw_buffers (for ES 2.0)<br>
>> [ "DRAW_BUFFER0_ARB", "BUFFER_ENUM16(ColorDrawBuffer[0]), NO_EXTRA" ],<br>
>> [ "DRAW_BUFFER1_ARB", "BUFFER_ENUM16(ColorDrawBuffer[1]), extra_valid_draw_buffer" ],<br>
>> [ "DRAW_BUFFER2_ARB", "BUFFER_ENUM16(ColorDrawBuffer[2]), extra_valid_draw_buffer" ],<br>
>> [ "DRAW_BUFFER3_ARB", "BUFFER_ENUM16(ColorDrawBuffer[3]), extra_valid_draw_buffer" ],<br>
>> [ "DRAW_BUFFER4_ARB", "BUFFER_ENUM16(ColorDrawBuffer[4]), extra_valid_draw_buffer" ],<br>
>> [ "DRAW_BUFFER5_ARB", "BUFFER_ENUM16(ColorDrawBuffer[5]), extra_valid_draw_buffer" ],<br>
>> diff --git a/src/mesa/main/hint.c b/src/mesa/main/hint.c<br>
>> index 5d0c15d35ab..2bcaeebc4aa 100644<br>
>> --- a/src/mesa/main/hint.c<br>
>> +++ b/src/mesa/main/hint.c<br>
>> @@ -123,27 +123,39 @@ _mesa_Hint( GLenum target, GLenum mode )<br>
>> default:<br>
>> goto invalid_target;<br>
>> }<br>
>> return;<br>
>> <br>
>> invalid_target:<br>
>> _mesa_error(ctx, GL_INVALID_ENUM, "glHint(target)");<br>
>> return;<br>
>> }<br>
>> <br>
>> +/* GL_ARB_parallel_shader_compile */<br>
>> +void GLAPIENTRY<br>
>> +_mesa_MaxShaderCompilerThreadsKHR(GLuint count)<br>
>> +{<br>
>> + GET_CURRENT_CONTEXT(ctx);<br>
>> +<br>
>> + ctx->Hint.MaxShaderCompilerThreads = count;<br>
>> +<br>
>> + if (ctx->Driver.SetMaxShaderCompilerThreads)<br>
>> + ctx->Driver.SetMaxShaderCompilerThreads(ctx, count);<br>
>> +}<br>
>> <br>
>> /**********************************************************************/<br>
>> /***** Initialization *****/<br>
>> /**********************************************************************/<br>
>> <br>
>> void _mesa_init_hint( struct gl_context * ctx )<br>
>> {<br>
>> /* Hint group */<br>
>> ctx->Hint.PerspectiveCorrection = GL_DONT_CARE;<br>
>> ctx->Hint.PointSmooth = GL_DONT_CARE;<br>
>> ctx->Hint.LineSmooth = GL_DONT_CARE;<br>
>> ctx->Hint.PolygonSmooth = GL_DONT_CARE;<br>
>> ctx->Hint.Fog = GL_DONT_CARE;<br>
>> ctx->Hint.TextureCompression = GL_DONT_CARE;<br>
>> ctx->Hint.GenerateMipmap = GL_DONT_CARE;<br>
>> ctx->Hint.FragmentShaderDerivative = GL_DONT_CARE;<br>
>> + ctx->Hint.MaxShaderCompilerThreads = 0xffffffff;<br>
>> }<br>
>> diff --git a/src/mesa/main/hint.h b/src/mesa/main/hint.h<br>
>> index 87febfeecc0..2d7c710af26 100644<br>
>> --- a/src/mesa/main/hint.h<br>
>> +++ b/src/mesa/main/hint.h<br>
>> @@ -36,14 +36,18 @@<br>
>> #ifndef HINT_H<br>
>> #define HINT_H<br>
>> <br>
>> #include "glheader.h"<br>
>> <br>
>> struct gl_context;<br>
>> <br>
>> extern void GLAPIENTRY<br>
>> _mesa_Hint( GLenum target, GLenum mode );<br>
>> <br>
>> +/* GL_KHR_parallel_shader_compile */<br>
>> +extern void GLAPIENTRY<br>
>> +_mesa_MaxShaderCompilerThreadsKHR(GLuint count);<br>
>> +<br>
>> extern void <br>
>> _mesa_init_hint( struct gl_context * ctx );<br>
>> <br>
>> #endif<br>
>> diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h<br>
>> index 157d45bc0ba..5b2b29d1f5d 100644<br>
>> --- a/src/mesa/main/mtypes.h<br>
>> +++ b/src/mesa/main/mtypes.h<br>
>> @@ -596,20 +596,21 @@ struct gl_fog_attrib<br>
>> struct gl_hint_attrib<br>
>> {<br>
>> GLenum16 PerspectiveCorrection;<br>
>> GLenum16 PointSmooth;<br>
>> GLenum16 LineSmooth;<br>
>> GLenum16 PolygonSmooth;<br>
>> GLenum16 Fog;<br>
>> GLenum16 TextureCompression; /**< GL_ARB_texture_compression */<br>
>> GLenum16 GenerateMipmap; /**< GL_SGIS_generate_mipmap */<br>
>> GLenum16 FragmentShaderDerivative; /**< GL_ARB_fragment_shader */<br>
>> + GLuint MaxShaderCompilerThreads; /**< GL_ARB_parallel_shader_compile */<br>
>> };<br>
>> <br>
>> <br>
>> /**<br>
>> * Lighting attribute group (GL_LIGHT_BIT).<br>
>> */<br>
>> struct gl_light_attrib<br>
>> {<br>
>> struct gl_light Light[MAX_LIGHTS]; /**< Array of light sources */<br>
>> struct gl_lightmodel Model; /**< Lighting model */<br>
>> diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c<br>
>> index 2ea8d965aba..01342c04e8f 100644<br>
>> --- a/src/mesa/main/shaderapi.c<br>
>> +++ b/src/mesa/main/shaderapi.c<br>
>> @@ -682,20 +682,26 @@ get_programiv(struct gl_context *ctx, GLuint program, GLenum pname,<br>
>> || _mesa_is_gles3(ctx);<br>
>> <br>
>> if (!shProg) {<br>
>> return;<br>
>> }<br>
>> <br>
>> switch (pname) {<br>
>> case GL_DELETE_STATUS:<br>
>> *params = shProg->DeletePending;<br>
>> return;<br>
>> + case GL_COMPLETION_STATUS_ARB:<br>
>> + if (ctx->Driver.GetShaderProgramCompletionStatus)<br>
>> + *params = ctx->Driver.GetShaderProgramCompletionStatus(ctx, shProg);<br>
>> + else<br>
>> + *params = GL_TRUE;<br>
>> + return;<br>
>> case GL_LINK_STATUS:<br>
>> *params = shProg->data->LinkStatus ? GL_TRUE : GL_FALSE;<br>
>> return;<br>
>> case GL_VALIDATE_STATUS:<br>
>> *params = shProg->data->Validated;<br>
>> return;<br>
>> case GL_INFO_LOG_LENGTH:<br>
>> *params = (shProg->data->InfoLog && shProg->data->InfoLog[0] != '\0') ?<br>
>> strlen(shProg->data->InfoLog) + 1 : 0;<br>
>> return;<br>
>> @@ -953,20 +959,24 @@ get_shaderiv(struct gl_context *ctx, GLuint name, GLenum pname, GLint *params)<br>
>> return;<br>
>> }<br>
>> <br>
>> switch (pname) {<br>
>> case GL_SHADER_TYPE:<br>
>> *params = shader->Type;<br>
>> break;<br>
>> case GL_DELETE_STATUS:<br>
>> *params = shader->DeletePending;<br>
>> break;<br>
>> + case GL_COMPLETION_STATUS_ARB:<br>
>> + /* _mesa_glsl_compile_shader is not offloaded to other threads. */<br>
>> + *params = GL_TRUE;<br>
>> + return;<br>
> <br>
> So... glComplieShader is completely serial, but glLinkShader can operate<br>
> in parallel? That differs quite a bit from what Chia-I was doing... and<br>
> explains why a lot the threading fixes he had is absent here. Most of<br>
> the expensive work happens in glLinkShader, so this seems reasonable.<br>
> Have you been able to measure this on the start-up time of any real apps?<br>
> <br>
>> case GL_COMPILE_STATUS:<br>
>> *params = shader->CompileStatus ? GL_TRUE : GL_FALSE;<br>
>> break;<br>
>> case GL_INFO_LOG_LENGTH:<br>
>> *params = (shader->InfoLog && shader->InfoLog[0] != '\0') ?<br>
>> strlen(shader->InfoLog) + 1 : 0;<br>
>> break;<br>
>> case GL_SHADER_SOURCE_LENGTH:<br>
>> *params = shader->Source ? strlen((char *) shader->Source) + 1 : 0;<br>
>> break;<br>
>> diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp<br>
>> index fb2acfbdeea..6aa6b87882e 100644<br>
>> --- a/src/mesa/main/tests/dispatch_sanity.cpp<br>
>> +++ b/src/mesa/main/tests/dispatch_sanity.cpp<br>
>> @@ -1191,20 +1191,22 @@ const struct function common_desktop_functions_possible[] = {<br>
>> { "glEvaluateDepthValuesARB", 30, -1 },<br>
>> <br>
>> /* GL_ARB_indirect_parameters */<br>
>> { "glMultiDrawArraysIndirectCountARB", 11, -1 },<br>
>> { "glMultiDrawElementsIndirectCountARB", 11, -1 },<br>
>> <br>
>> /* GL_AMD_framebuffer_multisample_advanced */<br>
>> { "glRenderbufferStorageMultisampleAdvancedAMD", 11, -1 },<br>
>> { "glNamedRenderbufferStorageMultisampleAdvancedAMD", 11, -1 },<br>
>> <br>
>> + { "glMaxShaderCompilerThreadsKHR", 11, -1 },<br>
>> +<br>
>> { NULL, 0, -1 }<br>
>> };<br>
>> <br>
>> const struct function gl_compatibility_functions_possible[] = {<br>
>> { "glNewList", 10, _gloffset_NewList },<br>
>> { "glEndList", 10, _gloffset_EndList },<br>
>> { "glCallList", 10, _gloffset_CallList },<br>
>> { "glCallLists", 10, _gloffset_CallLists },<br>
>> { "glDeleteLists", 10, _gloffset_DeleteLists },<br>
>> { "glGenLists", 10, _gloffset_GenLists },<br>
>> @@ -2229,20 +2231,22 @@ const struct function gles2_functions_possible[] = {<br>
>> <br>
>> /* GL_NV_conservative_raster */<br>
>> { "glSubpixelPrecisionBiasNV", 20, -1 },<br>
>> <br>
>> /* GL_NV_conservative_raster_dilate */<br>
>> { "glConservativeRasterParameterfNV", 20, -1 },<br>
>> <br>
>> /* GL_NV_conservative_raster_pre_snap_triangles */<br>
>> { "glConservativeRasterParameteriNV", 20, -1 },<br>
>> <br>
>> + { "glMaxShaderCompilerThreadsKHR", 20, -1 },<br>
>> +<br>
>> { NULL, 0, -1 }<br>
>> };<br>
>> <br>
>> const struct function gles3_functions_possible[] = {<br>
>> // We check for the aliased -EXT version in GLES 2<br>
>> // { "glBeginQuery", 30, -1 },<br>
>> { "glBeginTransformFeedback", 30, -1 },<br>
>> { "glBindBufferBase", 30, -1 },<br>
>> { "glBindBufferRange", 30, -1 },<br>
>> { "glBindSampler", 30, -1 },<br>
>><br>
> <br>
> _______________________________________________<br>
> mesa-dev mailing list<br>
> <a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
> <br>
<br>
</blockquote></div>