summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/Makefile.am
Commit message (Collapse)AuthorAgeFilesLines
* i965/fs: Add unit tests for copy propagation pass.Matt Turner2016-12-241-0/+7
| | | | | | | | | Pretty basic, but it's a start. Acked-by: Jason Ekstrand <jason@jlekstrand.net> (cherry picked from commit 091a8a04adb28a2044e3baadba0af52a185b3bd0) [Emil Velikov: nir_shader_create() has only three arguments] Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
* intel: Add a new "common" library for more code sharingJason Ekstrand2016-09-031-0/+1
| | | | | | | The first thing to go in this new library is brw_device_info. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* glsl: Generate ir_expression_operation.h from PythonIan Romanick2016-08-301-0/+1
| | | | | | | | | | | | | 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>
* i965: Move blorp into src/intel/blorpJason Ekstrand2016-08-291-0/+1
| | | | | | | | | At this point, blorp is completely driver agnostic and can be safely moved into its own folder. Soon, we hope to start using it for doing blits in the Vulkan driver. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
* i965/blorp: Use genxml for gen8-9 state setupJason Ekstrand2016-08-191-1/+9
| | | | | Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
* i965/blorp: Use genxml for gen7 state setupJason Ekstrand2016-08-191-1/+9
| | | | | Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
* i965: Move gen6_blorp.c to a file that gets recompiled per-genJason Ekstrand2016-08-191-1/+13
| | | | | | | | | At the moment, it's only used for gen6 but that will change soon. We use the genX prefix for recompiled things in the Vulkan driver. It isn't great, but it seems to have worked ok. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
* i965/blorp/gen6: Use genxml packing structs for state setupJason Ekstrand2016-08-191-0/+1
| | | | | Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
* i965: Don't link libmesa or libdri_test_stubs into testsJason Ekstrand2016-05-261-3/+3
| | | | | | | | | | Now that the compiler has been completely separated from libmesa, we no longer need these. We can make the tests much smaller by not linking them in. This also ensures that anyone who runs make check won't accidentally put in any dependencies from the compiler to the rest of mesa core. Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
* i965: don't forget to ship brw_nir_trig_workarounds.pyEmil Velikov2016-05-011-0/+3
| | | | | | Otherwise we won't be able to regenerate the source file(s). Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
* i965: Add a dependency on libislJason Ekstrand2016-04-211-1/+6
| | | | | | | To avoid build issues, ensure that you're running `make' at the top level and/or you've executed `make clean' beforehand. Reviewed-by: Chad Versace <chad.versace@intel.com>
* i965: automake: remove gratuitous "+" during variable assignmentEmil Velikov2016-04-211-2/+2
| | | | | | | There is not initial assignment, thus appending to it does not work. Fixes: b27c85c4c08 "i965: add build rule for brw_nir_trig_workarounds.c" Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
* i965: add build rule for brw_nir_trig_workarounds.c on AndroidRob Herring2016-04-211-1/+6
| | | | | | | | | | | Commit bfd17c76c126 ("i965: Port INTEL_PRECISE_TRIG=1 to NIR.") added a generated file brw_nir_trig_workarounds.c which broke the Android build. Add the necessary makefiles to the Android build. Cc: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Rob Herring <robh@kernel.org> Tested-by: Chih-Wei Huang <cwhuang@linux.org.tw> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* i965: Port INTEL_PRECISE_TRIG=1 to NIR.Kenneth Graunke2016-04-111-0/+5
| | | | | | | | | | | | | | | | | | | | This makes the extra multiply visible to NIR's algebraic optimizations (for constant reassociation) as well as constant folding. This means that when the result of sin/cos are multiplied by an constant, we can eliminate the extra multiply altogether, reducing the cost of the workaround. It also means we only have to implement it one place, rather than in both backends. This makes INTEL_PRECISE_TRIG=1 cost nothing on GPUTest/Volplosion, which has a ton of sin() calls, but always multiplies them by an immediate constant. The extra multiply gets folded away. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eduardo Lima Mitev <elima@igalia.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Matt Turner <mattst88@gmail.com>
* nir: move to compiler/Emil Velikov2016-01-261-2/+1
| | | | | | Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Acked-by: Matt Turner <mattst88@gmail.com> Acked-by: Jose Fonseca <jfonseca@vmware.com>
* automake: fix some occurrences of hardcoded -ldl and -lpthreadJonathan Gray2015-12-011-1/+2
| | | | | | | | | Correct some occurrences of -ldl and -lpthread to use $(DLOPEN_LIBS) and $(PTHREAD_LIBS) respectively. Signed-off-by: Jonathan Gray <jsg@jsg.id.au> Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* i965/vec4: Add unit tests for cmod propagation passAlejandro Piñeiro2015-10-221-0/+7
| | | | | | | | | | | | | | | | | | This include the same tests coming from test_fs_cmod_propagation, (non vector glsl types included) plus some new with vec4 types, inspired on the regressions found while the optimization was a work in progress. Additionally, the check of number of instructions after the optimization was changed from EXPECT_EQ to ASSERT_EQ. This was done to avoid a crash on failing tests that expected no optimization, as after checking the number of instructions, there were some checks related to this last instruction opcode/conditional mod. v2: update tests after Matt Turner's review of the optimization pass v3: tweaks on the tests (mostly on the comments), after Matt Turner's review Reviewed-by: Matt Turner <mattst88@gmail.com>
* build: fix out-of-tree build after b9b40efRob Clark2015-10-171-0/+1
| | | | | | | | | | | | commit b9b40ef9b7644ea24768bc8b7464b1719efe99bf Author: Rob Clark <robclark@freedesktop.org> AuthorDate: Sat Oct 10 13:55:07 2015 -0400 nir: remove dependency on glsl broke things for i965 out of tree build. Signed-off-by: Rob Clark <robclark@freedesktop.org>
* i965: Link compiler unit tests to libi965_compiler.laKristian Høgsberg Kristensen2015-10-081-6/+2
| | | | | | | | | | | | We can now link the unit tests against just libi965_compiler.la. This lets us drop a lot of DRI driver dependencies, but we still pull in all of libmesa and more. This also provides a few standalone users of libi965_compiler.la, which will help us accidentally using i965_dri.so functions from the compiler. Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com> Signed-off-by: Kristian Høgsberg Kristensen <krh@bitplanet.net>
* i965: Break out backend compiler to its own libraryKristian Høgsberg Kristensen2015-10-081-2/+4
| | | | | | | | | This introduces a new libtool helper library, libi965_compiler.la. This library is moderately self-contained, but still needs to link to all of libmesa.la among other things. Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com> Signed-off-by: Kristian Høgsberg Kristensen <krh@bitplanet.net>
* mesa: build xmlconfig to a separate static libraryErik Faye-Lund2015-06-121-0/+1
| | | | | | | | | | | | | | | | | | | | As we use the file from both the dri modules and loader, we end up with multiple definition of the symbols provided in our gallium dri modules. Additionally we compile the file twice. Resolve both issues, effectively enabling the build on toolchains which don't support -Wl,--allow-multiple-definition. v2: [Emil Velikov] - Fix the Scons/Android build. - Resolve libgbm build issues (bring back the missing -lm) Cc: Julien Isorce <j.isorce@samsung.com> Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90310 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90905 Acked-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* i965: Link test programs with gtest before pthreads.Matt Turner2015-02-231-10/+10
| | | | | Cc: "10.5" <mesa-stable@lists.freedesktop.org> Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=540962
* mesa: Add gallium include dirs to more parts of the tree.Eric Anholt2015-02-201-0/+2
| | | | | | v2: Try to patch up the scons bits. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* i965/fs: Add unit tests for saturate propagation pass.Matt Turner2015-02-191-0/+7
| | | | | Cc: <mesa-stable@lists.freedesktop.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* nir: use Python to autogenerate opcode informationConnor Abbott2015-01-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before, we used a system where a file, nir_opcodes.h, defined some macros that were included to generate the enum values and the nir_op_infos structure. This worked pretty well, but for development the error messages were never very useful, Python tools couldn't understand the opcode list, and it was difficult to use nir_opcodes.h to do other things like autogenerate a builder API. Now, we store opcode information in nir_opcodes.py, and we have nir_opcodes_c.py to generate the old nir_opcodes.c and nir_opcodes_h.py to generate nir_opcodes.h, which contains all the enum names and gets included into nir.h like before. In addition to solving the above problems, using Python and Mako to generate everything means that it's much easier to add keep information centralized as we add new things like constant propagation that require per-opcode information. v2: - make Opcode derive from object (Dylan) - don't use assert like it's a function (Dylan) - style fixes for fnoise, use xrange (Dylan) - use iterkeys() in nir_opcodes_h.py (Dylan) - use pydoc-style comments (Jason) - don't make fmin/fmax commutative and associative yet (Jason) Signed-off-by: Connor Abbott <cwabbott0@gmail.com> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com> v3 Jason Ekstrand <jason.ekstrand@intel.com> - Alphabetize source file lists - Generate nir_opcodes.h in the builddir instead of the source dir - Include $(builddir)/src/glsl/nir in the i965 build - Rework nir_opcodes.h generation so it generates a complete header file instead of one that has to be embedded inside an enum declaration
* i965/fs: Add unit tests for cmod propagation pass.Matt Turner2015-01-231-0/+7
| | | | | Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* i965: Add unit test for float <-> VF conversions.Matt Turner2014-11-251-0/+7
| | | | | Using Eric's original VF -> float conversion code to initialize the table.
* i965: drop the custom gen8_instruction CFLAGEmil Velikov2014-11-071-2/+0
| | | | | | | | | | | | | | | No longer needed as the file was removed with commit 8c229d306b3f312adbdfbaf79967ee43fbfc839e Author: Kenneth Graunke <kenneth@whitecape.org> Date: Mon Aug 11 10:07:07 2014 -0700 i965: Delete the Gen8 code generators. We now use the brw_eu_emit.c code instead. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* i965: Remove blorp unit tests.Matt Turner2014-05-151-6/+1
| | | | | | | | | They've served their purpose (in transitioning blorp to using fs_generator) and now they just necessitate large amounts of manual labor to regenerate if the disassembler changes. Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com> Acked-by: Kenneth Graunke <kenneth@whitecape.org>
* i965/vec4: Add a test for copy propagation behavior.Eric Anholt2014-04-081-0/+7
| | | | | | | I thought I was seeing a bug in the code while reviewing, but it's not there. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* dri/i965: use CLOCK_LIBS over -lrtEmil Velikov2014-03-311-1/+1
| | | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
* i965: Add a new representation for Broadwell shader instructions.Kenneth Graunke2014-01-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Broadwell significantly changes the EU instruction encoding. Many of the fields got moved to different bit positions; some even got split in two. With so many changes, it was infeasible to continue using struct brw_instruction. We needed a new representation. This new approach is a bit different: rather than a struct, I created a class that has four DWords, and helper functions that read/write various bits. This has several advantages: 1. We can create several different names for the same bits. For example, conditional modifiers, SFID for SEND instructions, and the MATH instruction's function opcode are all stored in bits 27:24. In each situation, we can use the appropriate setter function: set_sfid(), set_math_function(), or set_cond_modifier(). This is much easier to follow. 2. Since the fields are expressed using the original 128-bit numbers, the code to create the getter/setter functions follows the table in the documentation very closely. To aid in debugging, I've enabled -fkeep-inline-functions when building gen8_instruction.c. Otherwise, these functions cannot be called by gdb, making it insanely difficult to print out anything. Kenneth Graunke wrote most of this code. Damien Lespiau ported it to C99. Xiang Haihao added media fields. Zhao Yakui added indirect addressing support. Eric Anholt added an assertion to make sure that values fit in the alloted number of bits. v2: Update for brw_reg_type_to_hw_type(), which necessitates passing brw_context pointers around everywhere. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net> Acked-by: Matt Turner <mattst88@gmail.com>
* i965/blorp: unit test compiling blend and scaledTopi Pohjolainen2013-12-271-1/+7
| | | | | Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
* i965: Link -ldl after libmesa.laMatt Turner2013-11-201-1/+1
| | | | | | | | DLOPEN_LIBS is part of DRI_LIB_DEPS. Cc: "10.0" <mesa-stable@lists.freedesktop.org>" Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71512 Reviewed-by: Eric Anholt <eric@anholt.net>
* mesa: Remove dricore from the build.Eric Anholt2013-10-241-1/+1
| | | | | | | | | No driver uses it any more, and it's been replaced by megadrivers. v2: Remove always-on conditional for NEED_LIBPROGRAM (review by Emil) Reviewed-by: Matt Turner <mattst88@gmail.com> (v1) Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* i965: Build the driver into a shared mesa_dri_drivers.so .Eric Anholt2013-10-241-22/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we've split things such that mesa core is in libdricore, exposing the whole Mesa core interface in the global namespace, and the i965_dri.so code all links against that. Along with polluting application namespace terribly, it requires extra PLT indirections and prevents LTO. Instead, we can build all of the driver contents into the same .so with just a few symbols exposed to be referenced from the actual driver .so file, allowing LTO and reducing our exposed symbol count massively. FPS improvement on GLB2.7 with INTEL_NO_HW=1: 2.61061% +/- 1.16957% (n=50) (without LTO, just the PLT reductions from this commit) Note that the X Server requires commit 7ecfab47eb221dbb996ea6c033348b8eceaeb893 to successfully load this driver! v2: Set a global driverAPI variable so loaders don't have to update to createNewScreen2() (though they may want to for thread safety). v3: Drop AM_CPPFLAGS addition (Emil pointed out I'd missed some cflags that would be necessary, though only if we actually relied on them). v4: Fix install with DESTDIR set. Reviewed-by: Matt Turner <mattst88@gmail.com> (v1) Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> (v2)
* mesa/drivers: drop HAVE_*_DRI from individual makefilesEmil Velikov2013-10-011-4/+0
| | | | | | | | | The mesa/drivers/dri/Makefile.am already guards the individual targets/subdirs with HAVE_*_DRI before including them. Thus making the additional check within each Makefile.am unnecessary. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* mesa: Remove some remaining FEATURE_* detritus.Eric Anholt2013-09-261-10/+0
| | | | | Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* mesa: Use -Bsymbolic in the linker to locally resolve Mesa-internal symbols.Eric Anholt2013-09-231-1/+1
| | | | | | | | | | | | | Normally, LD_PRELOAD will take precedence over your own symbols, which you want for things like malloc() in libc. But we don't have any local symbols we would want overridden (like hash_table_insert(), for example!), so tell the linker to resolve them internally. This also avoids calls through the PLT. Saves almost 100k on libdricore's size, and gets us a bunch of the performance back that we had with non-dricore. Reviewed-by: Ian Romanick <ian.d.romanick@.intel.com>
* i965: Move the remaining intel code to the i965 directory.Eric Anholt2013-06-261-1/+0
| | | | | | | | | Now that i915's forked off, they don't need to live in a shared directory. Acked-by: Kenneth Graunke <kenneth@whitecape.org> Acked-by: Chad Versace <chad.versace@linux.intel.com> Acked-by: Adam Jackson <ajax@redhat.com> (and I hear second hand that idr is OK with it, too)
* intel: use automake conditionals for defining FEATURE_{ES1,ES2}Andreas Boll2013-05-011-1/+10
| | | | | | Removes the need of API_DEFINES. Reviewed-by: Matt Turner <mattst88@gmail.com>
* i965: Link i965_dri.so with C++ linker.Frank Henigman2013-03-081-0/+1
| | | | | | Force C++ linking of i965_dri.so by adding a dummy C++ source file. Reviewed-by: Matt Turner <mattst88@gmail.com>
* xmlpool: Fix out-of-tree builds.Johannes Obermayr2013-01-131-0/+1
| | | | Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* Remove hacks for static MakefilesMatt Turner2013-01-131-3/+0
| | | | | | | | | | | v2: Andreas Boll <andreas.boll.dev@gmail.com> - don't remove compatibility with scripts for the old build system v3: Andreas Boll <andreas.boll.dev@gmail.com> - remove more obsolete hacks v4: Andreas Boll <andreas.boll.dev@gmail.com> - add a previously removed TOP variable to fix vgapi build
* i965: Add missing autoconf bits so test_vec4_register_coalesce will buildIan Romanick2012-12-141-0/+3
| | | | | Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Tested-by: Eric Anholt <eric@anholt.net>
* i965/vs: Add a unit test for opt_compute_to_mrf().Eric Anholt2012-12-141-2/+8
| | | | | | | | | | | | | The compute-to-mrf code is really twitchy, and it's hard to construct GLSL testcases for it. This unit test is also really hard to work with (for example, if your instruction is removed by dead code elimination, you end up inspecting something irrelevant), but I did use it for debugging some of the commits to follow. I called it test_vec4_register_coalesce because the compute-to-mrf code is about to morph into that. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* automake: Merge per-type *_FILES variables in intel drivers.Eric Anholt2012-11-121-3/+1
| | | | | Reviewed-by: Chad Versace <chad.versace@linux.intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* dri drivers: Link dricommon before dynamic librariesMatt Turner2012-10-031-2/+2
| | | | | | | | | I think libtool should be handling this for us, but the build fails for Jordan because libdricommon (a static library, which uses expat) appears before -lexpat on the linker command. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Tested-by: Jordan Justen <jordan.l.justen@intel.com>
* i965: Use visibility cflags on the driver code.Eric Anholt2012-09-271-0/+1
| | | | | | | | | The only symbols that need to be public (those in intel_screen.c that the loader looks for) are already marked public. Saves 100k of compiled driver size. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com>
* i965: Add support for instruction compaction.Eric Anholt2012-09-171-0/+14
| | | | | | | | | | | | | | | This reduces program size by using some smaller encodings for common bit patterns in the Gen ISA, with the hope of making programs fit in the instruction cache better. v2: Use larger bitshifts for the uncompressed field setups, in line with the way it's described in the spec. Consistently name a brw_compile "p" like all other code. Add a couple more tests. Consistently call things "compacted" not "compressed" (which is a different feature). Drop the explicit check for not compacting SENDs, which is unjustified and already implied by our lack of support for immediate values. Reviewed-by: Paul Berry <stereotype441@gmail.com>