Commit Graph

68049 Commits

Author SHA1 Message Date
Emil Velikov 556fc4b84d nir: resolve nir.h dependency list (fix make distcheck)
Use nir/nir_opcodes.h as is (w/o the absolute path), as it is the target
name used to generate the actual file. Otherwise the target is missing,
the file won't get generated and the build will fail.

Cc: "10.5" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-02-12 13:18:52 +00:00
Martin Peres 9f7efa78a8 docs: update GL3.txt to state my current work on the dsa extension
Signed-off-by: Martin Peres <martin.peres@linux.intel.com>
2015-02-12 11:24:37 +02:00
Ben Widawsky e93566a15c i965/vs/skl: Use vec4 datatypes for message header
We're using a SIMD4x2 sampler message, which has execsize 4, and so the
register width must be <= 4.  Use <4,4,1> regioning instead of <8,8,1>
regioning to access the same data but avoid tripping the assert.

Fixes the following piglit tests:
spec/glsl-1.20/compiler/structure-and-array-operations/array-selection.vert
spec/glsl-es-3.00/compiler/uniform_block/interface-name-basic.vert
spec/glsl-es-3.00/compiler/uniform_block/interface-name-field-clashes-with-struct.vert
spec/glsl-es-3.00/compiler/uniform_block/interface-name-field-clashes-with-function.vert
spec/glsl-es-3.00/compiler/uniform_block/interface-name-array.vert
glslparsertest/glsl2/condition-07.vert
spec/glsl-es-3.00/compiler/uniform_block/interface-name-field-clashes-with-variable.vert

