summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/Makefile.am
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2012-12-06 22:36:26 -0800
committerKenneth Graunke <kenneth@whitecape.org>2014-01-18 21:55:37 -0800
commit0923dad90a3859d4136d483f3038fda9f616d1a8 (patch)
tree81fbcd5bd82da8d4f4676120a00e31a89e656a3b /src/mesa/drivers/dri/i965/Makefile.am
parentf4cf231cac17fa7e600ba9cbb033d41543cb4f3f (diff)
downloadexternal_mesa3d-0923dad90a3859d4136d483f3038fda9f616d1a8.zip
external_mesa3d-0923dad90a3859d4136d483f3038fda9f616d1a8.tar.gz
external_mesa3d-0923dad90a3859d4136d483f3038fda9f616d1a8.tar.bz2
i965: Add a new representation for Broadwell shader instructions.
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>
Diffstat (limited to 'src/mesa/drivers/dri/i965/Makefile.am')
-rw-r--r--src/mesa/drivers/dri/i965/Makefile.am2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/Makefile.am b/src/mesa/drivers/dri/i965/Makefile.am
index a2c3b32..24e226f 100644
--- a/src/mesa/drivers/dri/i965/Makefile.am
+++ b/src/mesa/drivers/dri/i965/Makefile.am
@@ -38,6 +38,8 @@ AM_CFLAGS = \
AM_CXXFLAGS = $(AM_CFLAGS)
+gen8_instruction_CFLAGS = $(AM_CFLAGS) -fkeep-inline-functions
+
noinst_LTLIBRARIES = libi965_dri.la
libi965_dri_la_SOURCES = $(i965_FILES)
libi965_dri_la_LIBADD = $(INTEL_LIBS)