[Mesa-dev] [PATCH] meson: Add dep_thread dependency.

2019-06-24 Thread Vinson Lee
Fix this build error on Ubuntu 18.04.

/usr/bin/ld: src/util/libmesa_util.a(u_cpu_detect.c.o): undefined reference to 
symbol 'pthread_once@@GLIBC_2.2.5'

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110663
Suggested-by: Eric Engestrom 
Signed-off-by: Vinson Lee 
---
 src/gallium/tests/trivial/meson.build | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/tests/trivial/meson.build 
b/src/gallium/tests/trivial/meson.build
index bbb25519e12..1f912d5aa46 100644
--- a/src/gallium/tests/trivial/meson.build
+++ b/src/gallium/tests/trivial/meson.build
@@ -24,6 +24,7 @@ foreach t : ['compute', 'tri', 'quad-tex']
 '@0@.c'.format(t),
 include_directories : inc_common,
 link_with : [libmesa_util, libgallium, libpipe_loader_dynamic],
+dependencies : dep_thread,
 install : false,
   )
 endforeach
-- 
2.17.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH] meson: Add dep_thread dependency.

2019-06-13 Thread Vinson Lee
Fix this build error on Ubuntu 18.04.

/usr/bin/ld: src/util/libmesa_util.a(u_cpu_detect.c.o): undefined reference to 
symbol 'pthread_once@@GLIBC_2.2.5'

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110663
Suggested-by: Eric Engestrom 
Signed-off-by: Vinson Lee 
---
 src/gallium/tests/trivial/meson.build | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/tests/trivial/meson.build 
b/src/gallium/tests/trivial/meson.build
index bbb25519e12..1f912d5aa46 100644
--- a/src/gallium/tests/trivial/meson.build
+++ b/src/gallium/tests/trivial/meson.build
@@ -24,6 +24,7 @@ foreach t : ['compute', 'tri', 'quad-tex']
 '@0@.c'.format(t),
 include_directories : inc_common,
 link_with : [libmesa_util, libgallium, libpipe_loader_dynamic],
+dependencies : dep_thread,
 install : false,
   )
 endforeach
-- 
2.17.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH] freedreno: Fix GCC build error.

2019-05-30 Thread Vinson Lee
../src/freedreno/vulkan/tu_device.c:900:4: error: initializer element is not 
constant
.minImageTransferGranularity = (VkExtent3D) { 1, 1, 1 },
^

Suggested-by: Kristian Høgsberg 
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110698
Signed-off-by: Vinson Lee 
---
 src/freedreno/vulkan/tu_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/freedreno/vulkan/tu_device.c b/src/freedreno/vulkan/tu_device.c
index 2e930d9841fe..fdb9e1e0a1e2 100644
--- a/src/freedreno/vulkan/tu_device.c
+++ b/src/freedreno/vulkan/tu_device.c
@@ -897,7 +897,7 @@ static const VkQueueFamilyProperties 
tu_queue_family_properties = {
   VK_QUEUE_GRAPHICS_BIT | VK_QUEUE_COMPUTE_BIT | VK_QUEUE_TRANSFER_BIT,
.queueCount = 1,
.timestampValidBits = 64,
-   .minImageTransferGranularity = (VkExtent3D) { 1, 1, 1 },
+   .minImageTransferGranularity = { 1, 1, 1 },
 };
 
 void
-- 
1.8.3.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH v2] intel/tools: Fix build with glibc < 2.27.

2019-05-10 Thread Vinson Lee
glibc < 2.27 defines OVERFLOW in /usr/include/math.h.

This patch fixes this build error.

In file included from ../include/c99_math.h:37:0,
 from ../src/util/u_math.h:44,
 from ../src/mesa/main/macros.h:35,
 from ../src/intel/compiler/brw_reg.h:47,
 from ../src/intel/tools/i965_asm.h:32,
 from ../src/intel/tools/i965_gram.y:29:
src/intel/tools/i965_gram.tab.c:562:5: error: expected identifier before 
numeric constant
 OVERFLOW = 412,
 ^

Fixes: 70308a5a8a80 ("intel/tools: New i965 instruction assembler tool")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110656
Signed-off-by: Vinson Lee 
Acked-by: Eric Engestrom 
---
 src/intel/tools/i965_asm.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/intel/tools/i965_asm.h b/src/intel/tools/i965_asm.h
index 7027f4e..dd29208 100644
--- a/src/intel/tools/i965_asm.h
+++ b/src/intel/tools/i965_asm.h
@@ -36,6 +36,9 @@
 #include "compiler/brw_eu.h"
 #include "dev/gen_device_info.h"
 
+/* glibc < 2.27 defines OVERFLOW in /usr/include/math.h. */
+#undef OVERFLOW
+
 void yyerror (char *);
 int yyparse(void);
 int yylex(void);
-- 
2.7.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH] intel/tools: Fix build with glibc < 2.27.

2019-05-10 Thread Vinson Lee
glibc < 2.27 defines OVERFLOW in /usr/include/math.h.

This patch fixes this build error.

In file included from ../include/c99_math.h:37:0,
 from ../src/util/u_math.h:44,
 from ../src/mesa/main/macros.h:35,
 from ../src/intel/compiler/brw_reg.h:47,
 from ../src/intel/tools/i965_asm.h:32,
 from ../src/intel/tools/i965_gram.y:29:
src/intel/tools/i965_gram.tab.c:562:5: error: expected identifier before 
numeric constant
 OVERFLOW = 412,
 ^

Fixes: 70308a5a8a80 ("intel/tools: New i965 instruction assembler tool")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110656
Signed-off-by: Vinson Lee 
---
 src/intel/tools/i965_asm.h | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/intel/tools/i965_asm.h b/src/intel/tools/i965_asm.h
index 7027f4e..0519ba5 100644
--- a/src/intel/tools/i965_asm.h
+++ b/src/intel/tools/i965_asm.h
@@ -36,6 +36,10 @@
 #include "compiler/brw_eu.h"
 #include "dev/gen_device_info.h"
 
+#ifdef OVERFLOW
+#undef OVERFLOW
+#endif
+
 void yyerror (char *);
 int yyparse(void);
 int yylex(void);
-- 
2.7.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH] s3tc-errors: Fix GCC unused-variable warning.

2019-04-22 Thread Vinson Lee
s3tc-errors.c: In function ‘test_format’:
s3tc-errors.c:175:9: warning: unused variable ‘format2’ [-Wunused-variable]
  GLenum format2;
 ^~~

Fixes: d433792407e7 ("s3tc-errors: port to gles31")
Signed-off-by: Vinson Lee 
---
 tests/texturing/s3tc-errors.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/texturing/s3tc-errors.c b/tests/texturing/s3tc-errors.c
index ccc0be9a785f..6b2658c9a1d1 100644
--- a/tests/texturing/s3tc-errors.c
+++ b/tests/texturing/s3tc-errors.c
@@ -171,8 +171,8 @@ test_format(int width, int height, GLfloat *image, GLenum 
requested_format)
 {
 #ifdef PIGLIT_USE_OPENGL
GLubyte *compressed_image;
-#endif
GLenum format2;
+#endif
int x, y, w, h;
GLuint tex;
bool pass = true;
-- 
2.19.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] Partially revert "gallium: fix autotools build of pipe_msm.la"

2019-04-09 Thread Vinson Lee
On Tue, Apr 9, 2019 at 1:29 PM Jan Vesely  wrote:
>
> On Sat, Apr 6, 2019 at 10:11 PM Dieter Nützel  wrote:
> >
> > Tested-by: Dieter Nützel 
> > Acked-by: Dieter Nützel 
>
> Thanks Dieter,
>
> Timur, Vinson, are you OK with this temporary solution?
>
> Jan
>

Tested-by: Vinson Lee 

> >
> > Thank you Jan!
> >
> > BTW More about 'meson' with radeonsi and Clover in some hours.
> >
> > Dieter
> >
> > Am 06.04.2019 06:43, schrieb Jan Vesely:
> > > This partially reverts commit 356ec7a21960d77db282f67af577dcdb46966b5a.
> > > There are missing symbols needed by libglsl, so we might as well skip
> > > the entire library (which should be present in the mesa stat tracker).
> > >
> > > Signed-off-by: Jan Vesely 
> > > ---
> > >
> > > Hi Timur, Vinson,
> > >
> > > this patch is enough to get clover working again in autotools build,
> > > until a proper solution lands (which should reinstate -Wl,-no-undefined
> > > for pipe drivers).
> > > Vinson, I tested freedreno and it builds, but I don't have hw to test
> > > anything more, let me know if things still work or you with this patch.
> > >
> > > regards,
> > > Jan
> > >
> > >  src/gallium/targets/pipe-loader/Makefile.am | 3 ++-
> > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/src/gallium/targets/pipe-loader/Makefile.am
> > > b/src/gallium/targets/pipe-loader/Makefile.am
> > > index 807a100a7d0..864ee8d50d3 100644
> > > --- a/src/gallium/targets/pipe-loader/Makefile.am
> > > +++ b/src/gallium/targets/pipe-loader/Makefile.am
> > > @@ -53,7 +53,8 @@ endif
> > >
> > >  PIPE_LIBS += \
> > >   $(top_builddir)/src/gallium/auxiliary/libgallium.la \
> > > - $(top_builddir)/src/compiler/glsl/libglsl.la \
> > > + $(top_builddir)/src/compiler/nir/libnir.la \
> > > + $(top_builddir)/src/util/libmesautil.la \
> > >   $(GALLIUM_COMMON_LIB_DEPS)
> > >
> > >  AM_LDFLAGS = \
> > ___
> > mesa-dev mailing list
> > mesa-dev@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH] nir: Fix anonymous union initialization with older GCC.

2019-03-21 Thread Vinson Lee
Fix this build error with GCC 4.4.7.

  CC nir/nir_opt_copy_prop_vars.lo
nir/nir_opt_copy_prop_vars.c: In function ‘load_element_from_ssa_entry_value’:
nir/nir_opt_copy_prop_vars.c:454: error: unknown field ‘ssa’ specified in 
initializer
nir/nir_opt_copy_prop_vars.c:455: error: unknown field ‘def’ specified in 
initializer
nir/nir_opt_copy_prop_vars.c:456: error: unknown field ‘component’ specified in 
initializer
nir/nir_opt_copy_prop_vars.c:456: error: extra brace group at end of initializer
nir/nir_opt_copy_prop_vars.c:456: error: (near initialization for 
‘(anonymous).’)
nir/nir_opt_copy_prop_vars.c:456: warning: excess elements in union initializer
nir/nir_opt_copy_prop_vars.c:456: warning: (near initialization for 
‘(anonymous).’)

Fixes: 96c32d77763c ("nir/copy_prop_vars: handle load/store of vector elements")
Signed-off-by: Vinson Lee 
---
 src/compiler/nir/nir_opt_copy_prop_vars.c |   10 ++
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/compiler/nir/nir_opt_copy_prop_vars.c 
b/src/compiler/nir/nir_opt_copy_prop_vars.c
index 19003cc..94bc8af 100644
--- a/src/compiler/nir/nir_opt_copy_prop_vars.c
+++ b/src/compiler/nir/nir_opt_copy_prop_vars.c
@@ -451,10 +451,12 @@ load_element_from_ssa_entry_value(struct 
copy_prop_var_state *state,
 
*value = (struct value) {
   .is_ssa = true,
-  .ssa = {
- .def = { def },
- .component = { 0 },
-  },
+  {
+   .ssa = {
+ .def = { def },
+ .component = { 0 },
+   },
+  }
};
 
return true;
-- 
1.7.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH] swr: Fix build with llvm-9.0.