v2: Better commit message courtesy of Ken.
I had a discussion with Ken, and we both question how we end up with a mov and
execsize 4. For now though, this fixes the piglit tests, so we can worry about
it later.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2015-02-11 21:41:58 -08:00
Chia-I Wu cba6a4a129 ilo: update screen init for Gen8
This is very preliminary and is only tested with glxgears.  All information
about Gen8 is derived from i965 and beignet.
2015-02-12 08:05:07 +08:00
Chia-I Wu cb1cdecf64 ilo: update outdated render command emissions for Gen8 2015-02-12 07:56:13 +08:00
Chia-I Wu 9ab4fc4e63 ilo: update rectlist command emission for Gen8 2015-02-12 07:56:13 +08:00
Chia-I Wu 4caf8d9761 ilo: update draw command emission for Gen8 2015-02-12 07:56:13 +08:00
Chia-I Wu d8927ab02f ilo: update surface state emission for Gen8 2015-02-12 07:56:13 +08:00
Chia-I Wu 7832a3013b ilo: update dynamic state emission for Gen8 2015-02-12 07:56:13 +08:00
Chia-I Wu 8682cbab3e ilo: update outdated gen assertions for Gen8 2015-02-12 07:56:12 +08:00
Chia-I Wu c173a5288f ilo: add new WM related helpers for Gen8 2015-02-12 07:56:12 +08:00
Chia-I Wu 8c2cbc8955 ilo: update VS related functions for Gen8 2015-02-12 07:56:12 +08:00
Chia-I Wu 0e3381154c ilo: update VF related functions for Gen8 2015-02-12 07:56:12 +08:00
Chia-I Wu a57805cb75 ilo: update SAMPLER_STATE for Gen8 2015-02-12 07:56:12 +08:00
Chia-I Wu 7e7e45db65 ilo: update SAMPLER_BORDER_COLOR_STATE for Gen8 2015-02-12 07:56:12 +08:00
Chia-I Wu 8976a190b2 ilo: update depth clear value for Gen8 2015-02-12 07:56:12 +08:00
Chia-I Wu 0b7fdce4f5 ilo: update ilo_zs_surface for Gen8 2015-02-12 07:56:12 +08:00
Chia-I Wu aa7109f059 ilo: update ilo_view_surface for Gen8 2015-02-12 07:56:12 +08:00
Chia-I Wu 7922982d4f ilo: update texture layout for Gen8 2015-02-12 07:56:12 +08:00
Chia-I Wu 47dc2ae6e2 ilo: update ilo_blend_state and related functions for Gen8 2015-02-12 07:56:12 +08:00
Chia-I Wu e8455128aa ilo: update ilo_dsa_state and related functions for Gen8 2015-02-12 07:56:12 +08:00
Chia-I Wu 9aeee99e4d ilo: update multisample related states for Gen8 2015-02-12 07:56:12 +08:00
Chia-I Wu 6366fbc1a8 ilo: update WM and PS related functions for Gen8 2015-02-12 07:56:11 +08:00
Chia-I Wu 584d3369b6 ilo: update SBE related functions for Gen8 2015-02-12 07:56:11 +08:00
Chia-I Wu 4cb592ec17 ilo: update SF related functions for Gen8 2015-02-12 07:56:11 +08:00
Chia-I Wu 05e2eb57cd ilo: update CLIP related functions for Gen8 2015-02-12 07:56:11 +08:00
Chia-I Wu 9ab0165375 ilo: update SF_CLIP_VIEWPORT for Gen8 2015-02-12 07:56:11 +08:00
Chia-I Wu b64aeebbcc ilo: update streamout related functions for Gen8 2015-02-12 07:56:11 +08:00
Chia-I Wu 6f77bd3bdc ilo: update 3DSTATE_{DS,HS,GS} for Gen8 2015-02-12 07:56:11 +08:00
Chia-I Wu 3be0504399 ilo: update 3DSTATE_CONSTANT_x for Gen8 2015-02-12 07:56:11 +08:00
Chia-I Wu 49306afe7b ilo: update 3DSTATE_URB_x for Gen8 2015-02-12 07:56:11 +08:00
Chia-I Wu d43ae05d76 ilo: update 3DSTATE_PUSH_CONSTANT_ALLOC_x for Gen8 2015-02-12 07:56:11 +08:00
Chia-I Wu f43332ca2f ilo: update render engine common helpers for Gen8 2015-02-12 07:56:11 +08:00
Chia-I Wu 8d9f69bef2 ilo: update BLT helpers for Gen8 2015-02-12 07:56:11 +08:00
Chia-I Wu 574f8d0229 ilo: update MI helpers for Gen8 2015-02-12 07:56:11 +08:00
Chia-I Wu bfc8a72609 ilo: add functions for Gen8 relocs
Extend ilo_builder_writer_reloc() for Gen8 memory addressing.  Add new
wrappers, ilo_builder_surface_reloc64(() and ilo_builder_batch_reloc64().
2015-02-12 07:56:11 +08:00
Chia-I Wu a7911620f6 ilo: update the toy compiler for Gen8
Based on what we know from the classic driver.
2015-02-12 07:56:11 +08:00
Chia-I Wu 0066c22c40 ilo: update genhw headers
Accumulated changes for various renames and additions, including Gen8
definitions.  Some of the dynamic state __SIZE no longer means the size of an
element, but the size of an array of elements.  The changes can be seen in
ilo_render_dynamic.c.
2015-02-12 07:56:10 +08:00
Chia-I Wu 5933d84ad6 ilo: clean up ilo_gpe_init_dsa()
Add dsa_get_stencil_enable_gen6(), dsa_get_depth_enable_gen6(), and
dsa_get_alpha_enable_gen6() to be called from ilo_gpe_init_dsa().
2015-02-12 07:56:10 +08:00
Chia-I Wu aa354b92d2 ilo: clean up ilo_gpe_init_blend()
Make ilo_blend_state more space efficient and forward-looking.
2015-02-12 07:56:10 +08:00
Chia-I Wu 1d07055b50 ilo: clean up sample patterns
Use signed int for sample positions and add helpers to access them.  Call them
patterns instead of positions.
2015-02-12 07:56:10 +08:00
Matt Turner 69ad5fd4ce glsl: Optimize (f2i(trunc x)) into (f2i x).
total instructions in shared programs: 5950326 -> 5949286 (-0.02%)
instructions in affected programs:     88264 -> 87224 (-1.18%)
helped:                                692
2015-02-11 13:50:19 -08:00
Matt Turner c262b2b582 glsl: Optimize round-half-up pattern.
Hurts some Psychonauts shaders, but after the next patch (which this
enables) they're fewer instructions than before this patch.
2015-02-11 13:50:19 -08:00
Matt Turner a5455ab1ca glsl: Add trunc() to ir_builder. 2015-02-11 13:50:19 -08:00
Matt Turner d91390634f i965: Add LINTERP/CINTERP to can_do_cmod().
LINTERP is implemented as a PLN instruction or a LINE+MAC. PLN and MAC
can do conditional mod. CINTERP is just a MOV.

total instructions in shared programs: 5952103 -> 5950284 (-0.03%)
instructions in affected programs:     324573 -> 322754 (-0.56%)
helped:                                1819

We lose the SIMD16 in one Unigine Heaven shader which appears six times
in shader-db.
2015-02-11 13:50:19 -08:00
Matt Turner 245c7848fc program: Remove _mesa_nop_vertex_program/_mesa_nop_fragment_program.
Dead since

   commit 284ce20901
   Author: Eric Anholt <eric@anholt.net>
   Date:   Fri Aug 20 10:52:14 2010 -0700

       Remove remnants of the old glsl compiler.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2015-02-11 13:50:19 -08:00
Matt Turner 4c42e1116b nir: Recognize open-coded fmin/fmax.
And unfortunately other shaders do the same thing but with >=/<= which
we can't apply this optimization to because of NaNs.

instructions in affected programs:     23309 -> 22938 (-1.59%)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2015-02-11 13:50:19 -08:00
Eric Anholt 56e21647e2 nir: Add algebraic opt for int comparisons with identical operands.
No change on shader-db on i965.

v2: Reword the comment due to feedback from Erik Faye-Lund

Reviewed-by: Connor Abbott <cwabbott0@gmail.com> (v1)
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com> (v1)
2015-02-11 11:52:38 -08:00
Eric Anholt 2919bdf466 nir: Fix load_const comparisons for CSE.
We want the size of a float per component, not the size of a whole vec4.

NIR instructions on i965:
total instructions in shared programs: 1261937 -> 1261929 (-0.00%)
instructions in affected programs:     114 -> 106 (-7.02%)

Looking at one of these examples (tesseract), it's from vec4 load_consts
for a MRT solid fill, which do get CSEed now that we don't memcmp off the
end of the const value and into the SSA def.  For the 1-component loads
that are common in i965, we were only memcmping off into the rest of the
usually zero-filled const_value.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
2015-02-11 11:52:38 -08:00
Matt Turner 09d6ea9ae3 i965/fs: Remove conditional mod when optimizing a SEL into a MOV.
Missed in commit ca675b73, but got right in the companion commit 3c28b2c0.
2015-02-11 10:26:49 -08:00