[Mesa-stable] [Mesa-dev] [PATCH] util: move string_to_uint_map to glsl

Mike Lothian mike at fireburn.co.uk
Tue Aug 29 10:41:04 UTC 2017


Feel free to add my tested by for this

Thanks for the fix

On Sat, 26 Aug 2017 at 17:35 Jason Ekstrand <jason at jlekstrand.net> wrote:

> Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
>
> On Fri, Aug 25, 2017 at 7:10 PM, Jason Ekstrand <jason at jlekstrand.net>
> wrote:
>
>> Ack.  Not a review though.
>>
>>
>>
>> On August 25, 2017 6:38:46 PM Emil Velikov <emil.l.velikov at gmail.com>
>> wrote:
>>
>> From: Emil Velikov <emil.velikov at collabora.com>
>>>
>>> The functionality is used by glsl and mesa. With the latter already
>>> depending on the former.
>>>
>>> With this in place the src/util/ static library libmesautil.la no longer
>>> has a C++ dependency. Thus objects which use it (like libEGL) don't need
>>> the C++ link.
>>>
>>> Cc: Jason Ekstrand <jason at jlekstrand.net>
>>> Suggested-by: Jason Ekstrand <jason at jlekstrand.net>
>>> Cc: "17.2" <mesa-stable at lists.freedesktop.org>
>>> Fixes: 02cc35937277 ("egl/wayland: Use linux-dmabuf interface for
>>> buffers")
>>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101851
>>> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
>>> ---
>>>  src/compiler/Makefile.sources                             | 4 +++-
>>>  src/compiler/glsl/link_uniform_initializers.cpp           | 2 +-
>>>  src/compiler/glsl/link_uniforms.cpp                       | 2 +-
>>>  src/compiler/glsl/linker.cpp                              | 2 +-
>>>  src/compiler/glsl/shader_cache.cpp                        | 2 +-
>>>  src/compiler/glsl/standalone.cpp                          | 2 +-
>>>  src/{util => compiler/glsl}/string_to_uint_map.cpp        | 0
>>>  src/{util => compiler/glsl}/string_to_uint_map.h          | 0
>>>  src/compiler/glsl/tests/set_uniform_initializer_tests.cpp | 2 +-
>>>  src/mesa/main/shader_query.cpp                            | 2 +-
>>>  src/mesa/main/shaderobj.c                                 | 2 +-
>>>  src/mesa/program/ir_to_mesa.cpp                           | 2 +-
>>>  src/mesa/state_tracker/st_glsl_to_nir.cpp                 | 2 +-
>>>  src/util/Makefile.sources                                 | 2 --
>>>  14 files changed, 13 insertions(+), 13 deletions(-)
>>>  rename src/{util => compiler/glsl}/string_to_uint_map.cpp (100%)
>>>  rename src/{util => compiler/glsl}/string_to_uint_map.h (100%)
>>>
>>> diff --git a/src/compiler/Makefile.sources
>>> b/src/compiler/Makefile.sources
>>> index 6e08dfb8448..a8309a1c592 100644
>>> --- a/src/compiler/Makefile.sources
>>> +++ b/src/compiler/Makefile.sources
>>> @@ -140,7 +140,9 @@ LIBGLSL_FILES = \
>>>         glsl/program.h \
>>>         glsl/propagate_invariance.cpp \
>>>         glsl/s_expression.cpp \
>>> -       glsl/s_expression.h
>>> +       glsl/s_expression.h \
>>> +       glsl/string_to_uint_map.cpp \
>>> +       glsl/string_to_uint_map.h
>>>
>>>  LIBGLSL_SHADER_CACHE_FILES = \
>>>         glsl/shader_cache.cpp \
>>> diff --git a/src/compiler/glsl/link_uniform_initializers.cpp
>>> b/src/compiler/glsl/link_uniform_initializers.cpp
>>> index e7f9c9d8ac0..84a38793f64 100644
>>> --- a/src/compiler/glsl/link_uniform_initializers.cpp
>>> +++ b/src/compiler/glsl/link_uniform_initializers.cpp
>>> @@ -25,7 +25,7 @@
>>>  #include "ir.h"
>>>  #include "linker.h"
>>>  #include "ir_uniform.h"
>>> -#include "util/string_to_uint_map.h"
>>> +#include "string_to_uint_map.h"
>>>
>>>  /* These functions are put in a "private" namespace instead of being
>>> marked
>>>   * static so that the unit tests can access them.  See
>>> diff --git a/src/compiler/glsl/link_uniforms.cpp
>>> b/src/compiler/glsl/link_uniforms.cpp
>>> index 1b87c5860b6..99b171d7881 100644
>>> --- a/src/compiler/glsl/link_uniforms.cpp
>>> +++ b/src/compiler/glsl/link_uniforms.cpp
>>> @@ -27,7 +27,7 @@
>>>  #include "ir_uniform.h"
>>>  #include "glsl_symbol_table.h"
>>>  #include "program.h"
>>> -#include "util/string_to_uint_map.h"
>>> +#include "string_to_uint_map.h"
>>>  #include "ir_array_refcount.h"
>>>
>>>  /**
>>> diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
>>> index b4784c51199..90c1084c50f 100644
>>> --- a/src/compiler/glsl/linker.cpp
>>> +++ b/src/compiler/glsl/linker.cpp
>>> @@ -75,7 +75,7 @@
>>>  #include "program/program.h"
>>>  #include "util/mesa-sha1.h"
>>>  #include "util/set.h"
>>> -#include "util/string_to_uint_map.h"
>>> +#include "string_to_uint_map.h"
>>>  #include "linker.h"
>>>  #include "link_varyings.h"
>>>  #include "ir_optimization.h"
>>> diff --git a/src/compiler/glsl/shader_cache.cpp
>>> b/src/compiler/glsl/shader_cache.cpp
>>> index cc4d24482d9..887b8954c51 100644
>>> --- a/src/compiler/glsl/shader_cache.cpp
>>> +++ b/src/compiler/glsl/shader_cache.cpp
>>> @@ -59,7 +59,7 @@
>>>  #include "program.h"
>>>  #include "shader_cache.h"
>>>  #include "util/mesa-sha1.h"
>>> -#include "util/string_to_uint_map.h"
>>> +#include "string_to_uint_map.h"
>>>
>>>  extern "C" {
>>>  #include "main/enums.h"
>>> diff --git a/src/compiler/glsl/standalone.cpp
>>> b/src/compiler/glsl/standalone.cpp
>>> index 52554bb92a2..7a84ca72212 100644
>>> --- a/src/compiler/glsl/standalone.cpp
>>> +++ b/src/compiler/glsl/standalone.cpp
>>> @@ -36,7 +36,7 @@
>>>  #include "loop_analysis.h"
>>>  #include "standalone_scaffolding.h"
>>>  #include "standalone.h"
>>> -#include "util/string_to_uint_map.h"
>>> +#include "string_to_uint_map.h"
>>>  #include "util/set.h"
>>>  #include "linker.h"
>>>  #include "glsl_parser_extras.h"
>>> diff --git a/src/util/string_to_uint_map.cpp
>>> b/src/compiler/glsl/string_to_uint_map.cpp
>>> similarity index 100%
>>> rename from src/util/string_to_uint_map.cpp
>>> rename to src/compiler/glsl/string_to_uint_map.cpp
>>> diff --git a/src/util/string_to_uint_map.h
>>> b/src/compiler/glsl/string_to_uint_map.h
>>> similarity index 100%
>>> rename from src/util/string_to_uint_map.h
>>> rename to src/compiler/glsl/string_to_uint_map.h
>>> diff --git a/src/compiler/glsl/tests/set_uniform_initializer_tests.cpp
>>> b/src/compiler/glsl/tests/set_uniform_initializer_tests.cpp
>>> index d30abc320b3..94a6d270ec4 100644
>>> --- a/src/compiler/glsl/tests/set_uniform_initializer_tests.cpp
>>> +++ b/src/compiler/glsl/tests/set_uniform_initializer_tests.cpp
>>> @@ -25,7 +25,7 @@
>>>  #include "main/mtypes.h"
>>>  #include "main/macros.h"
>>>  #include "util/ralloc.h"
>>> -#include "util/string_to_uint_map.h"
>>> +#include "string_to_uint_map.h"
>>>  #include "uniform_initializer_utils.h"
>>>
>>>  namespace linker {
>>> diff --git a/src/mesa/main/shader_query.cpp
>>> b/src/mesa/main/shader_query.cpp
>>> index f2bdcaab121..64e68b4a26d 100644
>>> --- a/src/mesa/main/shader_query.cpp
>>> +++ b/src/mesa/main/shader_query.cpp
>>> @@ -37,7 +37,7 @@
>>>  #include "compiler/glsl/glsl_symbol_table.h"
>>>  #include "compiler/glsl/ir.h"
>>>  #include "compiler/glsl/program.h"
>>> -#include "util/string_to_uint_map.h"
>>> +#include "compiler/glsl/string_to_uint_map.h"
>>>
>>>
>>>  static GLint
>>> diff --git a/src/mesa/main/shaderobj.c b/src/mesa/main/shaderobj.c
>>> index 8a5fa5e2dfc..b9d1079a35a 100644
>>> --- a/src/mesa/main/shaderobj.c
>>> +++ b/src/mesa/main/shaderobj.c
>>> @@ -30,6 +30,7 @@
>>>   */
>>>
>>>
>>> +#include "compiler/glsl/string_to_uint_map.h"
>>>  #include "main/glheader.h"
>>>  #include "main/context.h"
>>>  #include "main/hash.h"
>>> @@ -40,7 +41,6 @@
>>>  #include "program/program.h"
>>>  #include "program/prog_parameter.h"
>>>  #include "util/ralloc.h"
>>> -#include "util/string_to_uint_map.h"
>>>  #include "util/u_atomic.h"
>>>
>>>  /**********************************************************************/
>>> diff --git a/src/mesa/program/ir_to_mesa.cpp
>>> b/src/mesa/program/ir_to_mesa.cpp
>>> index 775211cefb5..eb87fc5e04b 100644
>>> --- a/src/mesa/program/ir_to_mesa.cpp
>>> +++ b/src/mesa/program/ir_to_mesa.cpp
>>> @@ -47,12 +47,12 @@
>>>  #include "compiler/glsl/linker.h"
>>>  #include "compiler/glsl/program.h"
>>>  #include "compiler/glsl/shader_cache.h"
>>> +#include "compiler/glsl/string_to_uint_map.h"
>>>  #include "program/prog_instruction.h"
>>>  #include "program/prog_optimize.h"
>>>  #include "program/prog_print.h"
>>>  #include "program/program.h"
>>>  #include "program/prog_parameter.h"
>>> -#include "util/string_to_uint_map.h"
>>>
>>>
>>>  static int swizzle_for_size(int size);
>>> diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp
>>> b/src/mesa/state_tracker/st_glsl_to_nir.cpp
>>> index 89f78884389..6b6e3dbd08c 100644
>>> --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp
>>> +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp
>>> @@ -35,7 +35,6 @@
>>>  #include "main/errors.h"
>>>  #include "main/shaderapi.h"
>>>  #include "main/uniforms.h"
>>> -#include "util/string_to_uint_map.h"
>>>
>>>  #include "st_context.h"
>>>  #include "st_program.h"
>>> @@ -45,6 +44,7 @@
>>>  #include "compiler/glsl_types.h"
>>>  #include "compiler/glsl/glsl_to_nir.h"
>>>  #include "compiler/glsl/ir.h"
>>> +#include "compiler/glsl/string_to_uint_map.h"
>>>
>>>
>>>  /* Depending on PIPE_CAP_TGSI_TEXCOORD (st->needs_texcoord_semantic) we
>>> diff --git a/src/util/Makefile.sources b/src/util/Makefile.sources
>>> index 8ea5f29533b..8a8c3b359f3 100644
>>> --- a/src/util/Makefile.sources
>>> +++ b/src/util/Makefile.sources
>>> @@ -37,8 +37,6 @@ MESA_UTIL_FILES := \
>>>         simple_list.h \
>>>         slab.c \
>>>         slab.h \
>>> -       string_to_uint_map.cpp \
>>> -       string_to_uint_map.h \
>>>         strndup.h \
>>>         strtod.c \
>>>         strtod.h \
>>> --
>>> 2.13.3
>>>
>>>
>>
>>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-stable/attachments/20170829/6946bba2/attachment.html>


More information about the mesa-stable mailing list