scons: Prune out unnecessary targets. This prunes out all targets except libgl-gdi, libgl-xlib, and svga, as suggested by Marek Olšák. libgl-xlib will be remove once I have had time to confirm no automated tests we have rely upon it. There are also a bunch of Makefile.sources which become orphaned as result, that are not taken care of in this change. v2: Prune remainders of swr support. Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4348> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4348>
glthread: compile marshal_generated.c faster by breaking it up into 8 files Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4270> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4270>
mesa: Replace gen_matypes with a simple header for V4F/mat layout. We can greatly simplify our builds by just hardcoding GLvector4f and GLmatrix's layouts. Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
scons: Remove gles option. It's broken, and WGL state tracker is always built with GLES support noawadays. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
scons: Add PROGRAM_NIR_FILES. 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 <vlee@freedesktop.org>
build: Remove HAVE_DLOPEN Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
scons: add code to generate format_fallback.c file Fixes: a1983223d8839a0c9 "mesa: Add _mesa_format_fallback_rgbx_to_rgba() [v2]" Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
scons: Fix dependencies of marshal_generated.[ch]. These generated source files depend not only upon gl_and_es_API.xml, but all other XML files that are included by it. This change updates the generation rules to depend on all gen/*.xml files, like done for other SCons generation rules, and should fix incremental broken SCons builds due to missing dependencies. Trivial.
glapi: Generate GL API marshalling code from the XML. This is not yet used in the build, just generated. v2: Add missing build dependencies. v3: Avoid mixing declarations and code, remove logic for avoiding emitting code that the compiler's optimizer can deal with anyway. v4: (Timothy Arceri) move safe_mul() genereation here from a later patch. Acked-by: Timothy Arceri <tarceri@itsqueeze.com> Acked-by: Marek Olšák <maraeo@gmail.com> Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de> Tested-by: Mike Lothian <mike@fireburn.co.uk>
glsl: Generate ir_expression_operation.h from Python There are differences in where end-of-line comments are placed, but 'diff -wud' is clean. v2: Massive rebase. v3: With much help from José Fonseca, fix SCons build. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Acked-by: Dylan Baker <dylan@pnwbakers.com>
scons: Take indirect gl_and_es_API.xml dependencies in consideration. Same as 26a8f76ba1a0229ee3332eaa6f1aea89d617cf3d. Trivial.
mesa: scons: remove left over src/glsl include The path no longer exists. Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
mesa: scons: list builddir before srcdir Analogous to previous commit. Note: scons always uses OOT builds, while the in-tree generated files could be created either manually or by the autoconf build. Cc: "11.2 12.0" <mesa-stable@lists.freedesktop.org> Cc: Alexander von Gluck IV <kallisti5@unixzen.com> Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
scons: put the generated git_sha1.h file in top-level src/ directory To match what's done in the automake build. v2: Use git rev-parse to get a 10-character hash ID Fix Python imports Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: José Fonseca <jfonseca@vmware.com>
mesa/st: add support for NIR as possible driver IR Signed-off-by: Rob Clark <robclark@freedesktop.org> Acked-by: Eric Anholt <eric@anholt.net>
scons: Whenever possible decide what to do based on platform and not compiler. Because compilers like GCC and Clang are effectively available everywhere so their presence/absence is seldom conclusive. Furthermore, all compilers we use now have stdint.h. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com>
nir: move glsl_types.{cpp,h} to compiler Allows us to remove the SCons workaround :-) Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Acked-by: Matt Turner <mattst88@gmail.com> Acked-by: Jose Fonseca <jfonseca@vmware.com>
nir: remove dependency on glsl Move glsl_types into NIR, now that the dependency on glsl_symbol_table has been split out. Possibly makes sense to rename things at this point, but if we do that I'd like to keep it split out into a separate patch to make git history easier to follow (IMHO). v2: fix android build v3: I f***ing hate scons.. but at least it builds Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Signed-off-by: Rob Clark <robclark@freedesktop.org>
scons: Fix git_sha1.h generation fallback. I didn't meant to remove the 'if not os.path.exists(filename)' statement. Reviewed-by: Brian Paul <brianp@vmware.com>
scons: Cleanup flex/bison settings specification. Reviewed-by: Brian Paul <brianp@vmware.com>