Re: [Mesa-dev] [PATCH v3 04/15] meson: build r600 driver

2017-11-14 Thread Dylan Baker
Quoting Marc Dietrich (2017-11-14 01:45:43)
> Hi Dylan,
> 
> Am Dienstag, 14. November 2017, 02:09:08 CET schrieb Dylan Baker:
> > Signed-off-by: Dylan Baker 
> > Tested-by: Aaron Watry 
> > ---
> >  meson.build  |  22 --
> >  src/gallium/drivers/r600/meson.build | 128
> > +++ src/gallium/meson.build  | 
> >  6 +-
> >  src/gallium/targets/dri/meson.build  |   7 +-
> >  4 files changed, 154 insertions(+), 9 deletions(-)
> >  create mode 100644 src/gallium/drivers/r600/meson.build
> > 
> 
> snip
> 
> > diff --git a/src/gallium/drivers/r600/meson.build
> > b/src/gallium/drivers/r600/meson.build new file mode 100644
> > index 000..411b550331d
> > --- /dev/null
> > +++ b/src/gallium/drivers/r600/meson.build
> > @@ -0,0 +1,128 @@
> > +# Copyright © 2017 Intel Corporation
> > +
> > +# Permission is hereby granted, free of charge, to any person obtaining a
> > copy +# of this software and associated documentation files (the
> > "Software"), to deal +# in the Software without restriction, including
> > without limitation the rights +# to use, copy, modify, merge, publish,
> > distribute, sublicense, and/or sell +# copies of the Software, and to
> > permit persons to whom the Software is +# furnished to do so, subject to
> > the following conditions:
> > +
> > +# The above copyright notice and this permission notice shall be included
> > in +# all copies or substantial portions of the Software.
> > +
> > +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
> > OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> > MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
> > IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
> > CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
> > TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE
> > SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE.
> > +
> > +files_r600 = files(
> > +  'r600d_common.h',
> > +  'compute_memory_pool.c',
> > +  'compute_memory_pool.h',
> > +  'eg_asm.c',
> > +  'eg_debug.c',
> > +  'eg_sq.h',
> > +  'evergreen_compute.c',
> > +  'evergreen_compute.h',
> > +  'evergreen_compute_internal.h',
> > +  'evergreend.h',
> > +  'evergreen_hw_context.c',
> > +  'evergreen_state.c',
> > +  'r600_asm.c',
> > +  'r600_asm.h',
> > +  'r600_blit.c',
> > +  'r600d.h',
> > +  'r600_formats.h',
> > +  'r600_hw_context.c',
> > +  'r600_isa.c',
> > +  'r600_isa.h',
> > +  'r600_opcodes.h',
> > +  'r600_pipe.c',
> > +  'r600_pipe.h',
> > +  'r600_public.h',
> > +  'r600_shader.c',
> > +  'r600_shader.h',
> > +  'r600_sq.h',
> > +  'r600_state.c',
> > +  'r600_state_common.c',
> > +  'r600_uvd.c',
> > +  'r700_asm.c',
> > +  'r700_sq.h',
> > +  'cayman_msaa.c',
> > +  'r600_buffer_common.c',
> > +  'r600_cs.h',
> > +  'r600_gpu_load.c',
> > +  'r600_perfcounter.c',
> > +  'r600_pipe_common.c',
> > +  'r600_pipe_common.h',
> > +  'r600_query.c',
> > +  'r600_query.h',
> > +  'r600_streamout.c',
> > +  'r600_test_dma.c',
> > +  'r600_texture.c',
> > +  'r600_viewport.c',
> > +  'radeon_uvd.c',
> > +  'radeon_uvd.h',
> > +  'radeon_vce.c',
> > +  'radeon_vce.h',
> > +  'radeon_video.c',
> > +  'radeon_video.h',
> > +  'sb/sb_bc_builder.cpp',
> > +  'sb/sb_bc_decoder.cpp',
> > +  'sb/sb_bc_dump.cpp',
> > +  'sb/sb_bc_finalize.cpp',
> > +  'sb/sb_bc.h',
> > +  'sb/sb_bc_parser.cpp',
> > +  'sb/sb_context.cpp',
> > +  'sb/sb_core.cpp',
> > +  'sb/sb_dce_cleanup.cpp',
> > +  'sb/sb_def_use.cpp',
> > +  'sb/sb_dump.cpp',
> > +  'sb/sb_expr.cpp',
> > +  'sb/sb_expr.h',
> > +  'sb/sb_gcm.cpp',
> > +  'sb/sb_gvn.cpp',
> > +  'sb/sb_if_conversion.cpp',
> > +  'sb/sb_ir.cpp',
> > +  'sb/sb_ir.h',
> > +  'sb/sb_liveness.cpp',
> > +  'sb/sb_pass.cpp',
> > +  'sb/sb_pass.h',
> > +  'sb/sb_peephole.cpp',
> > +  'sb/sb_psi_ops.cpp',
> > +  'sb/sb_public.h',
> > +  'sb/sb_ra_checker.cpp',
> > +  'sb/sb_ra_coalesce.cpp',
> > +  'sb/sb_ra_init.cpp',
> > +  'sb/sb_sched.cpp',
> > +  'sb/sb_sched.h',
> > +  'sb/sb_shader.cpp',
> > +  'sb/sb_shader.h',
> > +  'sb/sb_ssa_builder.cpp',
> > +  'sb/sb_valtable.cpp',
> > +)
> > +
> > +egd_tables_h = custom_target(
> > +  'egd_tables.h',
> > +  input : ['egd_tables.py', 'evergreend.h'],
> > +  output : 'egd_tables.h',
> > +  command : [prog_python2, '@INPUT@'],
> > +  capture : true,
> > +)
> > +
> > +# TODO: compute defines
> > +
> > +libr600 = static_library(
> > +  'r600',
> > +  [files_r600, egd_tables_h],
> > +  c_args : [c_vis_args],
> > +  cpp_args : [cpp_vis_args],
> > +  include_directories : [
> > +inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_amd_common,
> 
> inc_amd_common is not defined if radeonsi is not enabled.
> 
> Marc

Oops, that's a rebasing error. Fixed locally.


signature.asc
Description: signature
___
mesa-dev mailing list

Re: [Mesa-dev] [PATCH v3 04/15] meson: build r600 driver

2017-11-14 Thread Marc Dietrich
Hi Dylan,

Am Dienstag, 14. November 2017, 02:09:08 CET schrieb Dylan Baker:
> Signed-off-by: Dylan Baker 
> Tested-by: Aaron Watry 
> ---
>  meson.build  |  22 --
>  src/gallium/drivers/r600/meson.build | 128
> +++ src/gallium/meson.build  | 
>  6 +-
>  src/gallium/targets/dri/meson.build  |   7 +-
>  4 files changed, 154 insertions(+), 9 deletions(-)
>  create mode 100644 src/gallium/drivers/r600/meson.build
> 

snip

> diff --git a/src/gallium/drivers/r600/meson.build
> b/src/gallium/drivers/r600/meson.build new file mode 100644
> index 000..411b550331d
> --- /dev/null
> +++ b/src/gallium/drivers/r600/meson.build
> @@ -0,0 +1,128 @@
> +# Copyright © 2017 Intel Corporation
> +
> +# Permission is hereby granted, free of charge, to any person obtaining a
> copy +# of this software and associated documentation files (the
> "Software"), to deal +# in the Software without restriction, including
> without limitation the rights +# to use, copy, modify, merge, publish,
> distribute, sublicense, and/or sell +# copies of the Software, and to
> permit persons to whom the Software is +# furnished to do so, subject to
> the following conditions:
> +
> +# The above copyright notice and this permission notice shall be included
> in +# all copies or substantial portions of the Software.
> +
> +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
> OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
> IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
> CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
> TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE
> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE.
> +
> +files_r600 = files(
> +  'r600d_common.h',
> +  'compute_memory_pool.c',
> +  'compute_memory_pool.h',
> +  'eg_asm.c',
> +  'eg_debug.c',
> +  'eg_sq.h',
> +  'evergreen_compute.c',
> +  'evergreen_compute.h',
> +  'evergreen_compute_internal.h',
> +  'evergreend.h',
> +  'evergreen_hw_context.c',
> +  'evergreen_state.c',
> +  'r600_asm.c',
> +  'r600_asm.h',
> +  'r600_blit.c',
> +  'r600d.h',
> +  'r600_formats.h',
> +  'r600_hw_context.c',
> +  'r600_isa.c',
> +  'r600_isa.h',
> +  'r600_opcodes.h',
> +  'r600_pipe.c',
> +  'r600_pipe.h',
> +  'r600_public.h',
> +  'r600_shader.c',
> +  'r600_shader.h',
> +  'r600_sq.h',
> +  'r600_state.c',
> +  'r600_state_common.c',
> +  'r600_uvd.c',
> +  'r700_asm.c',
> +  'r700_sq.h',
> +  'cayman_msaa.c',
> +  'r600_buffer_common.c',
> +  'r600_cs.h',
> +  'r600_gpu_load.c',
> +  'r600_perfcounter.c',
> +  'r600_pipe_common.c',
> +  'r600_pipe_common.h',
> +  'r600_query.c',
> +  'r600_query.h',
> +  'r600_streamout.c',
> +  'r600_test_dma.c',
> +  'r600_texture.c',
> +  'r600_viewport.c',
> +  'radeon_uvd.c',
> +  'radeon_uvd.h',
> +  'radeon_vce.c',
> +  'radeon_vce.h',
> +  'radeon_video.c',
> +  'radeon_video.h',
> +  'sb/sb_bc_builder.cpp',
> +  'sb/sb_bc_decoder.cpp',
> +  'sb/sb_bc_dump.cpp',
> +  'sb/sb_bc_finalize.cpp',
> +  'sb/sb_bc.h',
> +  'sb/sb_bc_parser.cpp',
> +  'sb/sb_context.cpp',
> +  'sb/sb_core.cpp',
> +  'sb/sb_dce_cleanup.cpp',
> +  'sb/sb_def_use.cpp',
> +  'sb/sb_dump.cpp',
> +  'sb/sb_expr.cpp',
> +  'sb/sb_expr.h',
> +  'sb/sb_gcm.cpp',
> +  'sb/sb_gvn.cpp',
> +  'sb/sb_if_conversion.cpp',
> +  'sb/sb_ir.cpp',
> +  'sb/sb_ir.h',
> +  'sb/sb_liveness.cpp',
> +  'sb/sb_pass.cpp',
> +  'sb/sb_pass.h',
> +  'sb/sb_peephole.cpp',
> +  'sb/sb_psi_ops.cpp',
> +  'sb/sb_public.h',
> +  'sb/sb_ra_checker.cpp',
> +  'sb/sb_ra_coalesce.cpp',
> +  'sb/sb_ra_init.cpp',
> +  'sb/sb_sched.cpp',
> +  'sb/sb_sched.h',
> +  'sb/sb_shader.cpp',
> +  'sb/sb_shader.h',
> +  'sb/sb_ssa_builder.cpp',
> +  'sb/sb_valtable.cpp',
> +)
> +
> +egd_tables_h = custom_target(
> +  'egd_tables.h',
> +  input : ['egd_tables.py', 'evergreend.h'],
> +  output : 'egd_tables.h',
> +  command : [prog_python2, '@INPUT@'],
> +  capture : true,
> +)
> +
> +# TODO: compute defines
> +
> +libr600 = static_library(
> +  'r600',
> +  [files_r600, egd_tables_h],
> +  c_args : [c_vis_args],
> +  cpp_args : [cpp_vis_args],
> +  include_directories : [
> +inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_amd_common,

inc_amd_common is not defined if radeonsi is not enabled.

Marc


signature.asc
Description: This is a digitally signed message part.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH v3 04/15] meson: build r600 driver

2017-11-13 Thread Dylan Baker
Signed-off-by: Dylan Baker 
Tested-by: Aaron Watry 
---
 meson.build  |  22 --
 src/gallium/drivers/r600/meson.build | 128 +++
 src/gallium/meson.build  |   6 +-
 src/gallium/targets/dri/meson.build  |   7 +-
 4 files changed, 154 insertions(+), 9 deletions(-)
 create mode 100644 src/gallium/drivers/r600/meson.build

diff --git a/meson.build b/meson.build
index 05f171e4d44..12816a2535f 100644
--- a/meson.build
+++ b/meson.build
@@ -119,6 +119,7 @@ with_gallium = false
 with_gallium_pl111 = false
 with_gallium_radeonsi = false
 with_gallium_r300 = false
+with_gallium_r600 = false
 with_gallium_nouveau = false
 with_gallium_freedreno = false
 with_gallium_softpipe = false
@@ -132,7 +133,7 @@ if _drivers == 'auto'
   if not ['darwin', 'windows'].contains(host_machine.system())
 # TODO: PPC, Sparc
 if ['x86', 'x86_64'].contains(host_machine.cpu_family())
-  _drivers = 'r300,radeonsi,nouveau,swrast'
+  _drivers = 'r300,r600,radeonsi,nouveau,swrast'
 elif ['arm', 'aarch64'].contains(host_machine.cpu_family())
   _drivers = 'pl111,vc4,vc5,freedreno,etnaviv,imx,swrast'
 else
@@ -147,6 +148,7 @@ if _drivers != ''
   with_gallium_pl111 = _split.contains('pl111')
   with_gallium_radeonsi = _split.contains('radeonsi')
   with_gallium_r300 = _split.contains('r300')
+  with_gallium_r600 = _split.contains('r600')
   with_gallium_nouveau = _split.contains('nouveau')
   with_gallium_freedreno = _split.contains('freedreno')
   with_gallium_softpipe = _split.contains('swrast')
@@ -678,9 +680,13 @@ dep_thread = dependency('threads')
 if dep_thread.found() and host_machine.system() == 'linux'
   pre_args += '-DHAVE_PTHREAD'
 endif
-dep_elf = dependency('libelf', required : false)
-if not dep_elf.found() and (with_amd_vk or with_gallium_radeonsi) # TODO: 
clover, r600
-  dep_elf = cc.find_library('elf')
+if with_amd_vk or with_gallium_radeonsi or with_gallium_r600 # TODO: clover
+  dep_elf = dependency('libelf', required : false)
+  if not dep_elf.found()
+dep_elf = cc.find_library('elf')
+  endif
+else
+  dep_elf = []
 endif
 dep_expat = dependency('expat')
 # this only exists on linux so either this is linux and it will be found, or
@@ -695,7 +701,8 @@ dep_libdrm_freedreno = []
 if with_amd_vk or with_gallium_radeonsi
   dep_libdrm_amdgpu = dependency('libdrm_amdgpu', version : '>= 2.4.88')
 endif
-if with_gallium_radeonsi or with_dri_r100 or with_dri_r200 or with_gallium_r300
+if (with_gallium_radeonsi or with_dri_r100 or with_dri_r200 or
+with_gallium_r300 or with_gallium_r600)
   dep_libdrm_radeon = dependency('libdrm_radeon', version : '>= 2.4.71')
 endif
 if with_gallium_nouveau or with_dri_nouveau
@@ -709,8 +716,11 @@ if with_gallium_freedreno
 endif
 
 llvm_modules = ['bitwriter', 'engine', 'mcdisassembler', 'mcjit']
-if with_amd_vk or with_gallium_radeonsi # TODO: r600
+if with_amd_vk or with_gallium_radeonsi or with_gallium_r600
   llvm_modules += ['amdgpu', 'bitreader', 'ipo']
+  if with_gallium_r600
+llvm_modules += 'asmparser'
+  endif
 endif
 dep_llvm = []
 if with_llvm
diff --git a/src/gallium/drivers/r600/meson.build 
b/src/gallium/drivers/r600/meson.build
new file mode 100644
index 000..411b550331d
--- /dev/null
+++ b/src/gallium/drivers/r600/meson.build
@@ -0,0 +1,128 @@
+# Copyright © 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+files_r600 = files(
+  'r600d_common.h',
+  'compute_memory_pool.c',
+  'compute_memory_pool.h',
+  'eg_asm.c',
+  'eg_debug.c',
+  'eg_sq.h',
+  'evergreen_compute.c',
+  'evergreen_compute.h',
+  'evergreen_compute_internal.h',
+  'evergreend.h',
+  'evergreen_hw_context.c',
+  'evergreen_state.c',
+  'r600_asm.c',
+  'r600_asm.h',
+  'r600_blit.c',
+  'r600d.h',
+  'r600_formats.h',
+  'r600_hw_context.c',
+  'r600_isa.c',
+  'r600_isa.h',
+  'r600_opcodes.h',
+  'r600_pipe.c',
+