2019-03-18 Thread Vinson Lee
Fix build error after llvm-9.0svn r352827 ("[opaque pointer types] Add a
FunctionCallee wrapper type, and use it.").

In file included from ./rasterizer/jitter/builder.h:158:0,
 from swr_shader.cpp:35:
./rasterizer/jitter/gen_builder_meta.hpp: In member function ‘llvm::Value* 
SwrJit::Builder::VGATHERPD(llvm::Value*, llvm::Value*, llvm::Value*, 
llvm::Value*, llvm::Value*, const llvm:
:Twine&)’:
./rasterizer/jitter/gen_builder_meta.hpp:51:117: error: no matching function 
for call to ‘cast(llvm::FunctionCallee)’
 Function* pFunc = 
cast(JM()->mpCurrentModule->getOrInsertFunction("meta.intrinsic.VGATHERPD",
 pFuncTy));

 ^

Suggested-by: Philip Meulengracht 
Signed-off-by: Vinson Lee 
---
 .../codegen/templates/gen_builder.hpp |  4 
 .../swr/rasterizer/jitter/builder_misc.cpp| 20 +++
 2 files changed, 24 insertions(+)

diff --git 
a/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_builder.hpp 
b/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_builder.hpp
index 5182bc4259f0..a59fb10902b9 100644
--- a/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_builder.hpp
+++ b/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_builder.hpp
@@ -50,7 +50,11 @@ ${func['decl']}
 %else:
 FunctionType* pFuncTy = FunctionType::get(${ func['returnType'] }, {}, 
false);
 %endif:
+#if LLVM_VERSION_MAJOR >= 9
+Function* pFunc = 
cast(JM()->mpCurrentModule->getOrInsertFunction("meta.intrinsic.${func['name']}",
 pFuncTy).getCallee());
+#else
 Function* pFunc = 
cast(JM()->mpCurrentModule->getOrInsertFunction("meta.intrinsic.${func['name']}",
 pFuncTy));
+#endif
 return CALL(pFunc, std::initializer_list{${argList}}, name);
 %elif isIntrin:
 %if len(func['types']) != 0:
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/builder_misc.cpp 
b/src/gallium/drivers/swr/rasterizer/jitter/builder_misc.cpp
index 24b733a28ae8..93a30b2cb452 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/builder_misc.cpp
+++ b/src/gallium/drivers/swr/rasterizer/jitter/builder_misc.cpp
@@ -445,7 +445,11 @@ namespace SwrJit
 args.push_back(PointerType::get(mInt8Ty, 0));
 FunctionType* callPrintTy = 
FunctionType::get(Type::getVoidTy(JM()->mContext), args, true);
 Function* callPrintFn =
+#if LLVM_VERSION_MAJOR >= 9
+
cast(JM()->mpCurrentModule->getOrInsertFunction("CallPrint", 
callPrintTy).getCallee());
+#else
 
cast(JM()->mpCurrentModule->getOrInsertFunction("CallPrint", 
callPrintTy));
+#endif
 
 // if we haven't yet added the symbol to the symbol table
 if ((sys::DynamicLibrary::SearchForAddressOfSymbol("CallPrint")) == 
nullptr)
@@ -614,7 +618,11 @@ namespace SwrJit
 {
 FunctionType* pFuncTy   = FunctionType::get(mFP32Ty, mInt16Ty);
 Function* pCvtPh2Ps = cast(
+#if LLVM_VERSION_MAJOR >= 9
+
JM()->mpCurrentModule->getOrInsertFunction("ConvertFloat16ToFloat32", 
pFuncTy).getCallee());
+#else
 
JM()->mpCurrentModule->getOrInsertFunction("ConvertFloat16ToFloat32", pFuncTy));
+#endif
 
 if 
(sys::DynamicLibrary::SearchForAddressOfSymbol("ConvertFloat16ToFloat32") == 
nullptr)
 {
@@ -650,7 +658,11 @@ namespace SwrJit
 // call scalar C function for now
 FunctionType* pFuncTy   = FunctionType::get(mInt16Ty, mFP32Ty);
 Function* pCvtPs2Ph = cast(
+#if LLVM_VERSION_MAJOR >= 9
+
JM()->mpCurrentModule->getOrInsertFunction("ConvertFloat32ToFloat16", 
pFuncTy).getCallee());
+#else
 
JM()->mpCurrentModule->getOrInsertFunction("ConvertFloat32ToFloat16", pFuncTy));
+#endif
 
 if 
(sys::DynamicLibrary::SearchForAddressOfSymbol("ConvertFloat32ToFloat16") == 
nullptr)
 {
@@ -928,7 +940,11 @@ namespace SwrJit
 
 FunctionType* pFuncTy = 
FunctionType::get(Type::getVoidTy(JM()->mContext), args, false);
 Function* pFunc   = cast(
+#if LLVM_VERSION_MAJOR >= 9
+
JM()->mpCurrentModule->getOrInsertFunction("BucketManager_StartBucket", 
pFuncTy).getCallee());
+#else
 
JM()->mpCurrentModule->getOrInsertFunction("BucketManager_StartBucket", 
pFuncTy));
+#endif
 if 
(sys::DynamicLibrary::SearchForAddressOfSymbol("BucketManager_StartBucket") ==
 nullptr)
 {
@@ -953,7 +969,11 @@ namespace SwrJit
 
 FunctionType* pFuncTy = 
FunctionType::get(Type::getVoidTy(JM()->mContext), args, false);
 Function* pFunc   = cast(
+#

[Mesa-dev] [PATCH] gallium/auxiliary/vl: Fix duplicate symbol build errors.

2019-02-18 Thread Vinson Lee
  CXXLDgallium_dri.la
duplicate symbol _compute_shader_video_buffer in:

../../../../src/gallium/auxiliary/.libs/libgalliumvl.a(libgalliumvl_la-vl_compositor.o)

../../../../src/gallium/auxiliary/.libs/libgalliumvl.a(libgalliumvl_la-vl_compositor_cs.o)
duplicate symbol _compute_shader_weave in:

../../../../src/gallium/auxiliary/.libs/libgalliumvl.a(libgalliumvl_la-vl_compositor.o)

../../../../src/gallium/auxiliary/.libs/libgalliumvl.a(libgalliumvl_la-vl_compositor_cs.o)
duplicate symbol _compute_shader_rgba in:

../../../../src/gallium/auxiliary/.libs/libgalliumvl.a(libgalliumvl_la-vl_compositor.o)

../../../../src/gallium/auxiliary/.libs/libgalliumvl.a(libgalliumvl_la-vl_compositor_cs.o)

Fixes: 9364d66cb7f7 ("gallium/auxiliary/vl: Add video compositor compute shader 
render")
Signed-off-by: Vinson Lee 
---
 src/gallium/auxiliary/vl/vl_compositor_cs.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/gallium/auxiliary/vl/vl_compositor_cs.h 
b/src/gallium/auxiliary/vl/vl_compositor_cs.h
index 7a203d327eda..a73a8755fc2a 100644
--- a/src/gallium/auxiliary/vl/vl_compositor_cs.h
+++ b/src/gallium/auxiliary/vl/vl_compositor_cs.h
@@ -32,9 +32,9 @@
 
 #include "vl_compositor.h"
 
-char *compute_shader_video_buffer;
-char *compute_shader_weave;
-char *compute_shader_rgba;
+extern char *compute_shader_video_buffer;
+extern char *compute_shader_weave;
+extern char *compute_shader_rgba;
 
 /**
  * create compute shader
-- 
2.20.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH] freedreno: Fix meson build.

2019-02-06 Thread Vinson Lee
../src/gallium/drivers/freedreno/freedreno_resource.c: In function 
‘fd_resource_create_with_modifiers’:
../src/gallium/drivers/freedreno/freedreno_resource.c:884:30: error: 
‘DRM_FORMAT_MOD_QCOM_COMPRESSED’ undeclared (first use in this function)
   allow_ubwc = find_modifier(DRM_FORMAT_MOD_QCOM_COMPRESSED, modifiers, count);
  ^

Fixes: 1ce5d757d04a ("freedreno: core buffer modifier support")
Signed-off-by: Vinson Lee 
---
 src/gallium/drivers/freedreno/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/freedreno/meson.build 
b/src/gallium/drivers/freedreno/meson.build
index 1e3a3037014b..25aa8ecdb455 100644
--- a/src/gallium/drivers/freedreno/meson.build
+++ b/src/gallium/drivers/freedreno/meson.build
@@ -209,7 +209,7 @@ files_libfreedreno = files(
 )
 
 freedreno_includes = [
-  inc_src, inc_include, inc_gallium, inc_gallium_aux,
+  inc_src, inc_include, inc_drm_uapi, inc_gallium, inc_gallium_aux,
   inc_freedreno, include_directories('ir3'),
 ]
 
-- 
2.19.1.dropbox.2

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] meson: Fix typo.

2019-01-26 Thread Vinson Lee
meson.build:166:21: ERROR:  Unknown method "verson_compare" for a string.

Fixes: c1efa240c91e ("meson: Add warnings and errors when using ICC")
Signed-off-by: Vinson Lee 
---
 meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meson.build b/meson.build
index 2d730708d067..287d9e0eed2b 100644
--- a/meson.build
+++ b/meson.build
@@ -163,9 +163,9 @@ with_gallium_virgl = _drivers.contains('virgl')
 with_gallium_swr = _drivers.contains('swr')
 
 if cc.get_id() == 'intel'
-  if meson.version().verson_compare('< 0.49.0')
+  if meson.version().version_compare('< 0.49.0')
 error('Meson does not have sufficient support of ICC before 0.49.0 to 
compile mesa')
-  elif with_gallium_swr and meson.version().verson_compare('== 0.49.0')
+  elif with_gallium_swr and meson.version().version_compare('== 0.49.0')
 warning('Meson as of 0.49.0 is sufficient for compiling mesa with ICC, but 
there are some caveats with SWR. 0.49.1 should resolve all of these')
   endif
 endif
-- 
2.20.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] freedreno: Fix meson build.

2019-01-25 Thread Vinson Lee
../src/gallium/drivers/freedreno/freedreno_resource.c: In function 
‘fd_resource_create_with_modifiers’:
../src/gallium/drivers/freedreno/freedreno_resource.c:884:30: error: 
‘DRM_FORMAT_MOD_QCOM_COMPRESSED’ undeclared (first use in this function)
   allow_ubwc = find_modifier(DRM_FORMAT_MOD_QCOM_COMPRESSED, modifiers, count);
  ^

Fixes: 1ce5d757d04a ("freedreno: core buffer modifier support")
Signed-off-by: Vinson Lee 
---
 src/gallium/drivers/freedreno/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/freedreno/meson.build 
b/src/gallium/drivers/freedreno/meson.build
index 1e3a3037014b..25aa8ecdb455 100644
--- a/src/gallium/drivers/freedreno/meson.build
+++ b/src/gallium/drivers/freedreno/meson.build
@@ -209,7 +209,7 @@ files_libfreedreno = files(
 )
 
 freedreno_includes = [
-  inc_src, inc_include, inc_gallium, inc_gallium_aux,
+  inc_src, inc_include, inc_drm_uapi, inc_gallium, inc_gallium_aux,
   inc_freedreno, include_directories('ir3'),
 ]
 
-- 
2.19.1.dropbox.2

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] meson: Fix libsensors detection.

2018-12-18 Thread Vinson Lee
On Tue, Dec 18, 2018 at 11:42 AM Dylan Baker  wrote:
>
> Quoting Vinson Lee (2018-12-18 09:52:08)
> > Fixes: 5e71efef44b9 ("meson: Add lmsensors support")
> > Signed-off-by: Vinson Lee 
> > ---
> >  meson.build | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/meson.build b/meson.build
> > index 57dd8b59cb..d591ca377b 100644
> > --- a/meson.build
> > +++ b/meson.build
> > @@ -1395,7 +1395,7 @@ endif
> >
> >  _sensors = get_option('lmsensors')
> >  if _sensors != 'false'
> > -  dep_lmsensors = cc.find_library('libsensors', required : _sensors == 
> > 'true')
> > +  dep_lmsensors = cc.find_library('sensors', required : _sensors == 'true')
> >if dep_lmsensors.found()
> >  pre_args += '-DHAVE_LIBSENSORS=1'
> >endif
> > --
> > 2.19.1
> >
>
> Does this actually fix anything for you, and if so on what OS? On Arch both
> libsensors and sensors work fine and find the same library.
>
> Dylan

This patch fixes libsensors detection for me on Ubuntu 18.10 with meson 0.47.2.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] meson: Fix libsensors detection.

2018-12-18 Thread Vinson Lee
Fixes: 5e71efef44b9 ("meson: Add lmsensors support")
Signed-off-by: Vinson Lee 
---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 57dd8b59cb..d591ca377b 100644
--- a/meson.build
+++ b/meson.build
@@ -1395,7 +1395,7 @@ endif
 
 _sensors = get_option('lmsensors')
 if _sensors != 'false'
-  dep_lmsensors = cc.find_library('libsensors', required : _sensors == 'true')
+  dep_lmsensors = cc.find_library('sensors', required : _sensors == 'true')
   if dep_lmsensors.found()
 pre_args += '-DHAVE_LIBSENSORS=1'
   endif
-- 
2.19.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] meson: Fix typo.

2018-12-17 Thread Vinson Lee
Fixes: 6b4c7047d571 ("meson: build gallium nine state_tracker")
Signed-off-by: Vinson Lee 
---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index fe647f682c1c..d0f4b7e51f44 100644
--- a/meson.build
+++ b/meson.build
@@ -619,7 +619,7 @@ if with_gallium_st_nine
 error('The nine state tracker requires gallium softpipe/llvmpipe.')
   elif not (with_gallium_radeonsi or with_gallium_nouveau or with_gallium_r600
 or with_gallium_r300 or with_gallium_svga or with_gallium_i915)
-error('The nine state tracker requires at least on non-swrast gallium 
driver.')
+error('The nine state tracker requires at least one non-swrast gallium 
driver.')
   endif
   if not with_dri3
 error('Using nine with wine requires dri3')
-- 
2.20.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] glapi: Fix DispatchSanity_test

2018-12-07 Thread Vinson Lee
On Fri, Dec 7, 2018 at 3:48 PM Kristian H. Kristensen
 wrote:
>
> ---
>  src/mapi/glapi/gen/EXT_multisampled_render_to_texture.xml | 2 +-
>  src/mapi/glapi/gen/es_EXT.xml | 2 ++
>  src/mapi/glapi/gen/gl_API.xml | 2 --
>  src/mesa/main/tests/dispatch_sanity.cpp   | 3 +++
>  4 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/src/mapi/glapi/gen/EXT_multisampled_render_to_texture.xml 
> b/src/mapi/glapi/gen/EXT_multisampled_render_to_texture.xml
> index 555b008bd33..d76ecd47d0e 100644
> --- a/src/mapi/glapi/gen/EXT_multisampled_render_to_texture.xml
> +++ b/src/mapi/glapi/gen/EXT_multisampled_render_to_texture.xml
> @@ -20,7 +20,7 @@
>  
>  -->
>
> -
> + desktop="false">
>  
>  
>  
> diff --git a/src/mapi/glapi/gen/es_EXT.xml b/src/mapi/glapi/gen/es_EXT.xml
> index bbc4a1a1118..917fed62f98 100644
> --- a/src/mapi/glapi/gen/es_EXT.xml
> +++ b/src/mapi/glapi/gen/es_EXT.xml
> @@ -810,6 +810,8 @@
>  
>  
>
> + xmlns:xi="http://www.w3.org/2001/XInclude"/>
> +
>  
>  
>  
> diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml
> index f1def8090de..f4d0808f13b 100644
> --- a/src/mapi/glapi/gen/gl_API.xml
> +++ b/src/mapi/glapi/gen/gl_API.xml
> @@ -8175,8 +8175,6 @@
>
>   xmlns:xi="http://www.w3.org/2001/XInclude"/>
>
> - xmlns:xi="http://www.w3.org/2001/XInclude"/>
> -
>   xmlns:xi="http://www.w3.org/2001/XInclude"/>
>
>  
> diff --git a/src/mesa/main/tests/dispatch_sanity.cpp 
> b/src/mesa/main/tests/dispatch_sanity.cpp
> index fb2acfbdeea..04dd89328f4 100644
> --- a/src/mesa/main/tests/dispatch_sanity.cpp
> +++ b/src/mesa/main/tests/dispatch_sanity.cpp
> @@ -2236,6 +2236,9 @@ const struct function gles2_functions_possible[] = {
> /* GL_NV_conservative_raster_pre_snap_triangles */
> { "glConservativeRasterParameteriNV", 20, -1 },
>
> +   /* GL_EXT_multisampled_render_to_texture */
> +   { "glFramebufferTexture2DMultisampleEXT", 20, -1 },
> +
> { NULL, 0, -1 }
>  };
>
> --
> 2.20.0.rc2.403.gdbc3b29805-goog
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Tested-by: Vinson Lee 
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] freedreno: Fix autotools build.

2018-11-28 Thread Vinson Lee
Fix build error.

  CXXLDpipe_msm.la
../../../../src/gallium/drivers/freedreno/.libs/libfreedreno.a(freedreno_batch.o):
 In function `batch_init':
src/gallium/drivers/freedreno/freedreno_batch.c:54: undefined reference to 
`fd_device_version'
src/gallium/drivers/freedreno/freedreno_batch.c:59: undefined reference to 
`fd_submit_new'
src/gallium/drivers/freedreno/freedreno_batch.c:61: undefined reference to 
`fd_submit_new_ringbuffer'
src/gallium/drivers/freedreno/freedreno_batch.c:64: undefined reference to 
`fd_submit_new_ringbuffer'
src/gallium/drivers/freedreno/freedreno_batch.c:66: undefined reference to 
`fd_submit_new_ringbuffer'
src/gallium/drivers/freedreno/freedreno_batch.c:70: undefined reference to 
`fd_submit_new_ringbuffer'

Fixes: b4476138d5ad ("freedreno: move drm to common location")
Fixes: aa0fed10d357 ("freedreno: move ir3 to common location")
Signed-off-by: Vinson Lee 
---
 src/gallium/targets/pipe-loader/Makefile.am | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gallium/targets/pipe-loader/Makefile.am 
b/src/gallium/targets/pipe-loader/Makefile.am
index fa16e8535ff1..db515e3097b7 100644
--- a/src/gallium/targets/pipe-loader/Makefile.am
+++ b/src/gallium/targets/pipe-loader/Makefile.am
@@ -157,6 +157,8 @@ pipe_msm_la_LIBADD = \
$(PIPE_LIBS) \
$(top_builddir)/src/gallium/winsys/freedreno/drm/libfreedrenodrm.la \
$(top_builddir)/src/gallium/drivers/freedreno/libfreedreno.la \
+   $(top_builddir)/src/freedreno/libfreedreno_drm.la \
+   $(top_builddir)/src/freedreno/libfreedreno_ir3.la \
$(LIBDRM_LIBS) \
$(FREEDRENO_LIBS)
 
-- 
2.17.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] st/xvmc: Add X11 include path.

2018-11-21 Thread Vinson Lee
This patch fixes this build error.

  CC   tests/xvmc_bench.o
In file included from tests/xvmc_bench.c:35:
tests/testlib.h:38:10: fatal error: 'X11/Xlib.h' file not found
 ^~~~

Signed-off-by: Vinson Lee 
---
 src/gallium/state_trackers/xvmc/Makefile.am | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/state_trackers/xvmc/Makefile.am 
b/src/gallium/state_trackers/xvmc/Makefile.am
index 85d0b5f4953d..ddb2f4b230b6 100644
--- a/src/gallium/state_trackers/xvmc/Makefile.am
+++ b/src/gallium/state_trackers/xvmc/Makefile.am
@@ -28,6 +28,7 @@ AM_CFLAGS = \
$(VISIBILITY_CFLAGS) \
$(VL_CFLAGS) \
$(XCB_DRI3_CFLAGS) \
+   $(X11_INCLUDES) \
$(XVMC_CFLAGS)
 
 noinst_LTLIBRARIES = libxvmctracker.la
-- 
2.17.1.dropbox.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] st/xvmc: Add X11 include path.

2018-11-05 Thread Vinson Lee
This patch fixes this build error.

  CC   tests/xvmc_bench.o
In file included from tests/xvmc_bench.c:35:
tests/testlib.h:38:10: fatal error: 'X11/Xlib.h' file not found
 ^~~~

Signed-off-by: Vinson Lee 
---
 src/gallium/state_trackers/xvmc/Makefile.am | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/state_trackers/xvmc/Makefile.am 
b/src/gallium/state_trackers/xvmc/Makefile.am
index 85d0b5f4953d..ddb2f4b230b6 100644
--- a/src/gallium/state_trackers/xvmc/Makefile.am
+++ b/src/gallium/state_trackers/xvmc/Makefile.am
@@ -28,6 +28,7 @@ AM_CFLAGS = \
$(VISIBILITY_CFLAGS) \
$(VL_CFLAGS) \
$(XCB_DRI3_CFLAGS) \
+   $(X11_INCLUDES) \
$(XVMC_CFLAGS)
 
 noinst_LTLIBRARIES = libxvmctracker.la
-- 
2.17.1.dropbox.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] r600/sb: Fix constant logical operand in assert.

2018-10-31 Thread Vinson Lee
Fixes: da977ad90747 ("r600/sb: start adding GDS support")
Signed-off-by: Vinson Lee 
---
 src/gallium/drivers/r600/sb/sb_bc_builder.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/r600/sb/sb_bc_builder.cpp 
b/src/gallium/drivers/r600/sb/sb_bc_builder.cpp
index 5681fdc44253..b7d87eac9f42 100644
--- a/src/gallium/drivers/r600/sb/sb_bc_builder.cpp
+++ b/src/gallium/drivers/r600/sb/sb_bc_builder.cpp
@@ -567,7 +567,7 @@ int bc_builder::build_fetch_gds(fetch_node *n) {
const fetch_op_info *fop = bc.op_ptr;
unsigned gds_op = (ctx.fetch_opcode(bc.op) >> 8) & 0x3f;
unsigned mem_op = 4;
-   assert(fop->flags && FF_GDS);
+   assert(fop->flags & FF_GDS);
 
if (bc.op == FETCH_OP_TF_WRITE) {
mem_op = 5;
-- 
2.17.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH v2] nir: fix nir_copy_propagation test

2018-10-23 Thread Vinson Lee
On Tue, Oct 23, 2018 at 7:56 AM Juan A. Suarez Romero
 wrote:
>
> Use nir_src_comp_as_uint() to read the proper second component, as
> nir_src_as_uint() returns the first one.
>
> v2: Use nir_src_comp_as_uint() [Jason]
>
> Fixes: 16870de8a0a ("nir: Use nir_src_is_const and nir_src_as_* in core
>  code")
> Signed-off-by: Juan A. Suarez Romero 
> ---
>  src/compiler/nir/tests/vars_tests.cpp | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/compiler/nir/tests/vars_tests.cpp 
> b/src/compiler/nir/tests/vars_tests.cpp
> index 02c53804b84..a7bbeb02277 100644
> --- a/src/compiler/nir/tests/vars_tests.cpp
> +++ b/src/compiler/nir/tests/vars_tests.cpp
> @@ -375,7 +375,7 @@ TEST_F(nir_copy_prop_vars_test, 
> store_store_load_different_components)
>   ASSERT_TRUE(store_to_v1->src[1].is_ssa);
>
>   ASSERT_TRUE(nir_src_is_const(store_to_v1->src[1]));
> - ASSERT_EQ(nir_src_as_uint(store_to_v1->src[1]), 20);
> + ASSERT_EQ(nir_src_comp_as_uint(store_to_v1->src[1], 1), 20);
>   break;
>}
> }
> @@ -424,7 +424,7 @@ TEST_F(nir_copy_prop_vars_test, 
> store_store_load_different_components_in_many_bl
>   ASSERT_TRUE(store_to_v1->src[1].is_ssa);
>
>   ASSERT_TRUE(nir_src_is_const(store_to_v1->src[1]));
> - ASSERT_EQ(nir_src_as_uint(store_to_v1->src[1]), 20);
> + ASSERT_EQ(nir_src_comp_as_uint(store_to_v1->src[1], 1), 20);
>   break;
>}
> }
> --
> 2.17.2
>
> ___________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Tested-by: Vinson Lee 
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] r600/sb: Fix constant-logical-operand warning.

2018-10-11 Thread Vinson Lee
sb/sb_bc_parser.cpp:620:27: warning: use of logical '&&' with constant operand 
[-Wconstant-logical-operand]
if (cf->bc.op_ptr->flags && FF_GDS)
 ^  ~~
sb/sb_bc_parser.cpp:620:27: note: use '&' for a bitwise operation
if (cf->bc.op_ptr->flags && FF_GDS)
 ^~
 &
sb/sb_bc_parser.cpp:620:27: note: remove constant to silence this warning
if (cf->bc.op_ptr->flags && FF_GDS)
~^

Fixes: da977ad90747 ("r600/sb: start adding GDS support")
Signed-off-by: Vinson Lee 
---
 src/gallium/drivers/r600/sb/sb_bc_parser.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/r600/sb/sb_bc_parser.cpp 
b/src/gallium/drivers/r600/sb/sb_bc_parser.cpp
index eafc1cb8ec..90e6df745a 100644
--- a/src/gallium/drivers/r600/sb/sb_bc_parser.cpp
+++ b/src/gallium/drivers/r600/sb/sb_bc_parser.cpp
@@ -617,7 +617,7 @@ int bc_parser::decode_fetch_clause(cf_node* cf) {
int r;
unsigned i = cf->bc.addr << 1, cnt = cf->bc.count + 1;
 
-   if (cf->bc.op_ptr->flags && FF_GDS)
+   if (cf->bc.op_ptr->flags & FF_GDS)
cf->subtype = NST_GDS_CLAUSE;
else
cf->subtype = NST_TEX_CLAUSE;
-- 
2.17.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] egl: Use correct shared libraries suffix on macOS.

2018-10-07 Thread Vinson Lee
Signed-off-by: Vinson Lee 
---
 src/egl/egl-symbols-check | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/egl/egl-symbols-check b/src/egl/egl-symbols-check
index 460e61a357c7..4200f9c07f3a 100755
--- a/src/egl/egl-symbols-check
+++ b/src/egl/egl-symbols-check
@@ -1,7 +1,12 @@
 #!/bin/sh
 set -eu
 
-LIB=${1-.libs/libEGL.so}
+if [ "$(uname)" = "Darwin" ]
+then
+  LIB=${1-.libs/libEGL.dylib}
+else
+  LIB=${1-.libs/libEGL.so}
+fi
 
 if ! [ -f "$LIB" ]
 then
-- 
2.17.1.dropbox.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 2/2] build: Don't overlink gallium xlib target

2018-09-17 Thread Vinson Lee
On Mon, Sep 17, 2018 at 10:44 AM, Dylan Baker  wrote:
> Currently gallium's xlib target will fail to link due to multiple
> definitions of all the symbols in libmesautil, this only shows up in
> autotools, and not in meson due to differences in the way that meson and
> autotools handle linking static archives into static archives. Autotools
> uses -Wl,--whole-archive implicitly, meson requires this behavior to be
> opted-into. The solution is just to remove libmesautils from the
> libgl-xlib target, since it will get all of those symbols form
> libmesagallium.
>
> I've dropped the link from meson as well, it doesn't seem to hurt
> anything and should make linking just a little faster.
>
> Fixes: 8396043f304bb2a752130230055605c5c966e89f
>("Replace uses of _mesa_bitcount with util_bitcount")
> Cc: Vinson Lee 
> Cc: Brain Paul 
> Cc: Sergii Romantsov
> ---
>  src/gallium/targets/libgl-xlib/Makefile.am | 1 -
>  src/gallium/targets/libgl-xlib/meson.build | 2 +-
>  2 files changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/src/gallium/targets/libgl-xlib/Makefile.am 
> b/src/gallium/targets/libgl-xlib/Makefile.am
> index dc7c6edfdb0..56d548e7c15 100644
> --- a/src/gallium/targets/libgl-xlib/Makefile.am
> +++ b/src/gallium/targets/libgl-xlib/Makefile.am
> @@ -62,7 +62,6 @@ lib@GL_LIB@_la_LIBADD = \
> $(top_builddir)/src/mapi/glapi/libglapi.la \
> $(top_builddir)/src/mesa/libmesagallium.la \
> $(top_builddir)/src/gallium/auxiliary/libgallium.la \
> -   $(top_builddir)/src/util/libmesautil.la \
> $(SHARED_GLAPI_LIB) \
> $(GL_LIB_DEPS) \
> $(CLOCK_LIB) \
> diff --git a/src/gallium/targets/libgl-xlib/meson.build 
> b/src/gallium/targets/libgl-xlib/meson.build
> index 3d197ba7193..921f948ca3a 100644
> --- a/src/gallium/targets/libgl-xlib/meson.build
> +++ b/src/gallium/targets/libgl-xlib/meson.build
> @@ -49,7 +49,7 @@ libgl = shared_library(
>link_depends : gallium_xlib_link_depends,
>link_with : [
>  libxlib, libws_xlib, libglapi_static,
> -libgallium, libmesa_util, libmesa_gallium, gallium_xlib_link_with,
> +libgallium, libmesa_gallium, gallium_xlib_link_with,
>],
>dependencies : [dep_thread, dep_clock, dep_unwind, driver_swrast, 
> driver_swr],
>install : true,
> --
> 2.19.0
>

Tested that this fixed the autotools build.

Tested-by: Vinson Lee 
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] utils/u_math: break dependency on gallium/utils

2018-09-11 Thread Vinson Lee
On Sat, Sep 8, 2018 at 11:39 PM, Dylan Baker  wrote:
> Currently u_math needs gallium utils for cpu detection.  Most of what
> u_math uses out of u_cpu_detection is duplicated in src/mesa/x86
> (surprise!), so I've just reworked it as much as possible to use the
> x86/common_x86_features macros instead of the gallium ones. There is
> one small function that was copied over, as promoting u_cpu_detection is
> itself a fairly hefty undertaking, as it depends on u_debug, and this
> fixes the bug for now.
>
> bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107870
> cc: v...@freedesktop.org
> ---
>
> I have no idea if this fixes the build on mac, I had this in a branch where I
> started replacing more of imports.{h,c} with utils stuff, and this fixes some
> build problems on Linux. I don't have a mac to test on and I wont until 
> Monday.
> If this works let me know.
>
>  src/util/u_math.c | 43 ++-
>  1 file changed, 38 insertions(+), 5 deletions(-)
>
> diff --git a/src/util/u_math.c b/src/util/u_math.c
> index c58af911be7..bf0c398eeec 100644
> --- a/src/util/u_math.c
> +++ b/src/util/u_math.c
> @@ -29,7 +29,7 @@
>
>  #include "pipe/p_config.h"
>  #include "util/u_math.h"
> -#include "util/u_cpu_detect.h"
> +#include "x86/common_x86_features.h"
>
>  #if defined(PIPE_ARCH_SSE)
>  #include 
> @@ -90,7 +90,7 @@ util_fpstate_get(void)
> unsigned mxcsr = 0;
>
>  #if defined(PIPE_ARCH_SSE)
> -   if (util_cpu_caps.has_sse) {
> +   if (cpu_has_xmm) {
>mxcsr = _mm_getcsr();
> }
>  #endif
> @@ -98,6 +98,31 @@ util_fpstate_get(void)
> return mxcsr;
>  }
>
> +/* TODO: this was copied from u_cpu_detection. It's another case of 
> duplication
> + * between gallium and core mesa, and it would be nice to get rid of that
> + * duplication as well.
> + */
> +#if defined(PIPE_ARCH_X86)
> +PIPE_ALIGN_STACK static inline bool sse2_has_daz(void)
> +{
> +   struct {
> +  uint32_t pad1[7];
> +  uint32_t mxcsr_mask;
> +  uint32_t pad2[128-8];
> +   } PIPE_ALIGN_VAR(16) fxarea;
> +
> +   fxarea.mxcsr_mask = 0;
> +#if defined(PIPE_CC_GCC)
> +   __asm __volatile ("fxsave %0" : "+m" (fxarea));
> +#elif defined(PIPE_CC_MSVC) || defined(PIPE_CC_ICL)
> +   _fxsave();
> +#else
> +   fxarea.mxcsr_mask = 0;
> +#endif
> +   return !!(fxarea.mxcsr_mask & (1 << 6));
> +}
> +#endif
> +
>  /**
>   * Make sure that the fp treats the denormalized floating
>   * point numbers as zero.
> @@ -108,13 +133,21 @@ unsigned
>  util_fpstate_set_denorms_to_zero(unsigned current_mxcsr)
>  {
>  #if defined(PIPE_ARCH_SSE)
> -   if (util_cpu_caps.has_sse) {
> +   if (cpu_has_xmm) {
>/* Enable flush to zero mode */
>current_mxcsr |= _MM_FLUSH_ZERO_MASK;
> -  if (util_cpu_caps.has_daz) {
> +  /* x86_64 cpus always have daz, as do cpus with sse3 in fact, there's
> +   * basically only a handful of very early pentium 4's that have sse2 
> but
> +   * not daz.
> +   */
> +# if !defined(PIPE_ARCH_x86_64) && !defined(PIPE_ARCH_SSSE3)
> +  if (sse2_has_daz()) {
> +# endif
>   /* Enable denormals are zero mode */
>   current_mxcsr |= _MM_DENORMALS_ZERO_MASK;
> +# if !defined(PIPE_ARCH_x86_64) && !defined(PIPE_ARCH_SSSE3)
>}
> +#endif
>util_fpstate_set(current_mxcsr);
> }
>  #endif
> @@ -130,7 +163,7 @@ void
>  util_fpstate_set(unsigned mxcsr)
>  {
>  #if defined(PIPE_ARCH_SSE)
> -   if (util_cpu_caps.has_sse) {
> +   if (cpu_has_xmm) {
>_mm_setcsr(mxcsr);
> }
>  #endif
> --
> 2.18.0
>

Tested-by: Vinson Lee 
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 2/2] gallium: try to fix the Windows build

2018-09-08 Thread Vinson Lee
On Sat, Sep 8, 2018 at 6:02 PM, Marek Olšák  wrote:
> From: Marek Olšák 
>
> Windows doesn't have thrd_current.
> ---
>  src/gallium/auxiliary/util/u_helpers.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/src/gallium/auxiliary/util/u_helpers.c 
> b/src/gallium/auxiliary/util/u_helpers.c
> index f773360..8095242 100644
> --- a/src/gallium/auxiliary/util/u_helpers.c
> +++ b/src/gallium/auxiliary/util/u_helpers.c
> @@ -127,20 +127,21 @@ util_upload_index_buffer(struct pipe_context *pipe,
>   * The function pins the current thread and driver threads to a group of
>   * CPU cores that share the same L3 cache. This is needed for good multi-
>   * threading performance on AMD Zen CPUs.
>   *
>   * \param upper_thread  thread in the state tracker that also needs to be
>   *  pinned.
>   */
>  void
>  util_context_thread_changed(struct pipe_context *ctx, thrd_t *upper_thread)
>  {
> +#ifdef HAVE_PTHREAD
> thrd_t current = thrd_current();
> int cache = util_get_L3_for_pinned_thread(current,
>   util_cpu_caps.cores_per_L3);
>
> /* If the main thread is not pinned, choose the L3 cache. */
> if (cache == -1) {
>unsigned num_caches = util_cpu_caps.nr_cpus /
>  util_cpu_caps.cores_per_L3;
>static unsigned last_cache;
>
> @@ -151,20 +152,21 @@ util_context_thread_changed(struct pipe_context *ctx, 
> thrd_t *upper_thread)
>
> /* Tell the driver to pin its threads to the same L3 cache. */
> if (ctx->set_context_param) {
>ctx->set_context_param(ctx, PIPE_CONTEXT_PARAM_PIN_THREADS_TO_L3_CACHE,
>   cache);
> }
>
> /* Do the same for the upper level thread if there is any (e.g. glthread) 
> */
> if (upper_thread)
>util_pin_thread_to_L3(*upper_thread, cache, 
> util_cpu_caps.cores_per_L3);
> +#endif
>  }
>
>  /* This is a helper for hardware bring-up. Don't remove. */
>  struct pipe_query *
>  util_begin_pipestat_query(struct pipe_context *ctx)
>  {
> struct pipe_query *q =
>ctx->create_query(ctx, PIPE_QUERY_PIPELINE_STATISTICS, 0);
> if (!q)
>return NULL;
> --
> 2.7.4
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Tested-by: Vinson Lee 
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] docs: Python 2.7 or later is required.

2018-08-17 Thread Vinson Lee
Signed-off-by: Vinson Lee 
---
 docs/install.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/install.html b/docs/install.html
index 08081944cfcc..f6094671cf9f 100644
--- a/docs/install.html
+++ b/docs/install.html
@@ -72,7 +72,7 @@ you think you've spotted a bug let developers know by filing a
 
 
 https://www.python.org/;>Python - Python is required.
-Version 2.6.4 or later should work.
+Version 2.7 or later should work.
 
 http://www.makotemplates.org/;>Python Mako module -
 Python Mako module is required. Version 0.3.4 or later should work.
-- 
2.17.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] glsl: remove delegating constructors to allow build with C++98

2018-07-20 Thread Vinson Lee
On Fri, Jul 20, 2018 at 1:21 PM, Caio Marcelo de Oliveira Filho
 wrote:
> Delegating constructors is a C++11 feature, so this was breaking when
> compiling with C++98. Change the copy_propagation_state() calls that
> used the convenience constructor to use a static member function
> instead.
>
> Since copy_propagation_state is expected to be heap allocated, this
> change is a good fit.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107305
> ---
>  .../glsl/opt_copy_propagation_elements.cpp | 14 --
>  1 file changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/src/compiler/glsl/opt_copy_propagation_elements.cpp 
> b/src/compiler/glsl/opt_copy_propagation_elements.cpp
> index b5c90fff88d..4c6ca790394 100644
> --- a/src/compiler/glsl/opt_copy_propagation_elements.cpp
> +++ b/src/compiler/glsl/opt_copy_propagation_elements.cpp
> @@ -68,9 +68,11 @@ class copy_propagation_state {
>  public:
> DECLARE_RZALLOC_CXX_OPERATORS(copy_propagation_state);
>
> -   copy_propagation_state()
> -  : copy_propagation_state(NULL)
> -   {}
> +   static
> +   copy_propagation_state* create(void *mem_ctx)
> +   {
> +  return new (mem_ctx) copy_propagation_state(NULL);
> +   }
>
> copy_propagation_state* clone()
> {
> @@ -238,7 +240,7 @@ public:
>this->lin_ctx = linear_alloc_parent(this->mem_ctx, 0);
>this->shader_mem_ctx = NULL;
>this->kills = new(mem_ctx) exec_list;
> -  this->state = new(mem_ctx) copy_propagation_state();
> +  this->state = copy_propagation_state::create(mem_ctx);
> }
> ~ir_copy_propagation_elements_visitor()
> {
> @@ -294,7 +296,7 @@ 
> ir_copy_propagation_elements_visitor::visit_enter(ir_function_signature *ir)
> this->killed_all = false;
>
> copy_propagation_state *orig_state = state;
> -   this->state = new(mem_ctx) copy_propagation_state();
> +   this->state = copy_propagation_state::create(mem_ctx);
>
> visit_list_elements(this, >body);
>
> @@ -531,7 +533,7 @@ ir_copy_propagation_elements_visitor::handle_loop(ir_loop 
> *ir, bool keep_acp)
>/* Populate the initial acp with a copy of the original */
>this->state = orig_state->clone();
> } else {
> -  this->state = new(mem_ctx) copy_propagation_state();
> +  this->state = copy_propagation_state::create(mem_ctx);
> }
>
> visit_list_elements(this, >body_instructions);
> --
> 2.18.0
>

Tested-by: Vinson Lee 
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] swr/rast: Rename createInstructionSimplifierPass with llvm-7.0.

2018-06-30 Thread Vinson Lee
Fix build error after llvm-7.0svn r336028 ("[instsimplify] Move the
instsimplify pass to use more obvious file names and diretory.").

rasterizer/jitter/blend_jit.cpp:873:20: error: use of undeclared identifier 
'createInstructionSimplifierPass'
passes.add(createInstructionSimplifierPass());
   ^

Signed-off-by: Vinson Lee 
---
 src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp | 4 
 src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp | 4 
 src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp   | 1 +
 src/gallium/drivers/swr/rasterizer/jitter/streamout_jit.cpp | 4 
 4 files changed, 13 insertions(+)

diff --git a/src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp 
b/src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp
index f89c502db7d7..1d6fb405dd6b 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp
+++ b/src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp
@@ -870,7 +870,11 @@ struct BlendJit : public Builder
 passes.add(createCFGSimplificationPass());
 passes.add(createEarlyCSEPass());
 passes.add(createInstructionCombiningPass());
+#if LLVM_VERSION_MAJOR >= 7
+passes.add(createInstSimplifyLegacyPass());
+#else
 passes.add(createInstructionSimplifierPass());
+#endif
 passes.add(createConstantPropagationPass());
 passes.add(createSCCPPass());
 passes.add(createAggressiveDCEPass());
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp 
b/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp
index b4d326ebdcc2..26972cddc251 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp
+++ b/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp
@@ -294,7 +294,11 @@ Function* FetchJit::Create(const FETCH_COMPILE_STATE& 
fetchState)
 optPasses.add(createCFGSimplificationPass());
 optPasses.add(createEarlyCSEPass());
 optPasses.add(createInstructionCombiningPass());
+#if LLVM_VERSION_MAJOR >= 7
+optPasses.add(createInstSimplifyLegacyPass());
+#else
 optPasses.add(createInstructionSimplifierPass());
+#endif
 optPasses.add(createConstantPropagationPass());
 optPasses.add(createSCCPPass());
 optPasses.add(createAggressiveDCEPass());
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp 
b/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp
index 47f717bfc2a1..760d1dab80ee 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp
+++ b/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp
@@ -70,6 +70,7 @@ using PassManager = llvm::legacy::PassManager;
 #if LLVM_VERSION_MAJOR >= 7
 #include "llvm/Transforms/Utils.h"
 #include "llvm/Transforms/InstCombine/InstCombine.h"
+#include "llvm/Transforms/Scalar/InstSimplifyPass.h"
 #endif
 #include "llvm/Support/Host.h"
 #include "llvm/Support/DynamicLibrary.h"
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/streamout_jit.cpp 
b/src/gallium/drivers/swr/rasterizer/jitter/streamout_jit.cpp
index 8f86af2a4b41..5c1555280fce 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/streamout_jit.cpp
+++ b/src/gallium/drivers/swr/rasterizer/jitter/streamout_jit.cpp
@@ -306,7 +306,11 @@ struct StreamOutJit : public Builder
 passes.add(createCFGSimplificationPass());
 passes.add(createEarlyCSEPass());
 passes.add(createInstructionCombiningPass());
+#if LLVM_VERSION_MAJOR >= 7
+passes.add(createInstSimplifyLegacyPass());
+#else
 passes.add(createInstructionSimplifierPass());
+#endif
 passes.add(createConstantPropagationPass());
 passes.add(createSCCPPass());
 passes.add(createAggressiveDCEPass());
-- 
2.18.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] egl/x11: Move dri2_format_for_depth prototype.

2018-05-27 Thread Vinson Lee
On Fri, May 25, 2018 at 9:42 AM, Eric Engestrom
<eric.engest...@intel.com> wrote:
> On Friday, 2018-05-25 16:06:26 +0100, Eric Engestrom wrote:
>> On Friday, 2018-05-25 06:52:25 +0000, Vinson Lee wrote:
>> > Fix build error without DRI3.
>>
>> D'uh!
>> I forgot building dri3 was optional, sorry :/
>>
>> Reviewed-by: Eric Engestrom <eric.engest...@intel.com>
>
> Actually, wait no, this doesn't look right, the function should be named
> something else if it's exposed to everyone, since it's quite specific to
> x11's case, or it should not be exposed to everyone.
>
> I feel like the best thing to do here is to just copy the prototype to
> platform_x11.c:
>
> ---8<---
> diff --git a/src/egl/drivers/dri2/platform_x11.c 
> b/src/egl/drivers/dri2/platform_x11.c
> index b2a3000b252ec0ddb12f..ea9b0cc6d6fd04804d2a 100644
> --- a/src/egl/drivers/dri2/platform_x11.c
> +++ b/src/egl/drivers/dri2/platform_x11.c
> @@ -55,6 +55,9 @@ static EGLBoolean
>  dri2_x11_swap_interval(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
> EGLint interval);
>
> +uint32_t
> +dri2_format_for_depth(uint32_t depth);
> +u
>  static void
>  swrastCreateDrawable(struct dri2_egl_display * dri2_dpy,
>   struct dri2_egl_surface * dri2_surf)
> --->8---
>

This also fixes the build error.

Tested-by: Vinson Lee <v...@freedesktop.org>

>>
>> >
>> >   CC   drivers/dri2/platform_x11.lo
>> > drivers/dri2/platform_x11.c:1010:1: error: no previous prototype for 
>> > function 'dri2_format_for_depth' [-Werror,-Wmissing-prototypes]
>> > dri2_format_for_depth(uint32_t depth)
>> > ^
>> >
>> > Fixes: 473af0b541b2 ("egl/x11: deduplicate depth-to-format logic")
>> > Signed-off-by: Vinson Lee <v...@freedesktop.org>
>> > ---
>> >  src/egl/drivers/dri2/egl_dri2.h  | 3 +++
>> >  src/egl/drivers/dri2/platform_x11_dri3.h | 3 ---
>> >  2 files changed, 3 insertions(+), 3 deletions(-)
>> >
>> > diff --git a/src/egl/drivers/dri2/egl_dri2.h 
>> > b/src/egl/drivers/dri2/egl_dri2.h
>> > index adabc527f85b..b91a899e476c 100644
>> > --- a/src/egl/drivers/dri2/egl_dri2.h
>> > +++ b/src/egl/drivers/dri2/egl_dri2.h
>> > @@ -523,4 +523,7 @@ dri2_init_surface(_EGLSurface *surf, _EGLDisplay *dpy, 
>> > EGLint type,
>> >  void
>> >  dri2_fini_surface(_EGLSurface *surf);
>> >
>> > +uint32_t
>> > +dri2_format_for_depth(uint32_t depth);
>> > +
>> >  #endif /* EGL_DRI2_INCLUDED */
>> > diff --git a/src/egl/drivers/dri2/platform_x11_dri3.h 
>> > b/src/egl/drivers/dri2/platform_x11_dri3.h
>> > index e6fd01366978..96e7ee972d9f 100644
>> > --- a/src/egl/drivers/dri2/platform_x11_dri3.h
>> > +++ b/src/egl/drivers/dri2/platform_x11_dri3.h
>> > @@ -38,7 +38,4 @@ extern struct dri2_egl_display_vtbl 
>> > dri3_x11_display_vtbl;
>> >  EGLBoolean
>> >  dri3_x11_connect(struct dri2_egl_display *dri2_dpy);
>> >
>> > -uint32_t
>> > -dri2_format_for_depth(uint32_t depth);
>> > -
>> >  #endif
>> > --
>> > 2.17.0
>> >
>> > ___
>> > mesa-dev mailing list
>> > mesa-dev@lists.freedesktop.org
>> > https://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] egl/x11: Move dri2_format_for_depth prototype.

2018-05-25 Thread Vinson Lee
Fix build error without DRI3.

  CC   drivers/dri2/platform_x11.lo
drivers/dri2/platform_x11.c:1010:1: error: no previous prototype for function 
'dri2_format_for_depth' [-Werror,-Wmissing-prototypes]
dri2_format_for_depth(uint32_t depth)
^

Fixes: 473af0b541b2 ("egl/x11: deduplicate depth-to-format logic")
Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 src/egl/drivers/dri2/egl_dri2.h  | 3 +++
 src/egl/drivers/dri2/platform_x11_dri3.h | 3 ---
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h
index adabc527f85b..b91a899e476c 100644
--- a/src/egl/drivers/dri2/egl_dri2.h
+++ b/src/egl/drivers/dri2/egl_dri2.h
@@ -523,4 +523,7 @@ dri2_init_surface(_EGLSurface *surf, _EGLDisplay *dpy, 
EGLint type,
 void
 dri2_fini_surface(_EGLSurface *surf);
 
+uint32_t
+dri2_format_for_depth(uint32_t depth);
+
 #endif /* EGL_DRI2_INCLUDED */
diff --git a/src/egl/drivers/dri2/platform_x11_dri3.h 
b/src/egl/drivers/dri2/platform_x11_dri3.h
index e6fd01366978..96e7ee972d9f 100644
--- a/src/egl/drivers/dri2/platform_x11_dri3.h
+++ b/src/egl/drivers/dri2/platform_x11_dri3.h
@@ -38,7 +38,4 @@ extern struct dri2_egl_display_vtbl dri3_x11_display_vtbl;
 EGLBoolean
 dri3_x11_connect(struct dri2_egl_display *dri2_dpy);
 
-uint32_t
-dri2_format_for_depth(uint32_t depth);
-
 #endif
-- 
2.17.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] swr/rast: Fix addPassesToEmitFile usage with llvm-7.0.

2018-05-23 Thread Vinson Lee
Fix build error after llvm-7.0svn r332881 ("CodeGen: Add a dwo output
file argument to addPassesToEmitFile and hook it up to dwo output.").

  CXX  rasterizer/jitter/libmesaswr_la-JitManager.lo
rasterizer/jitter/JitManager.cpp:368:93: error: too few arguments to function 
call, expected at least 4, have 3
pTarget->addPassesToEmitFile(*pMPasses, filestream, 
TargetMachine::CGFT_AssemblyFile);

^

Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp 
b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp
index e9412b1b53c5..8a5d95d2ea07 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp
+++ b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp
@@ -365,7 +365,11 @@ void JitManager::DumpAsm(Function* pFunction, const char* 
fileName)
 legacy::PassManager* pMPasses = new legacy::PassManager();
 auto* pTarget = mpExec->getTargetMachine();
 pTarget->Options.MCOptions.AsmVerbose = true;
+#if LLVM_VERSION_MAJOR >= 7
+pTarget->addPassesToEmitFile(*pMPasses, filestream, nullptr, 
TargetMachine::CGFT_AssemblyFile);
+#else
 pTarget->addPassesToEmitFile(*pMPasses, filestream, 
TargetMachine::CGFT_AssemblyFile);
+#endif
 pMPasses->run(*pModule);
 delete pMPasses;
 pTarget->Options.MCOptions.AsmVerbose = false;
-- 
2.17.0.dropbox.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] v3d: Fix automake linking error.

2018-05-21 Thread Vinson Lee
  CXXLDgallium_dri.la
../../../../src/broadcom/.libs/libbroadcom.a(clif_dump.o): In function 
`clif_dump_packet':
src/broadcom/clif/clif_dump.c:87: undefined reference to 
`v3d33_clif_dump_packet'
src/broadcom/clif/clif_dump.c:85: undefined reference to 
`v3d41_clif_dump_packet'
../../../../src/broadcom/.libs/libbroadcom.a(clif_dump.o): In function 
`clif_process_worklist':
src/broadcom/clif/clif_dump.c:140: undefined reference to 
`v3d41_clif_dump_gl_shader_state_record'
src/broadcom/clif/clif_dump.c:144: undefined reference to 
`v3d33_clif_dump_gl_shader_state_record'

Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 src/gallium/drivers/v3d/Automake.inc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/v3d/Automake.inc 
b/src/gallium/drivers/v3d/Automake.inc
index 7cf8ae7cd8..91ae826b30 100644
--- a/src/gallium/drivers/v3d/Automake.inc
+++ b/src/gallium/drivers/v3d/Automake.inc
@@ -5,7 +5,9 @@ TARGET_CPPFLAGS += -DGALLIUM_V3D
 TARGET_LIB_DEPS += \
$(top_builddir)/src/gallium/winsys/v3d/drm/libv3ddrm.la \
$(top_builddir)/src/gallium/drivers/v3d/libv3d.la \
-   $(top_builddir)/src/broadcom/libbroadcom.la
+   $(top_builddir)/src/broadcom/libbroadcom.la \
+   $(top_builddir)/src/broadcom/libbroadcom_v33.la \
+   $(top_builddir)/src/broadcom/libbroadcom_v41.la
 
 if !HAVE_GALLIUM_VC4
 TARGET_LIB_DEPS += $(top_builddir)/src/broadcom/cle/libbroadcom_cle.la
-- 
2.17.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] v3d: Include v3d_drm.h path.

2018-05-17 Thread Vinson Lee
Fix build error.

  CC   v3d_blit.lo
In file included from v3d_blit.c:27:0:
v3d_context.h:39:10: fatal error: v3d_drm.h: No such file or directory
 #include "v3d_drm.h"
  ^~~

Fixes: 8a793d42f1cc ("v3d: Switch the vc5 driver to using the finalized V3D 
UABI.")
Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 src/gallium/drivers/v3d/Makefile.am | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/drivers/v3d/Makefile.am 
b/src/gallium/drivers/v3d/Makefile.am
index 2b4c364c24..ff0334a239 100644
--- a/src/gallium/drivers/v3d/Makefile.am
+++ b/src/gallium/drivers/v3d/Makefile.am
@@ -24,6 +24,7 @@ include $(top_srcdir)/src/gallium/Automake.inc
 
 AM_CFLAGS = \
-I$(top_builddir)/src/compiler/nir \
+   -I$(top_srcdir)/include/drm-uapi \
-I$(top_builddir)/src/broadcom \
$(LIBDRM_CFLAGS) \
$(V3D_SIMULATOR_CFLAGS) \
-- 
2.17.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] cmake: Bump minimum version to 3.2.

2018-05-17 Thread Vinson Lee
This build error occurs with cmake 2.8.12.
/bin/sh: BYPRODUCTS: command not found

BYPRODUCTS is not available until cmake 3.2.
https://cmake.org/cmake/help/v3.2/release/3.2.html

Fixes: 2f02cf0d4c2d ("Generate xml for builtin profiles")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106370
Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 CMakeLists.txt |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8c7d162..e56aafb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.5)
+cmake_minimum_required(VERSION 3.2)
 
 list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules")
 
-- 
1.7.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] scons: Add PROGRAM_NIR_FILES.

2018-05-12 Thread Vinson Lee
Fix SCons build error.

  Linking build/linux-x86_64-debug/gallium/targets/libgl-xlib/libGL.so.1.5 ...
build/linux-x86_64-debug/mesa/libmesa.a(st_program.os): In function 
`st_translate_prog_to_nir':
src/mesa/state_tracker/st_program.c:392: undefined reference to `prog_to_nir'

Fixes: 5c33e8c7729e ("st/nir: use NIR for asm programs")
Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 src/mesa/SConscript | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/mesa/SConscript b/src/mesa/SConscript
index ba98ad4323c5..5a21b64f561e 100644
--- a/src/mesa/SConscript
+++ b/src/mesa/SConscript
@@ -42,6 +42,7 @@ env.CFile('program/program_parse.tab.c', 
'program/program_parse.y')
 mesa_sources = (
 source_lists['MESA_FILES'] +
 source_lists['PROGRAM_FILES'] +
+source_lists['PROGRAM_NIR_FILES'] +
 source_lists['STATETRACKER_FILES']
 )
 
-- 
2.17.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] mesa: disable building the shader cache on macos

2018-05-08 Thread Vinson Lee
On Tue, May 8, 2018 at 10:34 PM, Timothy Arceri  wrote:
> The shader cache code wont be used on this platform so just disable
> it to avoid make check errors.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103264
> ---
>  configure.ac | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/configure.ac b/configure.ac
> index c0fbfe94135..dc361b03a52 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -2097,8 +2097,10 @@ if test -n "$with_vulkan_drivers"; then
>  VULKAN_DRIVERS=`echo $VULKAN_DRIVERS|tr " " "\n"|sort -u|tr "\n" " "`
>  fi
>
> +if test "x$dri_platform" != xapple; then
> +DEFINES="$DEFINES -DENABLE_SHADER_CACHE"
> +fi
>
> -DEFINES="$DEFINES -DENABLE_SHADER_CACHE"
>  AM_CONDITIONAL(NEED_MEGADRIVER, test -n "$DRI_DIRS")
>  AM_CONDITIONAL(NEED_LIBMESA, test "x$enable_glx" = xxlib -o \
>"x$enable_osmesa" = xyes -o \
> --
> 2.17.0
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


master cache-test passes on macOS 10.13.4 now.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] swr/rast: Fix WriteBitcodeToFile usage with llvm-7.0.

2018-05-01 Thread Vinson Lee
Fix build error after llvm-7.0svn r325155 ("Pass a reference to a module
to the bitcode writer.").

  CXX  rasterizer/jitter/libmesaswr_la-JitManager.lo
rasterizer/jitter/JitManager.cpp:548:30: error: reference to type 'const 
llvm::Module' could not bind to an lvalue of type 'const llvm::Module *'
llvm::WriteBitcodeToFile(M, bitcodeStream);
 ^

Suggested-by: George Kyriazis <george.kyria...@intel.com>
Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp 
b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp
index aadcca25550f..efb747abdee8 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp
+++ b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp
@@ -545,7 +545,11 @@ static inline uint32_t ComputeModuleCRC(const 
llvm::Module* M)
 std::string bitcodeBuffer;
 raw_string_ostream bitcodeStream(bitcodeBuffer);
 
+#if LLVM_VERSION_MAJOR >= 7
+llvm::WriteBitcodeToFile(*M, bitcodeStream);
+#else
 llvm::WriteBitcodeToFile(M, bitcodeStream);
+#endif
 //M->print(bitcodeStream, nullptr, false);
 
 bitcodeStream.flush();
-- 
2.17.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] swr: Fix include for createInstructionCombiningPass with llvm-7.0.

2018-04-29 Thread Vinson Lee
Fix build error after llvm-7.0.0svn r330669 ("InstCombine: Fix layering
by not including Scalar.h in InstCombine").

  CXX  rasterizer/jitter/libmesaswr_la-blend_jit.lo
rasterizer/jitter/blend_jit.cpp:816:20: error: use of undeclared identifier 
'createInstructionCombiningPass'; did you mean 
'createInstructionSimplifierPass'?
passes.add(createInstructionCombiningPass());
   ^~
   createInstructionSimplifierPass

Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp 
b/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp
index 216938fa7b07..6e4d24dde8fa 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp
+++ b/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp
@@ -66,6 +66,9 @@ using PassManager = llvm::legacy::PassManager;
 #include "llvm/Support/TargetSelect.h"
 #include "llvm/Support/DynamicLibrary.h"
 #include "llvm/Transforms/IPO.h"
+#if LLVM_VERSION_MAJOR >= 7
+#include "llvm/Transforms/InstCombine/InstCombine.h"
+#endif
 #include "llvm/Transforms/Scalar.h"
 #if LLVM_VERSION_MAJOR >= 7
 #include "llvm/Transforms/Utils.h"
-- 
2.17.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] compiler/glsl: close fd's in glcpp_test.py

2018-04-21 Thread Vinson Lee
On Fri, Apr 20, 2018 at 10:22 AM, Dylan Baker <dy...@pnwbakers.com> wrote:
> I would have thought falling out of scope would allow the gc to collect
> these, but apparently it doesn't, and this hits an fd limit on macos.
>
> CC: v...@freedesktop.org
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106133
> Fixes: db8cd8e36771eed98eb638fd0593c978c3da52a9
>("glcpp/tests: Convert shell scripts to a python script")
> Signed-off-by: Dylan Baker <dylan.c.ba...@intel.com>
> ---
>  src/compiler/glsl/glcpp/tests/glcpp_test.py | 6 --
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/src/compiler/glsl/glcpp/tests/glcpp_test.py 
> b/src/compiler/glsl/glcpp/tests/glcpp_test.py
> index f07c2414ea2..cdc63b3ac2a 100755
> --- a/src/compiler/glsl/glcpp/tests/glcpp_test.py
> +++ b/src/compiler/glsl/glcpp/tests/glcpp_test.py
> @@ -78,7 +78,8 @@ def _valgrind(glcpp, filename):
>  extra_args = parse_test_file(filename, nl_format='\n')
>
>  try:
> -_, tmpfile = tempfile.mkstemp()
> +fd, tmpfile = tempfile.mkstemp()
> +os.close(fd)
>  with open(filename, 'rb') as f:
>  proc = subprocess.Popen(
>  ['valgrind', '--error-exitcode=31', '--log-file', tmpfile, 
> glcpp] + extra_args,
> @@ -135,7 +136,8 @@ def _replace_test(args, replace):
>  total += 1
>  testfile = os.path.join(args.testdir, filename)
>  try:
> -_, tmpfile = tempfile.mkstemp()
> +fd, tmpfile = tempfile.mkstemp()
> +os.close(fd)
>  with io.open(testfile, 'rt') as f:
>  contents = f.read()
>  with io.open(tmpfile, 'wt') as f:
> --
> 2.17.0
>

Tested-by: Vinson Lee <v...@freedesktop.org>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 0/3] Fix include for LLVMAddPromoteMemoryToRegisterPass

2018-04-01 Thread Vinson Lee
On Sat, Mar 31, 2018 at 5:32 PM, Mike Lothian <m...@fireburn.co.uk> wrote:
> Hi
>
> I've split this into three patches, one for each area affected
>
> I think I've got the right prefixes now
>
> I've also removed the fixes line and included the testing and reviewed
> by tags
>
> Hope that's OK and again if you're happy with this please can you commit
> as I don't have git rights
>
> Thanks
>
> Mike
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Tested-by: Vinson Lee <v...@freedesktop.org>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 4/4] swr: Fix include for createPromoteMemoryToRegisterPass

2018-04-01 Thread Vinson Lee
On Sun, Apr 1, 2018 at 1:10 AM, Mike Lothian <m...@fireburn.co.uk> wrote:
> Include llvm/Transforms/Utils.h with the newest LLVM 7
>
> Signed-of-by: Mike Lothian <m...@fireburn.co.uk>
> ---
>  src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp 
> b/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp
> index 031bced8a0..d726d4844e 100644
> --- a/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp
> +++ b/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp
> @@ -67,6 +67,9 @@ using PassManager = llvm::legacy::PassManager;
>  #include "llvm/Support/DynamicLibrary.h"
>  #include "llvm/Transforms/IPO.h"
>  #include "llvm/Transforms/Scalar.h"
> +#if HAVE_LLVM >= 0x0700
> +#include 
> +#endif
>  #include "llvm/Support/Host.h"
>  #include "llvm/Support/DynamicLibrary.h"
>
> --
> 2.16.3
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


The added include uses <> delimiters whereas the other includes use ""
delimiters.

Tested-by: Vinson Lee <v...@freedesktop.org>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] ac/nir: Fix include for LLVMAddPromoteMemoryToRegisterPass

2018-03-31 Thread Vinson Lee
On Sat, Mar 31, 2018 at 5:08 PM, Mike Lothian <m...@fireburn.co.uk> wrote:
> On 1 April 2018 at 00:03, Vinson Lee <v...@freedesktop.org> wrote:
>>
>> A similar change is needed in
>> src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp.
>>
>> Vinson
>
> Hi
>
> I'm not convinced that it does
>
> Utils.h defines two functions LLVMAddLowerSwitchPass &
> LLVMAddPromoteMemoryToRegisterPass. Whilst jit_pch.hpp does use
> Scalar.h, it doesn't use either of the two functions in Utils.h so it
> doesn't need to be included
>
> Cheers
>
> Mike

I see this build errors with llvm 7.0.0svn. These errors are fixed if
Utils.h is added to the list of includes.

  CXX  rasterizer/jitter/libmesaswr_la-blend_jit.lo
rasterizer/jitter/blend_jit.cpp:796:20: error: use of undeclared
identifier 'createBreakCriticalEdgesPass'
passes.add(createBreakCriticalEdgesPass());
   ^
rasterizer/jitter/blend_jit.cpp:799:20: error: use of undeclared
identifier 'createPromoteMemoryToRegisterPass'
passes.add(createPromoteMemoryToRegisterPass());
   ^
rasterizer/jitter/blend_jit.cpp:803:20: error: use of undeclared
identifier 'createInstructionSimplifierPass'; did you mean
  'createInstructionCombiningPass'?
passes.add(createInstructionSimplifierPass());
   ^~~
   createInstructionCombiningPass

Vinson
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] ac/nir: Fix include for LLVMAddPromoteMemoryToRegisterPass

2018-03-31 Thread Vinson Lee
On Thu, Mar 29, 2018 at 4:56 PM, Mike Lothian  wrote:
> Include llvm-c/Transforms/Utils.h with the newest LLVM 7
>
> Fixes: 2dd4f35c7fc llvm-c: Split Utils out of Scalar.h
> Signed-of-by: Mike Lothian 
>
> ---
>
> I don't have git commit rights
>
> If you're happy with this patch please can you commit it
>
> Cheers
>
> Mike
> ---
>  src/amd/vulkan/radv_nir_to_llvm.c   | 3 +++
>  src/gallium/auxiliary/gallivm/lp_bld_init.c | 3 +++
>  src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c | 3 +++
>  3 files changed, 9 insertions(+)
>
> diff --git a/src/amd/vulkan/radv_nir_to_llvm.c 
> b/src/amd/vulkan/radv_nir_to_llvm.c
> index c6b4e8b532..2f0864da46 100644
> --- a/src/amd/vulkan/radv_nir_to_llvm.c
> +++ b/src/amd/vulkan/radv_nir_to_llvm.c
> @@ -32,6 +32,9 @@
>  #include 
>  #include 
>  #include 
> +#if HAVE_LLVM >= 0x0700
> +#include 
> +#endif
>
>  #include "sid.h"
>  #include "gfx9d.h"
> diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c 
> b/src/gallium/auxiliary/gallivm/lp_bld_init.c
> index 6ddc509a81..dae9d01552 100644
> --- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
> +++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
> @@ -40,6 +40,9 @@
>
>  #include 
>  #include 
> +#if HAVE_LLVM >= 0x0700
> +#include 
> +#endif
>  #include 
>
>
> diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c 
> b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
> index 79fdebe838..622fd26950 100644
> --- a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
> +++ b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
> @@ -40,6 +40,9 @@
>  #include 
>  #include 
>  #include 
> +#if HAVE_LLVM >= 0x0700
> +#include 
> +#endif
>
>  enum si_llvm_calling_convention {
> RADEON_LLVM_AMDGPU_VS = 87,
> --
> 2.16.3
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev

A similar change is needed in
src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp.

Vinson
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] gallium: Do not add -Wframe-address option for gcc <= 4.4.

2018-03-21 Thread Vinson Lee
This patch fixes these build errors with GCC 4.4.

  Compiling src/gallium/auxiliary/util/u_debug_stack.c ...
src/gallium/auxiliary/util/u_debug_stack.c: In function 
‘debug_backtrace_capture’:
src/gallium/auxiliary/util/u_debug_stack.c:268: error: #pragma GCC diagnostic 
not allowed inside functions
src/gallium/auxiliary/util/u_debug_stack.c:269: error: #pragma GCC diagnostic 
not allowed inside functions
src/gallium/auxiliary/util/u_debug_stack.c:271: error: #pragma GCC diagnostic 
not allowed inside functions

Fixes: 370e356ebab4 ("gallium: silence __builtin_frame_address nonzero argument 
is unsafe warning")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105529
Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 src/gallium/auxiliary/util/u_debug_stack.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_debug_stack.c 
b/src/gallium/auxiliary/util/u_debug_stack.c
index 974e639..846f648 100644
--- a/src/gallium/auxiliary/util/u_debug_stack.c
+++ b/src/gallium/auxiliary/util/u_debug_stack.c
@@ -264,7 +264,7 @@ debug_backtrace_capture(struct debug_stack_frame *backtrace,
}
 #endif
 
-#if defined(PIPE_CC_GCC)
+#if defined(PIPE_CC_GCC) && (PIPE_CC_GCC_VERSION > 404) || defined(__clang__)
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wframe-address"
frame_pointer = ((const void **)__builtin_frame_address(1));
-- 
1.7.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] swr/rast: Fix macOS macro.

2018-02-25 Thread Vinson Lee
Fixes: a25093de7188 ("swr/rast: Implement JIT shader caching to disk")
Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp 
b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp
index ab7c6eb15b09..0cefa43529fc 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp
+++ b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp
@@ -47,7 +47,7 @@
 #define JITTER_OUTPUT_DIR SWR_OUTPUT_DIR "\\Jitter"
 #endif // _WIN32
 
-#if defined(__APPLE) || defined(FORCE_LINUX) || defined(__linux__) || 
defined(__gnu_linux__)
+#if defined(__APPLE__) || defined(FORCE_LINUX) || defined(__linux__) || 
defined(__gnu_linux__)
 #include 
 #include 
 #endif
@@ -532,7 +532,7 @@ static inline uint32_t ComputeModuleCRC(const llvm::Module* 
M)
 /// constructor
 JitCache::JitCache()
 {
-#if defined(__APPLE) || defined(FORCE_LINUX) || defined(__linux__) || 
defined(__gnu_linux__)
+#if defined(__APPLE__) || defined(FORCE_LINUX) || defined(__linux__) || 
defined(__gnu_linux__)
 if (strncmp(KNOB_JIT_CACHE_DIR.c_str(), "~/", 2) == 0) {
 char *homedir;
 if (!(homedir = getenv("HOME"))) {
-- 
2.16.2

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] r600/fp64: Fix build.

2018-02-05 Thread Vinson Lee
  CC   r600_shader.lo
r600_shader.c: In function ‘egcm_int_to_double’:
r600_shader.c:4543:12: error: ‘ctx’ is a pointer; did you mean to use ‘->’?
 if (ctx.bc->chip_class == CAYMAN)
^
->

Fixes: 35b430157776 ("r600/fp64: fix integer->double conversion")
Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 src/gallium/drivers/r600/r600_shader.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/r600/r600_shader.c 
b/src/gallium/drivers/r600/r600_shader.c
index e3b832b04f77..4874d14a581d 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -4540,7 +4540,7 @@ static int egcm_int_to_double(struct r600_shader_ctx *ctx)
alu.dst.sel = temp_reg;
alu.dst.chan = i;
alu.dst.write = 1;
-   if (ctx.bc->chip_class == CAYMAN)
+   if (ctx->bc->chip_class == CAYMAN)
alu.last = i == dchan + 1;
else
alu.last = 1; /* trans only ops on 
evergreen */
-- 
2.14.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] broadcom/vc5: Fix source file name.

2018-01-19 Thread Vinson Lee
Fixes: c9b2cb78972d ("vc5: add missing files to the tarball")
Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 src/gallium/drivers/vc5/Makefile.sources | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/vc5/Makefile.sources 
b/src/gallium/drivers/vc5/Makefile.sources
index bc145806cc06..cbf7b656e386 100644
--- a/src/gallium/drivers/vc5/Makefile.sources
+++ b/src/gallium/drivers/vc5/Makefile.sources
@@ -18,7 +18,7 @@ C_SOURCES := \
vc5_screen.c \
vc5_screen.h \
vc5_simulator.c \
-   vc5_simulator_wrapper.c \
+   vc5_simulator_wrapper.cpp \
vc5_simulator_wrapper.h \
vc5_tiling.c \
vc5_tiling.h \
-- 
2.15.1.dropbox.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] broadcom/vc5: Add missing include paths.

2018-01-19 Thread Vinson Lee
Fixes: 954a704da305 ("broadcom/vc5: Port the RCL setup to V3D4.1.")
Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 src/gallium/drivers/vc5/Makefile.am | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/vc5/Makefile.am 
b/src/gallium/drivers/vc5/Makefile.am
index b8f7e484b347..b3743e3795ed 100644
--- a/src/gallium/drivers/vc5/Makefile.am
+++ b/src/gallium/drivers/vc5/Makefile.am
@@ -38,10 +38,10 @@ noinst_LTLIBRARIES = \
$()
 
 libvc5_v33_la_SOURCES = $(VC5_PER_VERSION_SOURCES)
-libvc5_v33_la_CFLAGS = -DV3D_VERSION=33
+libvc5_v33_la_CFLAGS = $(AM_CFLAGS) -DV3D_VERSION=33
 
 libvc5_v41_la_SOURCES = $(VC5_PER_VERSION_SOURCES)
-libvc5_v41_la_CFLAGS = -DV3D_VERSION=41
+libvc5_v41_la_CFLAGS = $(AM_CFLAGS) -DV3D_VERSION=41
 
 libvc5_la_SOURCES = $(C_SOURCES)
 
-- 
2.15.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] anv: Check if memfd_create is already defined.

2017-11-28 Thread Vinson Lee
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103909
Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 configure.ac | 1 +
 meson.build  | 2 +-
 src/intel/vulkan/anv_allocator.c | 2 ++
 src/intel/vulkan/anv_gem_stubs.c | 2 ++
 4 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 1344c12884fb..f378e54b857b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -849,6 +849,7 @@ AC_CHECK_HEADER([sys/sysctl.h], [DEFINES="$DEFINES 
-DHAVE_SYS_SYSCTL_H"])
 AC_CHECK_FUNC([strtof], [DEFINES="$DEFINES -DHAVE_STRTOF"])
 AC_CHECK_FUNC([mkostemp], [DEFINES="$DEFINES -DHAVE_MKOSTEMP"])
 AC_CHECK_FUNC([timespec_get], [DEFINES="$DEFINES -DHAVE_TIMESPEC_GET"])
+AC_CHECK_FUNC([memfd_create], [DEFINES="$DEFINES -DHAVE_MEMFD_CREATE"])
 
 AC_MSG_CHECKING([whether strtod has locale support])
 AC_LINK_IFELSE([AC_LANG_SOURCE([[
diff --git a/meson.build b/meson.build
index e2ba3cb05245..4a2e817f0fa4 100644
--- a/meson.build
+++ b/meson.build
@@ -617,7 +617,7 @@ foreach h : ['xlocale.h', 'sys/sysctl.h', 'linux/futex.h']
   endif
 endforeach
 
-foreach f : ['strtof', 'mkostemp', 'posix_memalign', 'timespec_get']
+foreach f : ['strtof', 'mkostemp', 'posix_memalign', 'timespec_get', 
'memfd_create']
   if cc.has_function(f)
 pre_args += '-DHAVE_@0@'.format(f.to_upper())
   endif
diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c
index 8ed32b3c6731..33bd3c68c55f 100644
--- a/src/intel/vulkan/anv_allocator.c
+++ b/src/intel/vulkan/anv_allocator.c
@@ -109,11 +109,13 @@ struct anv_mmap_cleanup {
 
 #define ANV_MMAP_CLEANUP_INIT ((struct anv_mmap_cleanup){0})
 
+#ifndef HAVE_MEMFD_CREATE
 static inline int
 memfd_create(const char *name, unsigned int flags)
 {
return syscall(SYS_memfd_create, name, flags);
 }
+#endif
 
 static inline uint32_t
 ilog2_round_up(uint32_t value)
diff --git a/src/intel/vulkan/anv_gem_stubs.c b/src/intel/vulkan/anv_gem_stubs.c
index 02527b5fcd8d..26eb5c8a610b 100644
--- a/src/intel/vulkan/anv_gem_stubs.c
+++ b/src/intel/vulkan/anv_gem_stubs.c
@@ -27,11 +27,13 @@
 
 #include "anv_private.h"
 
+#ifndef HAVE_MEMFD_CREATE
 static inline int
 memfd_create(const char *name, unsigned int flags)
 {
return syscall(SYS_memfd_create, name, flags);
 }
+#endif
 
 uint32_t
 anv_gem_create(struct anv_device *device, uint64_t size)
-- 
2.15.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] amd: build addrlib with C++11

2017-11-16 Thread Vinson Lee
On Wed, Nov 15, 2017 at 3:55 AM, Nicolai Hähnle <nhaeh...@gmail.com> wrote:
> From: Nicolai Hähnle <nicolai.haeh...@amd.com>
>
> It is required for LLVM anyway.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103658
> Fixes: 7f33e94e43a6 ("amd/addrlib: update to latest version")
> ---
>  src/amd/Makefile.addrlib.am | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/amd/Makefile.addrlib.am b/src/amd/Makefile.addrlib.am
> index 46689637f9b..90dfe963445 100644
> --- a/src/amd/Makefile.addrlib.am
> +++ b/src/amd/Makefile.addrlib.am
> @@ -26,15 +26,15 @@ addrlib_libamdgpu_addrlib_la_CPPFLAGS = \
> -I$(srcdir)/common \
> -I$(srcdir)/addrlib \
> -I$(srcdir)/addrlib/core \
> -I$(srcdir)/addrlib/inc/chip/gfx9 \
> -I$(srcdir)/addrlib/inc/chip/r800 \
> -I$(srcdir)/addrlib/gfx9/chip \
> -I$(srcdir)/addrlib/r800/chip \
> -DBRAHMA_BUILD=1
>
>  addrlib_libamdgpu_addrlib_la_CXXFLAGS = \
> -   $(VISIBILITY_CXXFLAGS)
> +   $(VISIBILITY_CXXFLAGS) $(CXX11_CXXFLAGS)
>
>  noinst_LTLIBRARIES += $(ADDRLIB_LIBS)
>
>  addrlib_libamdgpu_addrlib_la_SOURCES = $(ADDRLIB_FILES)
> --
> 2.11.0
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Tested-by: Vinson Lee <v...@freedesktop.org>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] mapi: Use correct shared library name on macOS.

2017-11-14 Thread Vinson Lee
Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 src/mapi/es1api/ABI-check | 7 ++-
 src/mapi/es2api/ABI-check | 7 ++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/mapi/es1api/ABI-check b/src/mapi/es1api/ABI-check
index bd9d0288d60d..0a867343c79a 100755
--- a/src/mapi/es1api/ABI-check
+++ b/src/mapi/es1api/ABI-check
@@ -9,7 +9,12 @@ set -eu
 # or in extensions that are part of the ES 1.1 extension pack.
 # (see 
http://www.khronos.org/registry/gles/specs/1.1/opengles_spec_1_1_extension_pack.pdf)
 
-LIB=${1-es1api/.libs/libGLESv1_CM.so.1}
+if [ $(uname) == "Darwin" ]
+then
+  LIB=${1-es1api/.libs/libGLESv1_CM.dylib}
+else
+  LIB=${1-es1api/.libs/libGLESv1_CM.so.1}
+fi
 
 if ! [ -f "$LIB" ]
 then
diff --git a/src/mapi/es2api/ABI-check b/src/mapi/es2api/ABI-check
index 179bea132e3b..716e6679a49f 100755
--- a/src/mapi/es2api/ABI-check
+++ b/src/mapi/es2api/ABI-check
@@ -6,7 +6,12 @@ set -eu
 # GL_EXT_multi_draw_arrays
 # GL_OES_EGL_image
 
-LIB=${1-es2api/.libs/libGLESv2.so.2}
+if [ $(uname) == "Darwin" ]
+then
+  LIB=${1-es2api/.libs/libGLESv2.dylib}
+else
+  LIB=${1-es2api/.libs/libGLESv2.so.2}
+fi
 
 if ! [ -f "$LIB" ]
 then
-- 
2.15.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] meson: fix egl build for meson version < 0.43

2017-10-22 Thread Vinson Lee
On Fri, Oct 20, 2017 at 5:34 PM, Dylan Baker <dy...@pnwbakers.com> wrote:
> Meson 0.43 added the ability to pass nested lists to
> include_directories, so the code that we have works for 0.43, but not
> for 0.42. This patch changes the include_directories list to be flat so
> it works with 0.42
>
> fixes: 108d257a16859898f5c ("meson: build libEGL")
> Signed-off-by: Dylan Baker <dylanx.c.ba...@intel.com>
> ---
>  src/egl/meson.build | 9 -
>  1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/src/egl/meson.build b/src/egl/meson.build
> index 8ea8a5bbb69..ea7ae06761f 100644
> --- a/src/egl/meson.build
> +++ b/src/egl/meson.build
> @@ -21,7 +21,9 @@
>  c_args_for_egl = []
>  link_for_egl = []
>  deps_for_egl = []
> -incs_for_egl = []
> +incs_for_egl = [
> +  inc_include, inc_src, inc_loader, inc_gbm, include_directories('main'),
> +]
>  files_egl = files(
>'main/eglapi.c',
>'main/eglapi.h',
> @@ -159,10 +161,7 @@ libegl = shared_library(
>  '-D_EGL_BUILT_IN_DRIVER_DRI2',
>  
> '-D_EGL_NATIVE_PLATFORM=_EGL_PLATFORM_@0@'.format(egl_native_platform.to_upper()),
>],
> -  include_directories : [
> -incs_for_egl, inc_include, inc_src, inc_loader, inc_gbm,
> -include_directories('main'),
> -  ],
> +  include_directories : incs_for_egl,
>link_with : [link_for_egl, libloader, libxmlconfig, libglapi, 
> libmesa_util],
>link_args : [ld_args_bsymbolic, ld_args_gc_sections],
>dependencies : [deps_for_egl, dep_dl, dep_libdrm, dep_clock, dep_thread],
> --
> 2.14.2
>
> ___________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Tested-by: Vinson Lee <v...@freedesktop.org>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] anv: Fix instance typos.

2017-10-18 Thread Vinson Lee
Fix build error.

  CC   vulkan/vulkan_libvulkan_common_la-anv_device.lo
In file included from vulkan/anv_device.c:33:0:
vulkan/anv_device.c: In function ‘anv_AllocateMemory’:
vulkan/anv_device.c:1562:37: error: ‘struct anv_device’ has no member named 
‘instace’; did you mean ‘instance’?
  result = vk_errorf(device->instace, device,
 ^
vulkan/anv_private.h:317:17: note: in definition of macro ‘vk_errorf’
 __vk_errorf(instance, obj, REPORT_OBJECT_TYPE(obj), error,\
 ^~~~

Fixes: 9775894f1025 ("anv: Move size check from anv_bo_cache_import() to caller 
(v2)")
Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 src/intel/vulkan/anv_device.c | 2 +-
 src/intel/vulkan/anv_intel.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 546ed2d0ca55..a305afebc32d 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -1559,7 +1559,7 @@ VkResult anv_AllocateMemory(
* this sort of attack but only if it can trust the buffer size.
*/
   if (mem->bo->size < aligned_alloc_size) {
- result = vk_errorf(device->instace, device,
+ result = vk_errorf(device->instance, device,
 VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR,
 "aligned allocationSize too large for "
 "VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR: 
"
diff --git a/src/intel/vulkan/anv_intel.c b/src/intel/vulkan/anv_intel.c
index 885888e82d87..82373f0c91d0 100644
--- a/src/intel/vulkan/anv_intel.c
+++ b/src/intel/vulkan/anv_intel.c
@@ -83,7 +83,7 @@ VkResult anv_CreateDmaBufImageINTEL(
VkDeviceSize aligned_image_size = align_u64(image->size, 4096);
 
if (mem->bo->size < aligned_image_size) {
-  result = vk_errorf(device->instace, device,
+  result = vk_errorf(device->instance, device,
  VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR,
  "dma-buf too small for image in "
  "vkCreateDmaBufImageINTEL: %"PRIu64"B < "PRIu64"B",
-- 
2.14.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] blob: Use intptr_t instead of ssize_t

2017-10-13 Thread Vinson Lee
On Fri, Oct 13, 2017 at 10:44 AM, Jason Ekstrand <ja...@jlekstrand.net> wrote:
> ssize_t is a GNU extension and is not available on Windows or MacOS.
> Instead, we use intptr_t which should be effectively equivalent and is
> part of the C standard.  This should fix the Windows and Mac OS builds.
>
> Cc: Jose Fonseca <jfons...@vmware.com>
> Cc: Vinson Lee <v...@freedesktop.org>
> Fixes: 3af1c829891a4530682bce113fdd512d4f2de3c6
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103253
> ---
>  src/compiler/blob.c   | 8 
>  src/compiler/blob.h   | 6 +++---
>  src/intel/vulkan/anv_pipeline_cache.c | 2 +-
>  3 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/src/compiler/blob.c b/src/compiler/blob.c
> index f0fa85e..8dd254f 100644
> --- a/src/compiler/blob.c
> +++ b/src/compiler/blob.c
> @@ -158,10 +158,10 @@ blob_write_bytes(struct blob *blob, const void *bytes, 
> size_t to_write)
> return true;
>  }
>
> -ssize_t
> +intptr_t
>  blob_reserve_bytes(struct blob *blob, size_t to_write)
>  {
> -   ssize_t ret;
> +   intptr_t ret;
>
> if (! grow_to_fit (blob, to_write))
>return -1;
> @@ -172,14 +172,14 @@ blob_reserve_bytes(struct blob *blob, size_t to_write)
> return ret;
>  }
>
> -ssize_t
> +intptr_t
>  blob_reserve_uint32(struct blob *blob)
>  {
> align_blob(blob, sizeof(uint32_t));
> return blob_reserve_bytes(blob, sizeof(uint32_t));
>  }
>
> -ssize_t
> +intptr_t
>  blob_reserve_intptr(struct blob *blob)
>  {
> align_blob(blob, sizeof(intptr_t));
> diff --git a/src/compiler/blob.h b/src/compiler/blob.h
> index f0f28ec..2b975d4 100644
> --- a/src/compiler/blob.h
> +++ b/src/compiler/blob.h
> @@ -135,7 +135,7 @@ blob_write_bytes(struct blob *blob, const void *bytes, 
> size_t to_write);
>   * \return An offset to space allocated within \blob to which \to_write bytes
>   * can be written, (or -1 in case of any allocation error).
>   */
> -ssize_t
> +intptr_t
>  blob_reserve_bytes(struct blob *blob, size_t to_write);
>
>  /**
> @@ -143,7 +143,7 @@ blob_reserve_bytes(struct blob *blob, size_t to_write);
>   * space. Note that this must be used if later reading with \sa
>   * blob_read_uint32, since it aligns the offset correctly.
>   */
> -ssize_t
> +intptr_t
>  blob_reserve_uint32(struct blob *blob);
>
>  /**
> @@ -151,7 +151,7 @@ blob_reserve_uint32(struct blob *blob);
>   * space. Note that this must be used if later reading with \sa
>   * blob_read_intptr, since it aligns the offset correctly.
>   */
> -ssize_t
> +intptr_t
>  blob_reserve_intptr(struct blob *blob);
>
>  /**
> diff --git a/src/intel/vulkan/anv_pipeline_cache.c 
> b/src/intel/vulkan/anv_pipeline_cache.c
> index ad9c810..82551e9 100644
> --- a/src/intel/vulkan/anv_pipeline_cache.c
> +++ b/src/intel/vulkan/anv_pipeline_cache.c
> @@ -449,7 +449,7 @@ VkResult anv_GetPipelineCacheData(
> blob_write_bytes(, , sizeof(header));
>
> uint32_t count = 0;
> -   ssize_t count_offset = blob_reserve_uint32();
> +   intptr_t count_offset = blob_reserve_uint32();
> if (count_offset < 0) {
>*pDataSize = 0;
>blob_finish();
> --
> 2.5.0.400.gff86faf
>


This patch fixes the Mac OS X build error.

Tested-by: Vinson Lee <v...@freedesktop.org>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] util: fix in-class initialization of static member

2017-09-27 Thread Vinson Lee
On Wed, Sep 27, 2017 at 12:36 PM, Thomas Helland
<thomashellan...@gmail.com> wrote:
> string_buffer_test.cpp:43: error: ISO C++ forbids initialization of
> member ‘str1’
> string_buffer_test.cpp:43: error: making ‘str1’ static
> string_buffer_test.cpp:43: error: invalid in-class initialization of
> static data member of non-integral type ‘const char*’
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103002
> ---
>  src/util/tests/string_buffer/string_buffer_test.cpp | 9 ++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/src/util/tests/string_buffer/string_buffer_test.cpp 
> b/src/util/tests/string_buffer/string_buffer_test.cpp
> index c3d43cb67b..545f607fad 100644
> --- a/src/util/tests/string_buffer/string_buffer_test.cpp
> +++ b/src/util/tests/string_buffer/string_buffer_test.cpp
> @@ -40,9 +40,9 @@ class string_buffer : public ::testing::Test {
>  public:
>
> struct _mesa_string_buffer *buf;
> -   const char *str1 = "test1";
> -   const char *str2 = "test2";
> -   const char *str3 = "test1test2";
> +   const char *str1;
> +   const char *str2;
> +   const char *str3;
> char str4[80];
> char str5[40];
>
> @@ -53,6 +53,9 @@ public:
>  void
>  string_buffer::SetUp()
>  {
> +   str1 = "test1";
> +   str2 = "test2";
> +   str3 = "test1test2";
> buf = _mesa_string_buffer_create(NULL, INITIAL_BUF_SIZE);
>  }
>
> --
> 2.14.1
>
> _______
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Tested that this patch fixes g++ 4.4 build error.

Tested-by: Vinson Lee <v...@freedesktop.org>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] m4: Use older autoconf 2.63 compatible ax_check_compile_flag.

2017-08-31 Thread Vinson Lee
CentOS 6 and RHEL 6 have autoconf 2.63.

Fixes: e4b2b69e828c ("configure: Add and use AX_CHECK_COMPILE_FLAG")
Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 m4/ax_check_compile_flag.m4 |   10 +-
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/m4/ax_check_compile_flag.m4 b/m4/ax_check_compile_flag.m4
index dcabb92..51df0c0 100644
--- a/m4/ax_check_compile_flag.m4
+++ b/m4/ax_check_compile_flag.m4
@@ -1,5 +1,5 @@
 # ===
-#  https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
+#   http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
 # ===
 #
 # SYNOPSIS
@@ -40,7 +40,7 @@
 #   Public License for more details.
 #
 #   You should have received a copy of the GNU General Public License along
-#   with this program. If not, see <https://www.gnu.org/licenses/>.
+#   with this program. If not, see <http://www.gnu.org/licenses/>.
 #
 #   As a special exception, the respective Autoconf Macro's copyright owner
 #   gives unlimited permission to copy, distribute and modify the configure
@@ -55,10 +55,10 @@
 #   modified version of the Autoconf Macro, you may extend this special
 #   exception to the GPL to apply to your modified version as well.
 
-#serial 5
+#serial 3
 
 AC_DEFUN([AX_CHECK_COMPILE_FLAG],
-[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
+[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX
 AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
 AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
   ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
@@ -67,7 +67,7 @@ AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], 
CACHEVAR, [
 [AS_VAR_SET(CACHEVAR,[yes])],
 [AS_VAR_SET(CACHEVAR,[no])])
   _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
-AS_VAR_IF(CACHEVAR,yes,
+AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes],
   [m4_default([$2], :)],
   [m4_default([$3], :)])
 AS_VAR_POPDEF([CACHEVAR])dnl
-- 
1.7.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] Revert "glsl: Mark functions static"

2017-08-22 Thread Vinson Lee
On Mon, Aug 21, 2017 at 6:48 PM, Timothy Arceri <tarc...@itsqueeze.com> wrote:
> This reverts commit ca73c3358c91434e68ab31c23d13986d87c661cd.
>
> This commit broke 'make check' revert it for now.

Tested-by: Vinson Lee <v...@freedesktop.org>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] configure.ac: Check for expat21 if expat is not found.

2017-08-07 Thread Vinson Lee
On Mon, Aug 7, 2017 at 8:18 AM, Emil Velikov <emil.l.veli...@gmail.com> wrote:
> On 5 August 2017 at 21:53, Vinson Lee <v...@freedesktop.org> wrote:
>> Fixes build error on CentOS 6.9.
>>
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102052
>> Fixes: 5c007203b73d ("configure.ac: drop manual detection of expat 
>> header/library")
>> Signed-off-by: Vinson Lee <v...@freedesktop.org>
>> ---
>>  configure.ac |4 +++-
>>  1 files changed, 3 insertions(+), 1 deletions(-)
>>
>> diff --git a/configure.ac b/configure.ac
>> index 5b12dd8..0dfd47b 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -1792,7 +1792,9 @@ if test "x$with_dri_drivers" = xno; then
>>  fi
>>
>>  # Check for expat
>> -PKG_CHECK_MODULES([EXPAT], [expat])
>> +PKG_CHECK_MODULES([EXPAT], [expat],,
>> +[PKG_CHECK_MODULES([EXPAT], [expat21])]
> Hmm... the CenOS guys have gone "interesting" ways with this.
>
> I doubt we have any actual users for such setups, so I'm wondering if
> you can keep a WA for this locally.
> Say simply create a link/copy?
>
> Thanks
> Emil

CentOS 6 and RHEL 6 have expat 2.0 by default. expat 2.0 does not
provide expat.pc.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] configure.ac: Check for expat21 if expat is not found.

2017-08-05 Thread Vinson Lee
Fixes build error on CentOS 6.9.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102052
Fixes: 5c007203b73d ("configure.ac: drop manual detection of expat 
header/library")
Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 configure.ac |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index 5b12dd8..0dfd47b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1792,7 +1792,9 @@ if test "x$with_dri_drivers" = xno; then
 fi
 
 # Check for expat
-PKG_CHECK_MODULES([EXPAT], [expat])
+PKG_CHECK_MODULES([EXPAT], [expat],,
+[PKG_CHECK_MODULES([EXPAT], [expat21])]
+)
 
 dnl If $with_dri_drivers is yes, drivers will be added through
 dnl platform checks. Set DEFINES and LIB_DEPS
-- 
1.7.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] scons: Check for xlocale.h before defining HAVE_XLOCALE_H.

2017-07-05 Thread Vinson Lee
glibc 2.26 removed xlocale.h.
https://sourceware.org/glibc/wiki/Release/2.26#Removal_of_.27xlocale.h.27

Fix this build error with glibc 2.26.

  Compiling src/util/strtod.c ...
src/util/strtod.c:32:10: fatal error: xlocale.h: No such file or directory
 #include 
  ^~~

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101657
Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 scons/gallium.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scons/gallium.py b/scons/gallium.py
index a41127732419..61643a6d4fc6 100755
--- a/scons/gallium.py
+++ b/scons/gallium.py
@@ -325,8 +325,10 @@ def generate(env):
 'GLX_INDIRECT_RENDERING',
 ]
 
-if env['platform'] in ('linux', 'darwin'):
+conf = SCons.Script.Configure(env)
+if conf.CheckHeader('xlocale.h'):
 cppdefines += ['HAVE_XLOCALE_H']
+env = conf.Finish()
 
 if platform == 'windows':
 cppdefines += [
-- 
2.13.2

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH v2] mesa: Avoid set comprehension.

2017-07-05 Thread Vinson Lee
Fix build error on CentOS 6.9 with Python 2.6.

  GENmain/format_fallback.c
  File "./main/format_fallback.py", line 42
names = {fmt.name for fmt in formats}
^
SyntaxError: invalid syntax

Fixes: a1983223d883 ("mesa: Add _mesa_format_fallback_rgbx_to_rgba() [v2]")
Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 src/mesa/main/format_fallback.py |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/format_fallback.py b/src/mesa/main/format_fallback.py
index e3b9916..da88bd5 100644
--- a/src/mesa/main/format_fallback.py
+++ b/src/mesa/main/format_fallback.py
@@ -39,7 +39,7 @@ def parse_args():
 return p.parse_args()
 
 def get_rgbx_to_rgba_map(formats):
-names = {fmt.name for fmt in formats}
+names = set(fmt.name for fmt in formats)
 
 for fmt in formats:
 if not fmt.has_channel('r') or not fmt.has_channel('x'):
-- 
1.7.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] mesa: Avoid set comprehension.

2017-06-29 Thread Vinson Lee
Fix build error on CentOS 6.9 with Python 2.6.

  GENmain/format_fallback.c
  File "./main/format_fallback.py", line 42
names = {fmt.name for fmt in formats}
^
SyntaxError: invalid syntax

Fixes: a1983223d883 ("mesa: Add _mesa_format_fallback_rgbx_to_rgba() [v2]")
Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 src/mesa/main/format_fallback.py |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/format_fallback.py b/src/mesa/main/format_fallback.py
index e3b9916..da88bd5 100644
--- a/src/mesa/main/format_fallback.py
+++ b/src/mesa/main/format_fallback.py
@@ -39,7 +39,7 @@ def parse_args():
 return p.parse_args()
 
 def get_rgbx_to_rgba_map(formats):
-names = {fmt.name for fmt in formats}
+names = set([fmt.name for fmt in formats])
 
 for fmt in formats:
 if not fmt.has_channel('r') or not fmt.has_channel('x'):
-- 
1.7.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] i915g: Add blitter_context argument.

2017-06-08 Thread Vinson Lee
Fix build error.

  CC   i915_surface.lo
i915_surface.c:108:63: error: too few arguments to function call, expected 4, 
have 3
   util_blitter_default_src_texture(_templ, src, src_level);
      ^
../../../../src/gallium/auxiliary/util/u_blitter.h:271:1: note: 
'util_blitter_default_src_texture' declared here
void util_blitter_default_src_texture(struct blitter_context *blitter,
^

Fixes: a893c9169733 ("gallium/u_blitter: use 2D_ARRAY for cubemap blits if 
possible")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101340
Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 src/gallium/drivers/i915/i915_surface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/i915/i915_surface.c 
b/src/gallium/drivers/i915/i915_surface.c
index 27b0d9eae857..57e90c6ed23a 100644
--- a/src/gallium/drivers/i915/i915_surface.c
+++ b/src/gallium/drivers/i915/i915_surface.c
@@ -105,7 +105,7 @@ i915_surface_copy_render(struct pipe_context *pipe,
   goto fallback;
 
util_blitter_default_dst_texture(_templ, dst, dst_level, dstz);
-   util_blitter_default_src_texture(_templ, src, src_level);
+   util_blitter_default_src_texture(i915->blitter, _templ, src, src_level);
 
if (!util_blitter_is_copy_supported(i915->blitter, dst, src))
   goto fallback;
-- 
2.13.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] Fix glcpp test expectations

2017-06-08 Thread Vinson Lee
On Wed, Jun 7, 2017 at 11:42 PM, Iago Toral Quiroga <ito...@igalia.com> wrote:
> With commit f7741985be0234 the we have changed some preprocessor
> error messages and warnings. Adapt related glcpp tests
> expectations accoridngly.
> ---
>  src/compiler/glsl/glcpp/tests/120-undef-builtin.c.expected | 6 +++---
>  src/compiler/glsl/glcpp/tests/147-undef-builtin-allowed.c.expected | 3 +++
>  2 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/src/compiler/glsl/glcpp/tests/120-undef-builtin.c.expected 
> b/src/compiler/glsl/glcpp/tests/120-undef-builtin.c.expected
> index 498dc0f..623438f 100644
> --- a/src/compiler/glsl/glcpp/tests/120-undef-builtin.c.expected
> +++ b/src/compiler/glsl/glcpp/tests/120-undef-builtin.c.expected
> @@ -1,6 +1,6 @@
> -0:2(1): preprocessor error: Built-in (pre-defined) macro names cannot be 
> undefined.
> -0:3(1): preprocessor error: Built-in (pre-defined) macro names cannot be 
> undefined.
> -0:4(1): preprocessor error: Built-in (pre-defined) macro names cannot be 
> undefined.
> +0:2(1): preprocessor error: Built-in (pre-defined) names cannot be undefined.
> +0:3(1): preprocessor error: Built-in (pre-defined) names cannot be undefined.
> +0:4(1): preprocessor error: Built-in (pre-defined) names cannot be undefined.
>  #version 300 es
>
>
> diff --git 
> a/src/compiler/glsl/glcpp/tests/147-undef-builtin-allowed.c.expected 
> b/src/compiler/glsl/glcpp/tests/147-undef-builtin-allowed.c.expected
> index cd0071f..f5517da 100644
> --- a/src/compiler/glsl/glcpp/tests/147-undef-builtin-allowed.c.expected
> +++ b/src/compiler/glsl/glcpp/tests/147-undef-builtin-allowed.c.expected
> @@ -1,3 +1,6 @@
> +0:2(1): preprocessor warning:  names containing consecutive underscores are 
> reserved.
> +0:3(1): preprocessor warning:  names containing consecutive underscores are 
> reserved.
> +0:4(1): preprocessor warning:  names containing consecutive underscores are 
> reserved.
>  #version 110
>
>
> --
> 2.9.3
>

Tested-by: Vinson Lee <v...@freedesktop.org>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] configure.ac: Require amdgpu for r600.

2017-05-30 Thread Vinson Lee
This is the r600 build error with libdrm < 2.4.81.

  CC   common/common_libamd_common_la-ac_gpu_info.lo
common/ac_gpu_info.c: In function ‘ac_query_gpu_info’:
common/ac_gpu_info.c:161:36: error: ‘AMDGPU_HW_IP_VCN_DEC’ undeclared (first 
use in this function)
   r = amdgpu_query_hw_ip_info(dev, AMDGPU_HW_IP_VCN_DEC, 0, _dec);
^~~~

Fixes: 0abc24723cdb ("amd/common: add vcn dec ip info query for amdgpu version 
3.17")
Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 configure.ac | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configure.ac b/configure.ac
index b57be07e24ac..019f805bceea 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2431,6 +2431,7 @@ if test -n "$with_gallium_drivers"; then
 xr600)
 HAVE_GALLIUM_R600=yes
 PKG_CHECK_MODULES([RADEON], [libdrm >= $LIBDRM_RADEON_REQUIRED 
libdrm_radeon >= $LIBDRM_RADEON_REQUIRED])
+PKG_CHECK_MODULES([AMDGPU], [libdrm >= $LIBDRM_AMDGPU_REQUIRED 
libdrm_amdgpu >= $LIBDRM_AMDGPU_REQUIRED])
 require_libdrm "r600"
 if test "x$enable_llvm" = xyes; then
 radeon_llvm_check $LLVM_REQUIRED_R600 "r600"
-- 
2.9.3

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] anv/tests: Create a dummy instance as well as device

2017-05-01 Thread Vinson Lee
On Mon, May 1, 2017 at 4:50 PM, Jason Ekstrand <ja...@jlekstrand.net> wrote:
> This fixes crashes caused by 35e626bd0e59e7ce9fd97ccef66b2468c09206a4
> which made us start referencing the instance in the allocators.  With
> this commit, the tests now happily pass again.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100877
> ---
>  src/intel/vulkan/tests/block_pool_no_free.c| 5 -
>  src/intel/vulkan/tests/state_pool.c| 5 -
>  src/intel/vulkan/tests/state_pool_free_list_only.c | 5 -
>  src/intel/vulkan/tests/state_pool_no_free.c| 5 -
>  4 files changed, 16 insertions(+), 4 deletions(-)
>
> diff --git a/src/intel/vulkan/tests/block_pool_no_free.c 
> b/src/intel/vulkan/tests/block_pool_no_free.c
> index 86d1a76..0a61818 100644
> --- a/src/intel/vulkan/tests/block_pool_no_free.c
> +++ b/src/intel/vulkan/tests/block_pool_no_free.c
> @@ -107,7 +107,10 @@ static void validate_monotonic(uint32_t **blocks)
>
>  static void run_test()
>  {
> -   struct anv_device device;
> +   struct anv_instance instance;
> +   struct anv_device device = {
> +  .instance = ,
> +   };
> struct anv_block_pool pool;
>
> pthread_mutex_init(, NULL);
> diff --git a/src/intel/vulkan/tests/state_pool.c 
> b/src/intel/vulkan/tests/state_pool.c
> index 878ec19..90c9bde 100644
> --- a/src/intel/vulkan/tests/state_pool.c
> +++ b/src/intel/vulkan/tests/state_pool.c
> @@ -34,7 +34,10 @@
>
>  int main(int argc, char **argv)
>  {
> -   struct anv_device device;
> +   struct anv_instance instance;
> +   struct anv_device device = {
> +  .instance = ,
> +   };
> struct anv_block_pool block_pool;
> struct anv_state_pool state_pool;
>
> diff --git a/src/intel/vulkan/tests/state_pool_free_list_only.c 
> b/src/intel/vulkan/tests/state_pool_free_list_only.c
> index 2f4eb47..868815c 100644
> --- a/src/intel/vulkan/tests/state_pool_free_list_only.c
> +++ b/src/intel/vulkan/tests/state_pool_free_list_only.c
> @@ -33,7 +33,10 @@
>
>  int main(int argc, char **argv)
>  {
> -   struct anv_device device;
> +   struct anv_instance instance;
> +   struct anv_device device = {
> +  .instance = ,
> +   };
> struct anv_block_pool block_pool;
> struct anv_state_pool state_pool;
>
> diff --git a/src/intel/vulkan/tests/state_pool_no_free.c 
> b/src/intel/vulkan/tests/state_pool_no_free.c
> index 4b248c2..6e012e4 100644
> --- a/src/intel/vulkan/tests/state_pool_no_free.c
> +++ b/src/intel/vulkan/tests/state_pool_no_free.c
> @@ -54,7 +54,10 @@ static void *alloc_states(void *_job)
>
>  static void run_test()
>  {
> -   struct anv_device device;
> +   struct anv_instance instance;
> +   struct anv_device device = {
> +  .instance = ,
> +   };
> struct anv_block_pool block_pool;
> struct anv_state_pool state_pool;
>
> --
> 2.5.0.400.gff86faf
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Tested-by: Vinson Lee <v...@freedesktop.org>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] configure.ac: Fix typos.

2017-04-20 Thread Vinson Lee
Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 configure.ac | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 957d15df8caa..e42fcfff7757 100644
--- a/configure.ac
+++ b/configure.ac
@@ -724,7 +724,7 @@ dnl Arch/platform-specific settings
 dnl
 AC_ARG_ENABLE([asm],
 [AS_HELP_STRING([--disable-asm],
-[disable assembly usage @<:@default=enabled on supported 
plaforms@:>@])],
+[disable assembly usage @<:@default=enabled on supported 
platforms@:>@])],
 [enable_asm="$enableval"],
 [enable_asm=yes]
 )
@@ -2146,7 +2146,7 @@ dnl DEPRECATED: EGL Platforms configuration
 dnl
 AC_ARG_WITH([egl-platforms],
 [AS_HELP_STRING([--with-egl-platforms@<:@=DIRS...@:>@],
-[DEPRECATED: use --with-plaforms instead@<:@default=auto@:>@])],
+[DEPRECATED: use --with-platforms instead@<:@default=auto@:>@])],
 [with_egl_platforms="$withval"],
 [with_egl_platforms=auto])
 
@@ -2161,7 +2161,7 @@ if test "x$with_egl_platforms" = xauto; then
 with_egl_platforms=""
 fi
 else
-AC_MSG_WARN([--with-egl-platforms is deprecated. Use --with-plaforms 
instead.])
+AC_MSG_WARN([--with-egl-platforms is deprecated. Use --with-platforms 
instead.])
 fi
 
 dnl
-- 
2.9.3

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] st/mesa: Fix missing-braces warning.

2017-04-12 Thread Vinson Lee
  CXX  state_tracker/st_glsl_to_nir.lo
state_tracker/st_glsl_to_nir.cpp:250:57: warning: suggest braces around 
initialization of subobject [-Wmissing-braces]
  nir_lower_wpos_ytransform_options wpos_options = {0};
^
{}

Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 src/mesa/state_tracker/st_glsl_to_nir.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp 
b/src/mesa/state_tracker/st_glsl_to_nir.cpp
index 674ccd07a4..e863bab4e7 100644
--- a/src/mesa/state_tracker/st_glsl_to_nir.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp
@@ -247,7 +247,7 @@ st_glsl_to_nir(struct st_context *st, struct gl_program 
*prog,
   static const gl_state_index wposTransformState[STATE_LENGTH] = {
  STATE_INTERNAL, STATE_FB_WPOS_Y_TRANSFORM
   };
-  nir_lower_wpos_ytransform_options wpos_options = {0};
+  nir_lower_wpos_ytransform_options wpos_options = { { 0 } };
   struct pipe_screen *pscreen = st->pipe->screen;
 
   memcpy(wpos_options.state_tokens, wposTransformState,
-- 
2.11.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] anv: provide anv_gem_busy() stub for the tests

2017-04-06 Thread Vinson Lee
On Thu, Apr 6, 2017 at 5:07 AM, Emil Velikov <emil.l.veli...@gmail.com> wrote:
> From: Emil Velikov <emil.veli...@collabora.com>
>
> Otherwise linking way fail.
>
> Cc: Jason Ekstrand <ja...@jlekstrand.net>
> Cc: Vinson Lee <v...@freedesktop.org>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100600
> Fixes: f195d40eca4 ("anv/device: Add a helper for querying whether a BO is 
> busy")
> Signed-off-by: Emil Velikov <emil.veli...@collabora.com>
> ---
> Using unreachable would also do it - just staying consistent with
> surrounding code.
> ---
>  src/intel/vulkan/anv_gem_stubs.c | 6 ++
>  1 file changed, 6 insertions(+)
>
> diff --git a/src/intel/vulkan/anv_gem_stubs.c 
> b/src/intel/vulkan/anv_gem_stubs.c
> index 74794d4ffe5..a63e96d52be 100644
> --- a/src/intel/vulkan/anv_gem_stubs.c
> +++ b/src/intel/vulkan/anv_gem_stubs.c
> @@ -81,6 +81,12 @@ anv_gem_userptr(struct anv_device *device, void *mem, 
> size_t size)
>  }
>
>  int
> +anv_gem_busy(struct anv_device *device, uint32_t gem_handle)
> +{
> +   return 0;
> +}
> +
> +int
>  anv_gem_wait(struct anv_device *device, uint32_t gem_handle, int64_t 
> *timeout_ns)
>  {
> return 0;
> --
> 2.11.1
>

Tested-by: Vinson Lee <v...@freedesktop.org>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] st/clover: Fix build after shrink of pipe_box

2017-04-04 Thread Vinson Lee
On Tue, Apr 4, 2017 at 6:20 PM, Aaron Watry <awa...@gmail.com> wrote:
> Fixes: 3dfe61e ("gallium: decrease the size of pipe_box - 24 -> 16 bytes")
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100569
> Signed-off-by: Aaron Watry <awa...@gmail.com>
> ---
>  src/gallium/state_trackers/clover/core/resource.cpp | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/gallium/state_trackers/clover/core/resource.cpp 
> b/src/gallium/state_trackers/clover/core/resource.cpp
> index 28fba1ac1a..79911771a0 100644
> --- a/src/gallium/state_trackers/clover/core/resource.cpp
> +++ b/src/gallium/state_trackers/clover/core/resource.cpp
> @@ -33,9 +33,9 @@ namespace {
> class box {
> public:
>box(const resource::vector , const resource::vector ) :
> - pipe({ (int)origin[0], (int)origin[1],
> -(int)origin[2], (int)size[0],
> -(int)size[1], (int)size[2] }) {
> +pipe({ (int)origin[0], (int16_t)origin[1],
> +   (int16_t)origin[2], (int)size[0],
> +   (int16_t)size[1], (int16_t)size[2] }) {
>}
>
>operator const pipe_box *() {
> --
> 2.11.0
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev

This patch fixes the build for me.

Tested-by: Vinson Lee <v...@freedesktop.org>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH v2] libgl-xlib: Link with libunwind.

2017-04-04 Thread Vinson Lee
Fix linking error.

  CXXLDlibGL.la
../../../../src/gallium/auxiliary/.libs/libgallium.a(u_debug_stack.o): In 
function `debug_backtrace_capture':
src/gallium/auxiliary/util/u_debug_stack.c:59: undefined reference to 
`_Ux86_64_getcontext'
src/gallium/auxiliary/util/u_debug_stack.c:60: undefined reference to 
`_ULx86_64_init_local'
src/gallium/auxiliary/util/u_debug_stack.c:62: undefined reference to 
`_ULx86_64_step'
src/gallium/auxiliary/util/u_debug_stack.c:71: undefined reference to 
`_ULx86_64_get_proc_info'
src/gallium/auxiliary/util/u_debug_stack.c:73: undefined reference to 
`_ULx86_64_get_proc_name'
src/gallium/auxiliary/util/u_debug_stack.c:65: undefined reference to 
`_ULx86_64_step'

Fixes: 70c272004f72 ("gallium/util: libunwind support")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100562
Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 src/gallium/targets/libgl-xlib/Makefile.am | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/targets/libgl-xlib/Makefile.am 
b/src/gallium/targets/libgl-xlib/Makefile.am
index 6f966c3aebe2..d2fd2ed7b686 100644
--- a/src/gallium/targets/libgl-xlib/Makefile.am
+++ b/src/gallium/targets/libgl-xlib/Makefile.am
@@ -73,7 +73,8 @@ lib@GL_LIB@_la_LIBADD = \
$(top_builddir)/src/gallium/auxiliary/libgallium.la \
$(SHARED_GLAPI_LIB) \
$(GL_LIB_DEPS) \
-   $(CLOCK_LIB)
+   $(CLOCK_LIB) \
+   $(LIBUNWIND_LIBS)
 
 if HAVE_GALLIUM_LLVM
 lib@GL_LIB@_la_LIBADD += 
$(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la $(LLVM_LIBS)
-- 
2.9.3

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] libgl-xlib: Link with libunwind.

2017-04-04 Thread Vinson Lee
From: Vinson Lee <v...@dropbox.com>

Fix linking error.

  CXXLDlibGL.la
../../../../src/gallium/auxiliary/.libs/libgallium.a(u_debug_stack.o): In 
function `debug_backtrace_capture':
src/gallium/auxiliary/util/u_debug_stack.c:59: undefined reference to 
`_Ux86_64_getcontext'
src/gallium/auxiliary/util/u_debug_stack.c:60: undefined reference to 
`_ULx86_64_init_local'
src/gallium/auxiliary/util/u_debug_stack.c:62: undefined reference to 
`_ULx86_64_step'
src/gallium/auxiliary/util/u_debug_stack.c:71: undefined reference to 
`_ULx86_64_get_proc_info'
src/gallium/auxiliary/util/u_debug_stack.c:73: undefined reference to 
`_ULx86_64_get_proc_name'
src/gallium/auxiliary/util/u_debug_stack.c:65: undefined reference to 
`_ULx86_64_step'

Fixes: 70c272004f72 ("gallium/util: libunwind support")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100562
Signed-off-by: Vinson Lee <v...@dropbox.com>
---
 src/gallium/targets/libgl-xlib/Makefile.am | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/targets/libgl-xlib/Makefile.am 
b/src/gallium/targets/libgl-xlib/Makefile.am
index 6f966c3aebe2..d2fd2ed7b686 100644
--- a/src/gallium/targets/libgl-xlib/Makefile.am
+++ b/src/gallium/targets/libgl-xlib/Makefile.am
@@ -73,7 +73,8 @@ lib@GL_LIB@_la_LIBADD = \
$(top_builddir)/src/gallium/auxiliary/libgallium.la \
$(SHARED_GLAPI_LIB) \
$(GL_LIB_DEPS) \
-   $(CLOCK_LIB)
+   $(CLOCK_LIB) \
+   $(LIBUNWIND_LIBS)
 
 if HAVE_GALLIUM_LLVM
 lib@GL_LIB@_la_LIBADD += 
$(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la $(LLVM_LIBS)
-- 
2.9.3

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] st/mesa: Fix missing-braces warning.

2017-03-31 Thread Vinson Lee
  CXX  state_tracker/st_glsl_to_nir.lo
state_tracker/st_glsl_to_nir.cpp:250:57: warning: suggest braces around 
initialization of subobject [-Wmissing-braces]
  nir_lower_wpos_ytransform_options wpos_options = {0};
^
{}

Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 src/mesa/state_tracker/st_glsl_to_nir.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp 
b/src/mesa/state_tracker/st_glsl_to_nir.cpp
index 674ccd07a4..e863bab4e7 100644
--- a/src/mesa/state_tracker/st_glsl_to_nir.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp
@@ -247,7 +247,7 @@ st_glsl_to_nir(struct st_context *st, struct gl_program 
*prog,
   static const gl_state_index wposTransformState[STATE_LENGTH] = {
  STATE_INTERNAL, STATE_FB_WPOS_Y_TRANSFORM
   };
-  nir_lower_wpos_ytransform_options wpos_options = {0};
+  nir_lower_wpos_ytransform_options wpos_options = { { 0 } };
   struct pipe_screen *pscreen = st->pipe->screen;
 
   memcpy(wpos_options.state_tokens, wposTransformState,
-- 
2.11.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 5/7] docs/releasing: added relevant people for build/check with Windows

2017-03-27 Thread Vinson Lee
On Mon, Mar 27, 2017 at 11:48 AM, Andres Gomez <ago...@igalia.com> wrote:
> Signed-off-by: Andres Gomez <ago...@igalia.com>
> Cc: Emil Velikov <emil.veli...@collabora.com>
> Cc: Vinson Lee <v...@freedesktop.org>
> ---
>  docs/releasing.html | 5 +
>  1 file changed, 5 insertions(+)
>
> diff --git a/docs/releasing.html b/docs/releasing.html
> index ea0088342f8..6c2740f1a82 100644
> --- a/docs/releasing.html
> +++ b/docs/releasing.html
> @@ -133,6 +133,11 @@ Github integration.
>  
>
>  
> +For Windows related changes, currently a good contact point is Vinson
> +Lee.
> +
> +
> +
>  Note: If a patch in the current queue needs any additional
>  fix(es), then they should be squashed together.
>  
> --
> 2.11.0
>

Hi.

I'm not the right contact person. I suggest either Brian Paul, Jose
Fonseca, or someone else from VMware might be more appropriate.

Cheers,
Vinson
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] glsl: Link tests with CLOCK_LIB.

2017-03-22 Thread Vinson Lee
On Wed, Mar 22, 2017 at 4:17 PM, Timothy Arceri <tarc...@itsqueeze.com> wrote:
> On 23/03/17 09:29, Vinson Lee wrote:
>>
>> Fix 'make check' linking errors on CentOS 6.
>
>
> Hi Vinson,
>
> Red Hat Enterprise Linux 6 enters Production Phase 3 on May 10, 2017. I've
> confirmed with Dave this means no more Mesa backports. Perhaps you
> might want to consider moving to testing CentOS 7?
>
> From what I can tell this should also fix the zlib min version problem.
>
>

Hi, Timothy.

I don't think this is a CentOS 6 specific issue but an issue with
older GCC, such as GCC 4.4.

Will we remove build support with GCC 4.4 soon as well?

>>
>>   CXXLD  glsl/glsl_test
>> glsl/.libs/libglsl.a(libmesautil_la-u_queue.o): In function
>> `u_thread_get_time_nano':
>> src/util/../../src/util/u_thread.h:84: undefined reference to
>> `clock_gettime'
>>
>> Signed-off-by: Vinson Lee <v...@freedesktop.org>
>> ---
>>  src/compiler/Makefile.glsl.am |9 ++---
>>  1 files changed, 6 insertions(+), 3 deletions(-)
>>
>> diff --git a/src/compiler/Makefile.glsl.am b/src/compiler/Makefile.glsl.am
>> index 761fb93..43fd6a9 100644
>> --- a/src/compiler/Makefile.glsl.am
>> +++ b/src/compiler/Makefile.glsl.am
>> @@ -66,7 +66,8 @@ glsl_tests_cache_test_CFLAGS =
>> \
>> $(PTHREAD_CFLAGS)
>>  glsl_tests_cache_test_LDADD =  \
>> glsl/libglsl.la \
>> -   $(PTHREAD_LIBS)
>> +   $(PTHREAD_LIBS) \
>> +   $(CLOCK_LIB)
>>
>>  glsl_tests_general_ir_test_SOURCES =   \
>> glsl/tests/array_refcount_test.cpp  \
>> @@ -83,7 +84,8 @@ glsl_tests_general_ir_test_LDADD =\
>> glsl/libglsl.la \
>> glsl/libstandalone.la   \
>> $(top_builddir)/src/libglsl_util.la \
>> -   $(PTHREAD_LIBS)
>> +   $(PTHREAD_LIBS) \
>> +   $(CLOCK_LIB)
>>
>>  glsl_tests_uniform_initializer_test_SOURCES =  \
>> glsl/tests/copy_constant_to_storage_tests.cpp   \
>> @@ -159,7 +161,8 @@ glsl_glsl_test_LDADD =
>> \
>> glsl/libglsl.la \
>> glsl/libstandalone.la   \
>> $(top_builddir)/src/libglsl_util.la \
>> -   $(PTHREAD_LIBS)
>> +   $(PTHREAD_LIBS) \
>> +   $(CLOCK_LIB)
>>
>>  # We write our own rules for yacc and lex below. We'd rather use
>> automake,
>>  # but automake makes it especially difficult for a number of reasons:
>>
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] st/mesa: Fix missing-braces warning.

2017-03-22 Thread Vinson Lee
  CXX  state_tracker/st_glsl_to_nir.lo
state_tracker/st_glsl_to_nir.cpp:250:57: warning: suggest braces around 
initialization of subobject [-Wmissing-braces]
  nir_lower_wpos_ytransform_options wpos_options = {0};
^
{}

Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 src/mesa/state_tracker/st_glsl_to_nir.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp 
b/src/mesa/state_tracker/st_glsl_to_nir.cpp
index 674ccd07a4..e863bab4e7 100644
--- a/src/mesa/state_tracker/st_glsl_to_nir.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp
@@ -247,7 +247,7 @@ st_glsl_to_nir(struct st_context *st, struct gl_program 
*prog,
   static const gl_state_index wposTransformState[STATE_LENGTH] = {
  STATE_INTERNAL, STATE_FB_WPOS_Y_TRANSFORM
   };
-  nir_lower_wpos_ytransform_options wpos_options = {0};
+  nir_lower_wpos_ytransform_options wpos_options = { { 0 } };
   struct pipe_screen *pscreen = st->pipe->screen;
 
   memcpy(wpos_options.state_tokens, wposTransformState,
-- 
2.11.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] glsl: Link tests with CLOCK_LIB.

2017-03-22 Thread Vinson Lee
Fix 'make check' linking errors on CentOS 6.

  CXXLD  glsl/glsl_test
glsl/.libs/libglsl.a(libmesautil_la-u_queue.o): In function 
`u_thread_get_time_nano':
src/util/../../src/util/u_thread.h:84: undefined reference to `clock_gettime'

Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 src/compiler/Makefile.glsl.am |9 ++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/compiler/Makefile.glsl.am b/src/compiler/Makefile.glsl.am
index 761fb93..43fd6a9 100644
--- a/src/compiler/Makefile.glsl.am
+++ b/src/compiler/Makefile.glsl.am
@@ -66,7 +66,8 @@ glsl_tests_cache_test_CFLAGS =
\
$(PTHREAD_CFLAGS)
 glsl_tests_cache_test_LDADD =  \
glsl/libglsl.la \
-   $(PTHREAD_LIBS)
+   $(PTHREAD_LIBS) \
+   $(CLOCK_LIB)
 
 glsl_tests_general_ir_test_SOURCES =   \
glsl/tests/array_refcount_test.cpp  \
@@ -83,7 +84,8 @@ glsl_tests_general_ir_test_LDADD =\
glsl/libglsl.la \
glsl/libstandalone.la   \
$(top_builddir)/src/libglsl_util.la \
-   $(PTHREAD_LIBS)
+   $(PTHREAD_LIBS) \
+   $(CLOCK_LIB)
 
 glsl_tests_uniform_initializer_test_SOURCES =  \
glsl/tests/copy_constant_to_storage_tests.cpp   \
@@ -159,7 +161,8 @@ glsl_glsl_test_LDADD =  
\
glsl/libglsl.la \
glsl/libstandalone.la   \
$(top_builddir)/src/libglsl_util.la \
-   $(PTHREAD_LIBS)
+   $(PTHREAD_LIBS) \
+   $(CLOCK_LIB)
 
 # We write our own rules for yacc and lex below. We'd rather use automake,
 # but automake makes it especially difficult for a number of reasons:
-- 
1.7.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] glsl: Link glsl_compiler with CLOCK_LIB.

2017-03-21 Thread Vinson Lee
Fix linking error with build.

  CXXLD  glsl_compiler
glsl/.libs/libstandalone.a(lt16-libmesautil_la-u_queue.o): In function 
`u_thread_get_time_nano':
src/util/../../src/util/u_thread.h:84: undefined reference to `clock_gettime'

Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 src/compiler/Makefile.glsl.am |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/compiler/Makefile.glsl.am b/src/compiler/Makefile.glsl.am
index f7be5eb..761fb93 100644
--- a/src/compiler/Makefile.glsl.am
+++ b/src/compiler/Makefile.glsl.am
@@ -147,7 +147,8 @@ glsl_compiler_SOURCES = \
glsl/main.cpp
 
 glsl_compiler_LDADD = \
-   glsl/libstandalone.la
+   glsl/libstandalone.la \
+   $(CLOCK_LIB)
 
 glsl_glsl_test_SOURCES = \
glsl/test.cpp \
-- 
1.7.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH v2] configure.ac: Use POSIX word boundary regex.

2017-03-17 Thread Vinson Lee
Fixes: fe56c745b8cb ("Convert sed(1) syntax to be compatible with FreeBSD and 
OpenBSD")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100236
Suggested-by: Jan Beich <jbe...@freebsd.org>
Suggested-by: Michel Dänzer <mic...@daenzer.net>
Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 configure.ac | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/configure.ac b/configure.ac
index 8c9d756f294e..dbf0bf83185b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -907,19 +907,19 @@ llvm_add_target() {
 # Call this inside ` ` to get the return value.
 # $1 is the llvm-config command with arguments.
 strip_unwanted_llvm_flags() {
-# Use \> (marks the end of the word)
-echo " `$1`" | sed -E \
+echo " `$1` " | sed -E \
 -e 's/[[[:space:]]]+-m[[^[:space:]]]*//g' \
--e 's/[[[:space:]]]+-DNDEBUG\>//g' \
--e 's/[[[:space:]]]+-D_GNU_SOURCE\>//g' \
--e 's/[[[:space:]]]+-pedantic\>//g' \
+-e 's/[[[:space:]]]+-DNDEBUG[[[:space:]]]//g' \
+-e 's/[[[:space:]]]+-D_GNU_SOURCE[[[:space:]]]//g' \
+-e 's/[[[:space:]]]+-pedantic[[[:space:]]]//g' \
 -e 's/[[[:space:]]]+-W[[^[:space:]]]*//g' \
 -e 's/[[[:space:]]]+-O[[^[:space:]]]*//g' \
 -e 's/[[[:space:]]]+-g[[^[:space:]]]*//g' \
--e 's/-fno-rtti\>/-Fno-rtti/g' \
+-e 's/-fno-rtti[[[:space:]]]/-Fno-rtti /g' \
 -e 's/[[[:space:]]]+-f[[^[:space:]]]*//g' \
--e 's/-Fno-rtti\>/-fno-rtti/g' \
--e 's/^[[[:space:]]]//'
+-e 's/-Fno-rtti[[[:space:]]]/-fno-rtti /g' \
+-e 's/^[[[:space:]]]//' \
+-e 's/[[[:space:]]]$//'
 }
 
 llvm_set_environment_variables() {
-- 
2.12.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] nir: Add positional argument specifiers.

2017-03-17 Thread Vinson Lee
Fix build with Python < 2.7.

  File "src/compiler/nir/nir_builder_opcodes_h.py", line 46, in 
from nir_opcodes import opcodes
  File "src/compiler/nir/nir_opcodes.py", line 178, in 
unop_convert("{}2{}{}".format(src_t[0], dst_t[0], bit_size),
ValueError: zero length field name in format

Fixes: 762a6333f21f ("nir: Rework conversion opcodes")
Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 src/compiler/nir/nir_opcodes.py   |2 +-
 src/compiler/nir/nir_opcodes_c.py |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/compiler/nir/nir_opcodes.py b/src/compiler/nir/nir_opcodes.py
index 52868d5..98692da 100644
--- a/src/compiler/nir/nir_opcodes.py
+++ b/src/compiler/nir/nir_opcodes.py
@@ -175,7 +175,7 @@ for src_t in [tint, tuint, tfloat]:
 
for dst_t in dst_types:
   for bit_size in [32, 64]:
- unop_convert("{}2{}{}".format(src_t[0], dst_t[0], bit_size),
+ unop_convert("{0}2{1}{2}".format(src_t[0], dst_t[0], bit_size),
   dst_t + str(bit_size), src_t, "src0")
 
 # We'll hand-code the to/from bool conversion opcodes.  Because bool doesn't
diff --git a/src/compiler/nir/nir_opcodes_c.py 
b/src/compiler/nir/nir_opcodes_c.py
index c66f3bc..a1db54f 100644
--- a/src/compiler/nir/nir_opcodes_c.py
+++ b/src/compiler/nir/nir_opcodes_c.py
@@ -64,7 +64,7 @@ nir_type_conversion_op(nir_alu_type src, nir_alu_type dst)
switch (dst_bit_size) {
 % for dst_bits in [32, 64]:
   case ${dst_bits}:
- return ${'nir_op_{}2{}{}'.format(src_t[0], dst_t[0], 
dst_bits)};
+ return ${'nir_op_{0}2{1}{2}'.format(src_t[0], dst_t[0], 
dst_bits)};
 % endfor
   default:
  unreachable("Invalid nir alu bit size");
-- 
1.7.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] configure.ac: Use POSIX word boundary regex.

2017-03-16 Thread Vinson Lee
Fixes: fe56c745b8cb ("Convert sed(1) syntax to be compatible with FreeBSD and 
OpenBSD")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100236
Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 configure.ac | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 8c9d756f294e..684c0e6fcaed 100644
--- a/configure.ac
+++ b/configure.ac
@@ -907,18 +907,18 @@ llvm_add_target() {
 # Call this inside ` ` to get the return value.
 # $1 is the llvm-config command with arguments.
 strip_unwanted_llvm_flags() {
-# Use \> (marks the end of the word)
+# Use [[:>:]] (marks the end of the word)
 echo " `$1`" | sed -E \
 -e 's/[[[:space:]]]+-m[[^[:space:]]]*//g' \
--e 's/[[[:space:]]]+-DNDEBUG\>//g' \
+-e 's/[[[:space:]]]+-DNDEBUG[[[:>:]]]//g' \
 -e 's/[[[:space:]]]+-D_GNU_SOURCE\>//g' \
--e 's/[[[:space:]]]+-pedantic\>//g' \
+-e 's/[[[:space:]]]+-pedantic[[[:>:]]]//g' \
 -e 's/[[[:space:]]]+-W[[^[:space:]]]*//g' \
 -e 's/[[[:space:]]]+-O[[^[:space:]]]*//g' \
 -e 's/[[[:space:]]]+-g[[^[:space:]]]*//g' \
--e 's/-fno-rtti\>/-Fno-rtti/g' \
+-e 's/-fno-rtti[[[:>:]]]/-Fno-rtti/g' \
 -e 's/[[[:space:]]]+-f[[^[:space:]]]*//g' \
--e 's/-Fno-rtti\>/-fno-rtti/g' \
+-e 's/-Fno-rtti[[[:>:]]]/-fno-rtti/g' \
 -e 's/^[[[:space:]]]//'
 }
 
-- 
2.12.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] swr: s/uint/enum pipe_render_cond_flag/

2017-03-08 Thread Vinson Lee
Fix build error.

swr_context.cpp: In function ‘void swr_blit(pipe_context*, const 
pipe_blit_info*)’:
swr_context.cpp:336:44: error: invalid conversion from ‘uint {aka unsigned 
int}’ to ‘pipe_render_cond_flag’ [-fpermissive]
   ctx->render_cond_mode);
   ~^~~~

Fixes: b0d39384307d ("gallium: s/uint/enum pipe_render_cond_flag/ for 
set_render_condition()")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100133
Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 src/gallium/drivers/swr/swr_context.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/swr/swr_context.h 
b/src/gallium/drivers/swr/swr_context.h
index 46ca6112f91d..be65a20c85b7 100644
--- a/src/gallium/drivers/swr/swr_context.h
+++ b/src/gallium/drivers/swr/swr_context.h
@@ -141,7 +141,7 @@ struct swr_context {
 
/** Conditional query object and mode */
struct pipe_query *render_cond_query;
-   uint render_cond_mode;
+   enum pipe_render_cond_flag render_cond_mode;
boolean render_cond_cond;
unsigned active_queries;
 
-- 
2.9.3

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] configure.ac: Allowing building without shader cache without zlib.

2017-03-08 Thread Vinson Lee
On Sat, Mar 4, 2017 at 3:42 PM, Emil Velikov <emil.l.veli...@gmail.com> wrote:
> On 4 March 2017 at 22:43, Vinson Lee <v...@freedesktop.org> wrote:
>> On Sat, Mar 4, 2017 at 5:24 PM, Emil Velikov <emil.l.veli...@gmail.com> 
>> wrote:
>>> On 4 March 2017 at 22:13, Vinson Lee <v...@freedesktop.org> wrote:
>>>> Fixes: 85a9b1b562b6 ("util/disk_cache: compress individual cache entries")
>>>> Signed-off-by: Vinson Lee <v...@freedesktop.org>
>>>> ---
>>>>  configure.ac | 3 +--
>>>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>>>
>>>> diff --git a/configure.ac b/configure.ac
>>>> index 943bc05adcd6..3526849b6dd2 100644
>>>> --- a/configure.ac
>>>> +++ b/configure.ac
>>>> @@ -786,7 +786,7 @@ dnl See if posix_memalign is available
>>>>  AC_CHECK_FUNC([posix_memalign], [DEFINES="$DEFINES 
>>>> -DHAVE_POSIX_MEMALIGN"])
>>>>
>>>>  dnl Check for zlib
>>>> -PKG_CHECK_MODULES([ZLIB], [zlib >= $ZLIB_REQUIRED])
>>>> +PKG_CHECK_MODULES([ZLIB], [zlib >= $ZLIB_REQUIRED], [DEFINES="$DEFINES 
>>>> -DENABLE_SHADER_CACHE"], [:])
>>>>
>>> Why - is it causing breakage or any system ?
>>>
>>> Afaict we really want to have this tested thoroughly and silently
>>> disabling it is a very bad idea.
>>>
>>> -Emil
>>
>> Older distros have a zlib older than 1.2.8.
>
> Tim I think you had something in mind about such cases, hehe ;-)
>
> But seriously, seems like enterprise Linuxes are stuck with very old ones:
> RHEL4 - 1.2.1
> RHEL 5/6 - 1.2.3
> SLES 10/11 - 1.2.3
>
> Tim, I'll leave the rest to you - how/worth using third party package,
> dropping to 1.2.3 or other ?
> I'm leaning towards 1.2.3, unless there's some serious down sides with it.
>
> -Emil

Is downgrading to zlib 1.2.3 okay? Otherwise, can we add support to
not build the shader cache in the autoconf build?
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] configure.ac: Allowing building without shader cache without zlib.

2017-03-04 Thread Vinson Lee
On Sat, Mar 4, 2017 at 5:24 PM, Emil Velikov <emil.l.veli...@gmail.com> wrote:
> On 4 March 2017 at 22:13, Vinson Lee <v...@freedesktop.org> wrote:
>> Fixes: 85a9b1b562b6 ("util/disk_cache: compress individual cache entries")
>> Signed-off-by: Vinson Lee <v...@freedesktop.org>
>> ---
>>  configure.ac | 3 +--
>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/configure.ac b/configure.ac
>> index 943bc05adcd6..3526849b6dd2 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -786,7 +786,7 @@ dnl See if posix_memalign is available
>>  AC_CHECK_FUNC([posix_memalign], [DEFINES="$DEFINES -DHAVE_POSIX_MEMALIGN"])
>>
>>  dnl Check for zlib
>> -PKG_CHECK_MODULES([ZLIB], [zlib >= $ZLIB_REQUIRED])
>> +PKG_CHECK_MODULES([ZLIB], [zlib >= $ZLIB_REQUIRED], [DEFINES="$DEFINES 
>> -DENABLE_SHADER_CACHE"], [:])
>>
> Why - is it causing breakage or any system ?
>
> Afaict we really want to have this tested thoroughly and silently
> disabling it is a very bad idea.
>
> -Emil

Older distros have a zlib older than 1.2.8.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] configure.ac: Allowing building without shader cache without zlib.

2017-03-04 Thread Vinson Lee
Fixes: 85a9b1b562b6 ("util/disk_cache: compress individual cache entries")
Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 configure.ac | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 943bc05adcd6..3526849b6dd2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -786,7 +786,7 @@ dnl See if posix_memalign is available
 AC_CHECK_FUNC([posix_memalign], [DEFINES="$DEFINES -DHAVE_POSIX_MEMALIGN"])
 
 dnl Check for zlib
-PKG_CHECK_MODULES([ZLIB], [zlib >= $ZLIB_REQUIRED])
+PKG_CHECK_MODULES([ZLIB], [zlib >= $ZLIB_REQUIRED], [DEFINES="$DEFINES 
-DENABLE_SHADER_CACHE"], [:])
 
 dnl Check for pthreads
 AX_PTHREAD
@@ -1807,7 +1807,6 @@ if test -n "$with_vulkan_drivers"; then
 fi
 
 
-DEFINES="$DEFINES -DENABLE_SHADER_CACHE"
 AM_CONDITIONAL(NEED_MEGADRIVER, test -n "$DRI_DIRS")
 AM_CONDITIONAL(NEED_LIBMESA, test "x$enable_glx" = xxlib -o \
   "x$enable_osmesa" = xyes -o \
-- 
2.12.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] glx/tests: Fix bash-specific code in dispatch-index-check

2017-02-24 Thread Vinson Lee
On Fri, Feb 24, 2017 at 8:03 PM, Aaron Watry <awa...@gmail.com> wrote:
> Using <<< for variable redirection is bash-specific behavior.
> Ubuntu redirects sh -> dash, so this was erroring out.
>
> Also, the initial error that led me to this was that srcdir is null when 
> running make check
> so I just copied something similar to what the optimization-test script does.
> ---
>  src/glx/tests/dispatch-index-check | 21 ++---
>  1 file changed, 14 insertions(+), 7 deletions(-)
>
> diff --git a/src/glx/tests/dispatch-index-check 
> b/src/glx/tests/dispatch-index-check
> index 78464b8..ee1b9ee 100755
> --- a/src/glx/tests/dispatch-index-check
> +++ b/src/glx/tests/dispatch-index-check
> @@ -1,24 +1,31 @@
>  #!/bin/sh
>
> +if [ -z "$srcdir" ]; then
> +   scriptdir=`dirname "$0"`
> +else
> +   scriptdir=$srcdir
> +fi
> +
> +
>  # extract enum definition
>  dispatch_list=$(sed '/__GLXdispatchIndex/,/__GLXdispatchIndex/!d' \
> -  "$srcdir"/../g_glxglvnddispatchindices.h)
> +  "$scriptdir"/../g_glxglvnddispatchindices.h)
>
>  # extract values inside of enum
> -dispatch_list=$(sed '1d;$d' <<< "$dispatch_list")
> +dispatch_list=$(printf "$dispatch_list" | sed '1d;$d')
>
>  # remove indentation
> -dispatch_list=$(sed 's/^\s\+//' <<< "$dispatch_list")
> +dispatch_list=$(printf "$dispatch_list" | sed 's/^\s\+//')
>
>  # extract function names
> -dispatch_list=$(sed 's/DI_//;s/,//' <<< "$dispatch_list")
> +dispatch_list=$(printf "$dispatch_list" | sed 's/DI_//;s/,//')
>
>  # same for commented functions, we want to keep them sorted too
> -dispatch_list=$(sed 's#// ##;s/ implemented by [a-z]\+//' <<< 
> "$dispatch_list")
> +dispatch_list=$(printf "$dispatch_list" | sed 's#// ##;s/ implemented by 
> [a-z]\+//')
>
>  # remove LAST_INDEX, as it will not be in alphabetical order
> -dispatch_list=$(sed '/LAST_INDEX/d' <<< "$dispatch_list")
> +dispatch_list=$(printf "$dispatch_list" | sed '/LAST_INDEX/d')
>
> -sorted=$(LC_ALL=C sort <<< "$dispatch_list")
> +sorted=$(LC_ALL=C printf "$dispatch_list" | sort)
>
>  test "$dispatch_list" = "$sorted"
> --
> 2.9.3
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Fixes: 3cc33e764011 ("glx: add GLXdispatchIndex sort check")

Tested-by: Vinson Lee <v...@freedesktop.org>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] st/nine: Remove code for no USER_INDEX_BUFFERS as these are always on

2017-02-24 Thread Vinson Lee
On Fri, Feb 24, 2017 at 9:23 PM, Mike Lothian <m...@fireburn.co.uk> wrote:
> This fixes 4a883966c1f74f43afc145d2c3d27af7b8c5e01a where the pipe cap
> was removed
>
> Now USER_INDEX_BUFFERS are always enabled remove code that checks for
> them and works around them not being available
>
> Signed-off-by: Mike Lothian <m...@fireburn.co.uk>
> Cc: Marek Olšák <marek.ol...@amd.com>
> Cc: Axel Davy <axel.d...@ens.fr>
> ---
>  src/gallium/state_trackers/nine/device9.c | 17 -
>  1 file changed, 17 deletions(-)
>
> diff --git a/src/gallium/state_trackers/nine/device9.c 
> b/src/gallium/state_trackers/nine/device9.c
> index b9b7a637d7..2217cc9d0c 100644
> --- a/src/gallium/state_trackers/nine/device9.c
> +++ b/src/gallium/state_trackers/nine/device9.c
> @@ -473,7 +473,6 @@ NineDevice9_ctor( struct NineDevice9 *This,
>  /* Allocate upload helper for drivers that suck (from st pov ;). */
>
>  This->driver_caps.user_vbufs = GET_PCAP(USER_VERTEX_BUFFERS) && 
> !This->csmt_active;
> -This->driver_caps.user_ibufs = GET_PCAP(USER_INDEX_BUFFERS) && 
> !This->csmt_active;
>  This->driver_caps.user_cbufs = GET_PCAP(USER_CONSTANT_BUFFERS);
>  This->driver_caps.user_sw_vbufs = 
> This->screen_sw->get_param(This->screen_sw, PIPE_CAP_USER_VERTEX_BUFFERS);
>  This->driver_caps.user_sw_cbufs = 
> This->screen_sw->get_param(This->screen_sw, PIPE_CAP_USER_CONSTANT_BUFFERS);
> @@ -488,11 +487,6 @@ NineDevice9_ctor( struct NineDevice9 *This,
>  PIPE_BIND_VERTEX_BUFFER, 
> PIPE_USAGE_STREAM);
>  This->vertex_sw_uploader = u_upload_create(This->pipe_sw, 65536,
>  PIPE_BIND_VERTEX_BUFFER, 
> PIPE_USAGE_STREAM);
> -if (!This->driver_caps.user_ibufs)
> -This->index_uploader = u_upload_create(This->csmt_active ?
> -This->pipe_secondary : 
> This->context.pipe,
> -   128 * 1024,
> -   PIPE_BIND_INDEX_BUFFER, 
> PIPE_USAGE_STREAM);
>  if (!This->driver_caps.user_cbufs) {
>  This->constbuf_alignment = 
> GET_PCAP(CONSTANT_BUFFER_OFFSET_ALIGNMENT);
>  This->constbuf_uploader = u_upload_create(This->context.pipe, 
> This->vs_const_size,
> @@ -2928,17 +2922,6 @@ NineDevice9_DrawIndexedPrimitiveUP( struct NineDevice9 
> *This,
>  vbuf.buffer_offset -= base;
>  vbuf.user_buffer = NULL;
>  }
> -if (!This->driver_caps.user_ibufs) {
> -u_upload_data(This->index_uploader,
> -  0,
> -  (prim_count_to_vertex_count(PrimitiveType, 
> PrimitiveCount)) * ibuf.index_size,
> -  4,
> -  ibuf.user_buffer,
> -  ,
> -  );
> -u_upload_unmap(This->index_uploader);
> -ibuf.user_buffer = NULL;
> -}
>
>  NineBeforeDraw(This);
>  nine_context_draw_indexed_primitive_from_vtxbuf_idxbuf(This, 
> PrimitiveType,
> --
> 2.11.1
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99953
Fixes: 4a883966c1f7 ("gallium: remove PIPE_CAP_USER_INDEX_BUFFERS")

Tested-by: Vinson Lee <v...@freedesktop.org>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] glsl: Fix missing-braces warning.

2017-02-23 Thread Vinson Lee
  CXXglsl/ast_to_hir.lo
glsl/ast_to_hir.cpp: In member function 'virtual ir_rvalue* 
ast_declarator_list::hir(exec_list*, _mesa_glsl_parse_state*)':
glsl/ast_to_hir.cpp:4846:42: warning: missing braces around initializer for 
'unsigned int [16]' [-Wmissing-braces]

Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 src/compiler/glsl/ast_to_hir.cpp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp
index b90ad97b1de4..f148db8617d6 100644
--- a/src/compiler/glsl/ast_to_hir.cpp
+++ b/src/compiler/glsl/ast_to_hir.cpp
@@ -4843,7 +4843,7 @@ ast_declarator_list::hir(exec_list *instructions,
   if ((var->data.mode == ir_var_auto || var->data.mode == ir_var_temporary)
   && (var->type->is_numeric() || var->type->is_boolean())
   && state->zero_init) {
- const ir_constant_data data = {0};
+ const ir_constant_data data = { { 0 } };
  var->data.has_initializer = true;
  var->constant_initializer = new(var) ir_constant(var->type, );
   }
-- 
1.7.9.5

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] util/disk_cache: Use backward compatible st_mtime.

2017-02-23 Thread Vinson Lee
Fix Mac OS X build error.

  CC   libmesautil_la-disk_cache.lo
In file included from disk_cache.c:46:
./disk_cache.h:57:20: error: no member named 'st_mtim' in 'struct stat'
   *timestamp = st.st_mtim.tv_sec;
~~ ^

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99918
Fixes: 207e3a6e4b ("util/radv: move *_get_function_timestamp() to utils")
Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 src/util/disk_cache.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/disk_cache.h b/src/util/disk_cache.h
index 7f4da809cc..b7c0df25dd 100644
--- a/src/util/disk_cache.h
+++ b/src/util/disk_cache.h
@@ -54,7 +54,7 @@ disk_cache_get_function_timestamp(void *ptr, uint32_t* 
timestamp)
if (stat(info.dli_fname, )) {
   return false;
}
-   *timestamp = st.st_mtim.tv_sec;
+   *timestamp = st.st_mtime;
return true;
 #else
return false;
-- 
2.11.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] glsl: Fix missing-braces warning.

2017-02-13 Thread Vinson Lee
  CXXglsl/ast_to_hir.lo
glsl/ast_to_hir.cpp: In member function 'virtual ir_rvalue* 
ast_declarator_list::hir(exec_list*, _mesa_glsl_parse_state*)':
glsl/ast_to_hir.cpp:4846:42: warning: missing braces around initializer for 
'unsigned int [16]' [-Wmissing-braces]

Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 src/compiler/glsl/ast_to_hir.cpp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp
index b90ad97b1de4..f148db8617d6 100644
--- a/src/compiler/glsl/ast_to_hir.cpp
+++ b/src/compiler/glsl/ast_to_hir.cpp
@@ -4843,7 +4843,7 @@ ast_declarator_list::hir(exec_list *instructions,
   if ((var->data.mode == ir_var_auto || var->data.mode == ir_var_temporary)
   && (var->type->is_numeric() || var->type->is_boolean())
   && state->zero_init) {
- const ir_constant_data data = {0};
+ const ir_constant_data data = { { 0 } };
  var->data.has_initializer = true;
  var->constant_initializer = new(var) ir_constant(var->type, );
   }
-- 
1.7.9.5

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] swr: [rasterizer core] Remove dead code Clipper::ClipScalar()

2017-02-04 Thread Vinson Lee
Tested-by: Vinson Lee <v...@freedesktop.org>

On Thu, Feb 2, 2017 at 12:42 PM, Cherniak, Bruce
<bruce.chern...@intel.com> wrote:
> I followed up with a v2 that includes the bugzilla reference.
>
> Good point, I’ll look into following up with a patch to remove Clip().
>
> Thanks for the quick review.
>
>> On Feb 2, 2017, at 2:26 PM, Ilia Mirkin <imir...@alum.mit.edu> wrote:
>>
>> Reviewed-by: Ilia Mirkin <imir...@alum.mit.edu>
>>
>> I got confused by this code as well when I was trying to understand
>> the clipper. I think the Clip() function can go too now in the .cpp
>> file (as well as the fwd decl in the header)?
>>
>> On Thu, Feb 2, 2017 at 3:15 PM, Bruce Cherniak <bruce.chern...@intel.com> 
>> wrote:
>>> Clipper::ClipScalar() is dead code and should be removed.  It is causing
>>> an error with gcc-7 because it references a now defunct member.
>>>
>>> CC: "13.0 17.0" <mesa-sta...@lists.freedesktop.org>
>>> ---
>>> src/gallium/drivers/swr/rasterizer/core/clip.h | 39 
>>> --
>>> 1 file changed, 39 deletions(-)
>>>
>>> diff --git a/src/gallium/drivers/swr/rasterizer/core/clip.h 
>>> b/src/gallium/drivers/swr/rasterizer/core/clip.h
>>> index 085e4a9..f19858f 100644
>>> --- a/src/gallium/drivers/swr/rasterizer/core/clip.h
>>> +++ b/src/gallium/drivers/swr/rasterizer/core/clip.h
>>> @@ -262,45 +262,6 @@ public:
>>> return _simd_movemask_ps(vClipCullMask);
>>> }
>>>
>>> -// clip a single primitive
>>> -int ClipScalar(PA_STATE& pa, uint32_t primIndex, float* pOutPos, 
>>> float* pOutAttribs)
>>> -{
>>> -OSALIGNSIMD(float) inVerts[3 * 4];
>>> -OSALIGNSIMD(float) inAttribs[3 * KNOB_NUM_ATTRIBUTES * 4];
>>> -
>>> -// transpose primitive position
>>> -__m128 verts[3];
>>> -pa.AssembleSingle(VERTEX_POSITION_SLOT, primIndex, verts);
>>> -_mm_store_ps([0], verts[0]);
>>> -_mm_store_ps([4], verts[1]);
>>> -_mm_store_ps([8], verts[2]);
>>> -
>>> -// transpose attribs
>>> -uint32_t numScalarAttribs = this->state.linkageCount * 4;
>>> -
>>> -int idx = 0;
>>> -DWORD slot = 0;
>>> -uint32_t mapIdx = 0;
>>> -uint32_t tmpLinkage = uint32_t(this->state.linkageMask);
>>> -while (_BitScanForward(, tmpLinkage))
>>> -{
>>> -tmpLinkage &= ~(1 << slot);
>>> -// Compute absolute attrib slot in vertex array
>>> -uint32_t inputSlot = VERTEX_ATTRIB_START_SLOT + 
>>> this->state.linkageMap[mapIdx++];
>>> -__m128 attrib[3];// triangle attribs (always 4 wide)
>>> -pa.AssembleSingle(inputSlot, primIndex, attrib);
>>> -_mm_store_ps([idx], attrib[0]);
>>> -_mm_store_ps([idx + numScalarAttribs], attrib[1]);
>>> -_mm_store_ps([idx + numScalarAttribs * 2], 
>>> attrib[2]);
>>> -idx += 4;
>>> -}
>>> -
>>> -int numVerts;
>>> -Clip(inVerts, inAttribs, numScalarAttribs, pOutPos, , 
>>> pOutAttribs);
>>> -
>>> -return numVerts;
>>> -}
>>> -
>>> // clip SIMD primitives
>>> void ClipSimd(const simdscalar& vPrimMask, const simdscalar& vClipMask, 
>>> PA_STATE& pa, const simdscalari& vPrimId, const simdscalari& vViewportIdx)
>>> {
>>> --
>>> 2.7.4
>>>
>>> ___
>>> mesa-dev mailing list
>>> mesa-dev@lists.freedesktop.org
>>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] configure: Only require libdrm 2.4.75 for intel.

2017-02-01 Thread Vinson Lee
On Wed, Feb 1, 2017 at 4:10 PM, Emil Velikov <emil.l.veli...@gmail.com> wrote:
> On 1 February 2017 at 23:28, Vinson Lee <v...@freedesktop.org> wrote:
>> Fixes: b8acb6b17981 ("configure: Require libdrm >= 2.4.75")
>> Signed-off-by: Vinson Lee <v...@freedesktop.org>
> Are you sure that's correct ?
>
> Afaict the follow-up commits make use of updated i915_drm.h which
> should be provided by your distro's libdrm-dev package.
> Or perhaps it used some new libdrm_intel functionality - can you list
> what flags up on your end ?
>
> -Emil

Yes, this allows me to build non-Intel drivers again with older
libdrm. Do any drivers other than Intel drivers need libdrm 2.4.75?
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] configure: Only require libdrm 2.4.75 for intel.

2017-02-01 Thread Vinson Lee
Fixes: b8acb6b17981 ("configure: Require libdrm >= 2.4.75")
Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 configure.ac | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 92339b4..d4302bf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -67,10 +67,10 @@ OPENCL_VERSION=1
 AC_SUBST([OPENCL_VERSION])
 
 dnl Versions for external dependencies
-LIBDRM_REQUIRED=2.4.75
+LIBDRM_REQUIRED=2.4.66
 LIBDRM_RADEON_REQUIRED=2.4.56
 LIBDRM_AMDGPU_REQUIRED=2.4.63
-LIBDRM_INTEL_REQUIRED=2.4.61
+LIBDRM_INTEL_REQUIRED=2.4.75
 LIBDRM_NVVIEUX_REQUIRED=2.4.66
 LIBDRM_NOUVEAU_REQUIRED=2.4.66
 LIBDRM_FREEDRENO_REQUIRED=2.4.74
-- 
2.10.2

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] nir: Fix anonymous union initialization with older GCC.

2017-01-08 Thread Vinson Lee
Fix this build error with GCC 4.4.7.

  CC nir/nir_opt_copy_prop_vars.lo
nir/nir_opt_copy_prop_vars.c: In function ‘copy_prop_vars_block’:
nir/nir_opt_copy_prop_vars.c:765: error: unknown field ‘deref’ specified in 
initializer
nir/nir_opt_copy_prop_vars.c:765: warning: missing braces around initializer
nir/nir_opt_copy_prop_vars.c:765: warning: (near initialization for 
‘(anonymous).’)
nir/nir_opt_copy_prop_vars.c:765: warning: initialization from incompatible 
pointer type

Fixes: 62332d139c8f ("nir: Add a local variable-based copy propagation pass")
Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 src/compiler/nir/nir_opt_copy_prop_vars.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/compiler/nir/nir_opt_copy_prop_vars.c 
b/src/compiler/nir/nir_opt_copy_prop_vars.c
index 8c24cd7..7f17469 100644
--- a/src/compiler/nir/nir_opt_copy_prop_vars.c
+++ b/src/compiler/nir/nir_opt_copy_prop_vars.c
@@ -762,7 +762,7 @@ copy_prop_vars_block(struct copy_prop_var_state *state,
  } else {
 value = (struct value) {
.is_ssa = false,
-   .deref = src,
+   { .deref = src },
 };
  }
 
-- 
1.7.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] configure.ac: Strip patch version from LLVM version.

2016-12-03 Thread Vinson Lee
Hi, Tobias.

/bin/llvm-config --includedir returns /include. I am
not setting the "--with-llvm-prefix" configure option.

Cheers,
Vinson


On Sat, Dec 3, 2016 at 1:46 PM, Tobias Droste <tdro...@gmx.de> wrote:
> Hi Vinson,
>
>
>
> why is LLVM_INCLUDEDIR not /include? How does this happen?
>
> Do you set "--with-llvm-prefix=" when building mesa?
>
>
>
> Tobias
>
>
>
> Am Samstag, 3. Dezember 2016, 11:53:53 CET schrieb Vinson Lee:
>
>> Hi, Tobias.
>
>>
>
>> I actually need this when using LLVM from a build tree and the header
>
>> files are not found. LLVM_INCLUDEDIR is /include and the
>
>> header files are in /include.
>
>>
>
>> Cheers,
>
>> Vinson
>
>>
>
>> On Sat, Dec 3, 2016 at 4:55 AM, Tobias Droste <tdro...@gmx.de> wrote:
>
>> > Hi Vinson,
>
>> >
>
>> > this should not be needed and is obsolete as soon as this gets merged
>
>> > (Emil?):
>
>> >
>> > https://lists.freedesktop.org/archives/mesa-dev/2016-November/135840.html
>
>> >
>
>> > Did you actually need this or were you just seeing that the code is
>> > wrong?
>
>> > Because LLVM >=3.1 has the header files and this code should never
>
>> > execute!
>
>> >
>
>> > Tobias
>
>> >
>
>> > Am Samstag, 3. Dezember 2016, 01:20:42 CET schrieb Vinson Lee:
>
>> >> HAVE_LLVM variable included the patch version if the LLVM version had a
>
>> >> patch version.
>
>> >>
>
>> >> For LLVM version '4.0.0', HAVE_LLVM would be '0x0400.0'.
>
>> >>
>
>> >> Fixes: 45574ab2e92f ("configure.ac: better detection of LLVM version")
>
>> >> Signed-off-by: Vinson Lee <v...@freedesktop.org>
>
>> >> ---
>
>> >>
>
>> >> configure.ac | 2 +-
>
>> >> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>> >>
>
>> >> diff --git a/configure.ac b/configure.ac
>
>> >> index f62bc61e5025..3b8b32485ae1 100644
>
>> >> --- a/configure.ac
>
>> >> +++ b/configure.ac
>
>> >> @@ -2195,7 +2195,7 @@ if test "x$enable_gallium_llvm" = xyes || test
>
>> >> "x$HAVE_RADEON_VULKAN" = xyes; th if test -n "${LLVM_VERSION_MAJOR}";
>
>> >> then
>
>> >>
>
>> >> LLVM_VERSION_INT="${LLVM_VERSION_MAJOR}0${LLVM_VERSION_MINOR
>
>> >> }"
>
>> >>
>
>> >> else
>
>> >>
>
>> >> - LLVM_VERSION_INT=`echo $LLVM_VERSION | sed -e
>
>> >> 's/\([[0-9]]\)\.\([[0-9]]\)/\10\2/g'` + LLVM_VERSION_INT=`echo
>
>> >> $LLVM_VERSION | sed -e 's/\([[0-9]]\)\.\([[0-9]]\).*/\10\2/g'` fi
>
>> >>
>
>> >> LLVM_REQUIRED_VERSION_MAJOR="3"
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] configure.ac: Strip patch version from LLVM version.

2016-12-03 Thread Vinson Lee
Hi, Tobias.

I actually need this when using LLVM from a build tree and the header
files are not found. LLVM_INCLUDEDIR is /include and the
header files are in /include.

Cheers,
Vinson

On Sat, Dec 3, 2016 at 4:55 AM, Tobias Droste <tdro...@gmx.de> wrote:
> Hi Vinson,
>
> this should not be needed and is obsolete as soon as this gets merged (Emil?):
> https://lists.freedesktop.org/archives/mesa-dev/2016-November/135840.html
>
> Did you actually need this or were you just seeing that the code is wrong?
> Because LLVM >=3.1 has the header files and this code should never execute!
>
> Tobias
>
> Am Samstag, 3. Dezember 2016, 01:20:42 CET schrieb Vinson Lee:
>> HAVE_LLVM variable included the patch version if the LLVM version had a
>> patch version.
>>
>> For LLVM version '4.0.0', HAVE_LLVM would be '0x0400.0'.
>>
>> Fixes: 45574ab2e92f ("configure.ac: better detection of LLVM version")
>> Signed-off-by: Vinson Lee <v...@freedesktop.org>
>> ---
>>  configure.ac | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/configure.ac b/configure.ac
>> index f62bc61e5025..3b8b32485ae1 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -2195,7 +2195,7 @@ if test "x$enable_gallium_llvm" = xyes || test
>> "x$HAVE_RADEON_VULKAN" = xyes; th if test -n "${LLVM_VERSION_MAJOR}"; then
>>  LLVM_VERSION_INT="${LLVM_VERSION_MAJOR}0${LLVM_VERSION_MINOR}"
>>  else
>> -LLVM_VERSION_INT=`echo $LLVM_VERSION | sed -e
>> 's/\([[0-9]]\)\.\([[0-9]]\)/\10\2/g'` +LLVM_VERSION_INT=`echo
>> $LLVM_VERSION | sed -e 's/\([[0-9]]\)\.\([[0-9]]\).*/\10\2/g'` fi
>>
>>  LLVM_REQUIRED_VERSION_MAJOR="3"
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] llvmpipe: Link tests with CLOCK_LIB.

2016-12-02 Thread Vinson Lee
Fix linking error with 'make check'.

  CXXLD  lp_test_format
../../../../src/gallium/auxiliary/.libs/libgallium.a(os_time.o): In function 
`os_time_get_nano':
/home/jenkins/workspace/mesa/src/gallium/auxiliary/os/os_time.c:59: undefined 
reference to `clock_gettime'

Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 src/gallium/drivers/llvmpipe/Makefile.am |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/llvmpipe/Makefile.am 
b/src/gallium/drivers/llvmpipe/Makefile.am
index 85ae0ae13d89..562c2d6321c5 100644
--- a/src/gallium/drivers/llvmpipe/Makefile.am
+++ b/src/gallium/drivers/llvmpipe/Makefile.am
@@ -54,7 +54,8 @@ TEST_LIBS = \
$(top_builddir)/src/util/libmesautil.la \
$(LLVM_LIBS) \
$(DLOPEN_LIBS) \
-   $(PTHREAD_LIBS)
+   $(PTHREAD_LIBS) \
+   $(CLOCK_LIB)
 
 lp_test_format_SOURCES = lp_test_format.c lp_test_main.c
 lp_test_format_LDADD = $(TEST_LIBS)
-- 
1.7.9.5

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] configure.ac: Strip patch version from LLVM version.

2016-12-02 Thread Vinson Lee
HAVE_LLVM variable included the patch version if the LLVM version had a
patch version.

For LLVM version '4.0.0', HAVE_LLVM would be '0x0400.0'.

Fixes: 45574ab2e92f ("configure.ac: better detection of LLVM version")
Signed-off-by: Vinson Lee <v...@freedesktop.org>
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index f62bc61e5025..3b8b32485ae1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2195,7 +2195,7 @@ if test "x$enable_gallium_llvm" = xyes || test 
"x$HAVE_RADEON_VULKAN" = xyes; th
 if test -n "${LLVM_VERSION_MAJOR}"; then
 LLVM_VERSION_INT="${LLVM_VERSION_MAJOR}0${LLVM_VERSION_MINOR}"
 else
-LLVM_VERSION_INT=`echo $LLVM_VERSION | sed -e 
's/\([[0-9]]\)\.\([[0-9]]\)/\10\2/g'`
+LLVM_VERSION_INT=`echo $LLVM_VERSION | sed -e 
's/\([[0-9]]\)\.\([[0-9]]\).*/\10\2/g'`
 fi
 
 LLVM_REQUIRED_VERSION_MAJOR="3"
-- 
2.7.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


  1   2   3   4   5   >