X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fmain%2Fhint.c;h=2bcaeebc4aa90d99201d6d2e83f083de39355aac;hb=5db28b0cf748cdcd50408cb8391cdf5df03cfd92;hp=8d90930a4af254598359c84d82fe8cb50ab65af2;hpb=dd404bc94f78a1766527becee03f8ef6ae3a799b;p=mesa.git diff --git a/src/mesa/main/hint.c b/src/mesa/main/hint.c index 8d90930a4af..2bcaeebc4aa 100644 --- a/src/mesa/main/hint.c +++ b/src/mesa/main/hint.c @@ -1,7 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 4.1 * * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. * @@ -18,9 +17,10 @@ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. */ @@ -40,8 +40,8 @@ _mesa_Hint( GLenum target, GLenum mode ) if (MESA_VERBOSE & VERBOSE_API) _mesa_debug(ctx, "glHint %s %s\n", - _mesa_lookup_enum_by_nr(target), - _mesa_lookup_enum_by_nr(mode)); + _mesa_enum_to_string(target), + _mesa_enum_to_string(mode)); if (mode != GL_NICEST && mode != GL_FASTEST && mode != GL_DONT_CARE) { _mesa_error(ctx, GL_INVALID_ENUM, "glHint(mode)"); @@ -90,16 +90,6 @@ _mesa_Hint( GLenum target, GLenum mode ) ctx->Hint.PolygonSmooth = mode; break; - /* GL_EXT_clip_volume_hint */ - case GL_CLIP_VOLUME_CLIPPING_HINT_EXT: - if (ctx->API != API_OPENGL_COMPAT) - goto invalid_target; - if (ctx->Hint.ClipVolumeClipping == mode) - return; - FLUSH_VERTICES(ctx, _NEW_HINT); - ctx->Hint.ClipVolumeClipping = mode; - break; - /* GL_ARB_texture_compression */ case GL_TEXTURE_COMPRESSION_HINT_ARB: if (!_mesa_is_desktop_gl(ctx)) @@ -133,11 +123,6 @@ _mesa_Hint( GLenum target, GLenum mode ) default: goto invalid_target; } - - if (ctx->Driver.Hint) { - (*ctx->Driver.Hint)( ctx, target, mode ); - } - return; invalid_target: @@ -145,6 +130,17 @@ invalid_target: return; } +/* GL_ARB_parallel_shader_compile */ +void GLAPIENTRY +_mesa_MaxShaderCompilerThreadsKHR(GLuint count) +{ + GET_CURRENT_CONTEXT(ctx); + + ctx->Hint.MaxShaderCompilerThreads = count; + + if (ctx->Driver.SetMaxShaderCompilerThreads) + ctx->Driver.SetMaxShaderCompilerThreads(ctx, count); +} /**********************************************************************/ /***** Initialization *****/ @@ -158,8 +154,8 @@ void _mesa_init_hint( struct gl_context * ctx ) ctx->Hint.LineSmooth = GL_DONT_CARE; ctx->Hint.PolygonSmooth = GL_DONT_CARE; ctx->Hint.Fog = GL_DONT_CARE; - ctx->Hint.ClipVolumeClipping = GL_DONT_CARE; ctx->Hint.TextureCompression = GL_DONT_CARE; ctx->Hint.GenerateMipmap = GL_DONT_CARE; ctx->Hint.FragmentShaderDerivative = GL_DONT_CARE; + ctx->Hint.MaxShaderCompilerThreads = 0xffffffff; }