mesa.git
8 years agoandroid: i965: add per-gen libmesa_i965_gen{8,9} static
Mauro Rossi [Fri, 19 Aug 2016 22:04:29 +0000 (00:04 +0200)]
android: i965: add per-gen libmesa_i965_gen{8,9} static

Needed to fix android build after commit 16a9fcb
which enabled genxml for gen{8,9} state setup

This is the last patch needed, android build tested successfully.

8 years agoandroid: i965: add per-gen libmesa_i965_gen{7,75} static libraries
Mauro Rossi [Fri, 19 Aug 2016 21:55:54 +0000 (23:55 +0200)]
android: i965: add per-gen libmesa_i965_gen{7,75} static libraries

Needed to fix android build after commit e198983
which enabled genxml for gen{7,75} state setup

Android build fix for gen{8,9} will follow as incremental patch,
build tested successfully with all per-gen patches applied.

8 years agoandroid: i965: add per-gen libmesa_i965_gen6 static library
Mauro Rossi [Fri, 19 Aug 2016 21:36:11 +0000 (23:36 +0200)]
android: i965: add per-gen libmesa_i965_gen6 static library

Needed to fix android build after commit c8bc1ae
where new per-gen genX_blorp.c source replaced gen6_blorp.c for gen6

Android build fixes for gen{7,75} and gen{8,9} will follow as incremental patches,
build tested successfully with all per-gen patches applied.

8 years agoglsl: Rename link_fs_input_layout_qualifiers to "inout".
Kenneth Graunke [Tue, 28 Jun 2016 17:00:18 +0000 (10:00 -0700)]
glsl: Rename link_fs_input_layout_qualifiers to "inout".

We're going to handle output qualifiers here too, and calling it "inout"
seems to be the going convention.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
8 years agoi965/cfg: Factor common code out of switch statement.
Matt Turner [Wed, 17 Aug 2016 18:40:01 +0000 (11:40 -0700)]
i965/cfg: Factor common code out of switch statement.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
8 years agoanv: Give the installed intel_icd.json file an absolute path
Jason Ekstrand [Fri, 19 Aug 2016 16:01:14 +0000 (09:01 -0700)]
anv: Give the installed intel_icd.json file an absolute path

Not providing a path allows the ICD to work on multi-arch systems but
breaks it if you install anywhere other than /usr/lib.  Given that users
may be installing locally in .local or similar, we probably do want to
provide a filename.  Distros can carry a revert of this commit if they want
an intel_icd.json file without the path.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Chad Versace <chad@kiwitree.net>
8 years agomesa: Fix fixed function spot lighting on newer hardware (again)
Daniel Scharrer [Sat, 20 Aug 2016 02:23:29 +0000 (04:23 +0200)]
mesa: Fix fixed function spot lighting on newer hardware (again)

This was first fixed in commit b3f9c5c and then broken again in commit
fe2d2c7, which removed the abs modifier from input registers.

v2: Don't change the size of struct ureg.

Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91342
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Daniel Scharrer <daniel@constexpr.org>
8 years agoi965: Remove comment within a comment.
Matt Turner [Fri, 19 Aug 2016 23:54:42 +0000 (16:54 -0700)]
i965: Remove comment within a comment.

8 years agollvmpipe: fix issues with depth clamp
Roland Scheidegger [Sat, 20 Aug 2016 02:03:11 +0000 (04:03 +0200)]
llvmpipe: fix issues with depth clamp

We only did depth clamp when the value was written from the fs.
This is very wrong both for d3d10 and GL, and only passed the
corresponding piglit test due to pure luck (it no longer does
with the enhanced test).
Also, interpolation clamped values to 1.0 always, which can legitimately
happen if depth clip is disabled, so fix that as well (untested).
There is one unresolved issue left, d3d10 always does depth clamping,
whereas GL does not (but does [0,1] clamp instead for fs depth outputs)
- this information isn't in any gallium state object, leave it as-is
for now (though it looks like llvmpipe misses the [0,1] clamp as well).
This (with the previous patch) fixes piglit depth-clamp-range test.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
8 years agollvmpipe: fix depth clamping wrt reversed near/far values
Roland Scheidegger [Mon, 15 Aug 2016 03:22:30 +0000 (05:22 +0200)]
llvmpipe: fix depth clamping wrt reversed near/far values

This wasn't handled before (the result was that no matter what value got
clamped, it always ended up as the near value in this case) (if clamping
actually happened).
Fix this by using the util helper for that (the math is otherwise "mostly"
the same, mostly because there could actually be differences due to float
rounding, but I don't even know which one would be more correct).

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
8 years agoi965/sched: Simplify work done by add_barrier_deps().
Matt Turner [Thu, 18 Aug 2016 23:47:05 +0000 (16:47 -0700)]
i965/sched: Simplify work done by add_barrier_deps().

Scheduling barriers are implemented by placing a dependence on every
node before and after the barrier. This is unnecessary as we can limit
the number of nodes we place dependencies on to those between us and the
next barrier in each direction.

Runtime of dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.23
is reduced from ~25 minutes to a little more than three.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94681
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agoi965/vec4: Ignore swizzle of VGRF for use by var_range_end().
Matt Turner [Thu, 18 Aug 2016 22:54:47 +0000 (15:54 -0700)]
i965/vec4: Ignore swizzle of VGRF for use by var_range_end().

var_range_end(v, n) loops over the n components of variable number v and
finds the maximum value, giving the last use of any component of v.
Therefore it expects v to correspond to the variable associated with the
.x channel of the VGRF.

var_from_reg() however returns the variable for the first channel of the
VGRF, post-swizzle.

So, if the last register had a swizzle with y, z, or w in the swizzle
component, we would read out of bounds. For any other register, we would
read liveness information from the next register.

The fix is to convert the src_reg to a dst_reg in order to call the
dst_reg version of var_from_reg() that doesn't consider the swizzle.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agoi965/vec4: Print spills:fills.
Matt Turner [Fri, 12 Aug 2016 18:44:26 +0000 (11:44 -0700)]
i965/vec4: Print spills:fills.

Allows shader-db to work on vec4 programs (has been broken since
shader-db commit 646df5ca98b2 from April!)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agoa4xx: make sure to actually clamp depth as requested
Ilia Mirkin [Mon, 15 Aug 2016 03:58:18 +0000 (23:58 -0400)]
a4xx: make sure to actually clamp depth as requested

We were previously ... not clamping. I guess this meant that everything
got clamped to 1/0, which was enough to pass the existing tests. Or
perhaps the clamping would only happen to the rasterized depth value and
not the frag shader's output depth value.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97231
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
8 years agoa4xx: only disable depth clipping, not all clipping, when requested
Ilia Mirkin [Fri, 19 Aug 2016 00:12:29 +0000 (20:12 -0400)]
a4xx: only disable depth clipping, not all clipping, when requested

The previous bit disables the whole clipper, including the regular
viewport-related clipping that would go on. The two new bits disable
near and far clipping (separately, as verified with the
depth-clamp-range piglit).

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
8 years agovc4: Switch store_output to using nir_lower_io_to_scalar / component.
Eric Anholt [Fri, 5 Aug 2016 00:31:02 +0000 (17:31 -0700)]
vc4: Switch store_output to using nir_lower_io_to_scalar / component.

8 years agovc4: Use the intrinsic's first_component for vattr VPM index.
Eric Anholt [Thu, 4 Aug 2016 23:33:16 +0000 (16:33 -0700)]
vc4: Use the intrinsic's first_component for vattr VPM index.

Avoids another multiplication by 4 of the base in the NIR.

8 years agovc4: Convert to using nir_lower_io_scalar for FS inputs.
Eric Anholt [Thu, 4 Aug 2016 22:00:37 +0000 (15:00 -0700)]
vc4: Convert to using nir_lower_io_scalar for FS inputs.

The scalarizing of FS inputs can be done in a non-driver-dependent manner,
so extract it out of the driver.

8 years agovc4: Switch to using the intrinsic accessors.
Eric Anholt [Thu, 4 Aug 2016 21:42:14 +0000 (14:42 -0700)]
vc4: Switch to using the intrinsic accessors.

The const_index[] values have always felt magic, and this documents them a
bit better.

8 years agonir: Add an IO scalarizing pass using the intrinsic's first_component.
Eric Anholt [Thu, 4 Aug 2016 19:42:45 +0000 (12:42 -0700)]
nir: Add an IO scalarizing pass using the intrinsic's first_component.

vc4 wants to have per-scalar IO load/stores so that dead code elimination
can happen on a more granular basis, which it has been doing in the
backend using a multiplication by 4 of the intrinsic's driver_location.
We can represent it properly in the NIR using the first_component field,
though.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agonir: Add nir_builder support for individual system value loads.
Eric Anholt [Sat, 6 Aug 2016 00:10:18 +0000 (17:10 -0700)]
nir: Add nir_builder support for individual system value loads.

The previous nir_load_system_value(b, nir_intrinsic_load_whatever), 0) was
rather verbose, when system values should be easy to generate.

The index is left out because only one system value had an index included
in it.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agonir: Move the undef of nir_intrinsics.h macros to the .h.
Eric Anholt [Sat, 6 Aug 2016 06:45:37 +0000 (23:45 -0700)]
nir: Move the undef of nir_intrinsics.h macros to the .h.

I wanted to include this from nir_builder as well, so it also needed the
undefs.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agottn: Use nir_load_front_face instead of the TGSI-style input.
Eric Anholt [Thu, 4 Aug 2016 20:20:31 +0000 (13:20 -0700)]
ttn: Use nir_load_front_face instead of the TGSI-style input.

This reduces the diff between GLSL-to-NIR and TGSI-to-NIR, and gives NIR
more optimization to work on.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agonir: Use the system-value front face for twoside lowering.
Eric Anholt [Fri, 5 Aug 2016 18:21:56 +0000 (11:21 -0700)]
nir: Use the system-value front face for twoside lowering.

GLSL-to-NIR generates system value usage, and vc4/freedreno would both
like the system value instead of the varying, so switch this pass over to
it.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agottn: Make FRAG_RESULT_DEPTH be a float variable to match gtn and ptn.
Eric Anholt [Tue, 26 Jul 2016 23:19:15 +0000 (16:19 -0700)]
ttn: Make FRAG_RESULT_DEPTH be a float variable to match gtn and ptn.

This lets TTN-using drivers handle FRAG_RESULT_DEPTH the same between all
their source paths.

Reviewed-by: Rob Clark <robdclark@gmail.com>
8 years agovc4: Dump the TGSI before trying to convert it to NIR.
Eric Anholt [Thu, 4 Aug 2016 20:30:10 +0000 (13:30 -0700)]
vc4: Dump the TGSI before trying to convert it to NIR.

In the case of debugging a crash in TTN, this is nice to have.

8 years agoradeon/vce: set flag based on dual instance enablement
Boyuan Zhang [Mon, 15 Aug 2016 14:36:14 +0000 (10:36 -0400)]
radeon/vce: set flag based on dual instance enablement

Set the flag on when dual instance encoding is supported,
otherwise set it to off.

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
8 years agost/va: enable dual instances encode by sync surface
Boyuan Zhang [Mon, 15 Aug 2016 17:23:30 +0000 (13:23 -0400)]
st/va: enable dual instances encode by sync surface

This patch improves the performance of Vaapi Encode by enabling dual
instances encoding. flush function is not called after each end_frame
call. radeon/vce will do flush whenever 2 frames are submitted for
encoding. Implement sync surface function to flush only if the frame
hasn't been flushed yet.

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
8 years agoi965/blorp: Remove no longer used state setup helpers
Jason Ekstrand [Wed, 10 Aug 2016 02:30:13 +0000 (19:30 -0700)]
i965/blorp: Remove no longer used state setup helpers

Now that we're using genxml for everything, we no longer need the
hand-rolled state emit helpers.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agoi965/blorp: Use genxml for gen8-9 state setup
Jason Ekstrand [Wed, 10 Aug 2016 02:27:58 +0000 (19:27 -0700)]
i965/blorp: Use genxml for gen8-9 state setup

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agoi965/blorp: Use genxml for gen7 state setup
Jason Ekstrand [Tue, 9 Aug 2016 04:32:30 +0000 (21:32 -0700)]
i965/blorp: Use genxml for gen7 state setup

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agoi965/blorp: Add genxml-based vertex setup helpers
Jason Ekstrand [Thu, 11 Aug 2016 02:55:10 +0000 (19:55 -0700)]
i965/blorp: Add genxml-based vertex setup helpers

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agoi965/blorp: Add a helper for emitting surface states
Jason Ekstrand [Thu, 11 Aug 2016 00:11:45 +0000 (17:11 -0700)]
i965/blorp: Add a helper for emitting surface states

The new helper emits surface states and the binding table in one go.  It's
nice to have it pulled out of the main blorp_exec function.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agoi965/blorp: Add genxml-based sampler state emit function
Jason Ekstrand [Wed, 10 Aug 2016 23:41:34 +0000 (16:41 -0700)]
i965/blorp: Add genxml-based sampler state emit function

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agoi965/blorp: Add genxml-based dynamic state emit functions
Jason Ekstrand [Wed, 10 Aug 2016 22:55:11 +0000 (15:55 -0700)]
i965/blorp: Add genxml-based dynamic state emit functions

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agoi965: Move gen6_blorp.c to a file that gets recompiled per-gen
Jason Ekstrand [Mon, 8 Aug 2016 21:07:12 +0000 (14:07 -0700)]
i965: Move gen6_blorp.c to a file that gets recompiled per-gen

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>
8 years agoi965/blorp/gen6: Use genxml packing structs for state setup
Jason Ekstrand [Fri, 5 Aug 2016 21:43:51 +0000 (14:43 -0700)]
i965/blorp/gen6: Use genxml packing structs for state setup

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agoi965/blorp: Stop setting point and line rasterization rules
Jason Ekstrand [Wed, 10 Aug 2016 00:25:51 +0000 (17:25 -0700)]
i965/blorp: Stop setting point and line rasterization rules

Blorp never uses points or lines and the default values of 0 are perfectly
fine.  Explicitly setting them is just noise.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agoi965/blorp/gen8: Move viewport setup to after wm state
Jason Ekstrand [Tue, 9 Aug 2016 22:45:04 +0000 (15:45 -0700)]
i965/blorp/gen8: Move viewport setup to after wm state

This matches gen6 and gen7.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agoi965/blorp/gen6-7: Move multisample setup to right after samplers
Jason Ekstrand [Tue, 9 Aug 2016 22:43:07 +0000 (15:43 -0700)]
i965/blorp/gen6-7: Move multisample setup to right after samplers

This mimics gen8 blorp

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agoi965/blorp/gen6-7: Move surfaces and samplers closer together
Jason Ekstrand [Tue, 9 Aug 2016 22:38:04 +0000 (15:38 -0700)]
i965/blorp/gen6-7: Move surfaces and samplers closer together

This mimics what we do on gen8.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agoi965/blorp/gen7-8: Emit depth stencil state with CC and BLEND
Jason Ekstrand [Tue, 9 Aug 2016 22:19:47 +0000 (15:19 -0700)]
i965/blorp/gen7-8: Emit depth stencil state with CC and BLEND

All three go together on SNB so let's keep them together for gen7+ as well.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agoi965/blorp/gen6: Move constant disables higher up
Jason Ekstrand [Tue, 9 Aug 2016 22:16:27 +0000 (15:16 -0700)]
i965/blorp/gen6: Move constant disables higher up

This is what gen7-8 do and it's a bit cleaner.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agoi965/blorp: Don't clear an empty region
Jason Ekstrand [Mon, 8 Aug 2016 19:10:26 +0000 (12:10 -0700)]
i965/blorp: Don't clear an empty region

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agoi965/blorp: Move the non-static blorp state setup helpers to another file
Jason Ekstrand [Sat, 6 Aug 2016 00:16:37 +0000 (17:16 -0700)]
i965/blorp: Move the non-static blorp state setup helpers to another file

We're about to start replacing blorp state setup code with packing structs
and we want to feel free to delete files as we go.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agoi965/blorp: Make gen6 VS and GS disable helpers static
Jason Ekstrand [Tue, 9 Aug 2016 22:06:45 +0000 (15:06 -0700)]
i965/blorp: Make gen6 VS and GS disable helpers static

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agoi965: Roll intel_reg.h into brw_defines.h
Jason Ekstrand [Tue, 9 Aug 2016 00:48:36 +0000 (17:48 -0700)]
i965: Roll intel_reg.h into brw_defines.h

More than half of the stuff in intel_reg.h had nothing whatsoever to do
with registers and really belongs in brw_defines.h anyway.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agoi965: Stop including brw_defines.h in brw_state.h
Jason Ekstrand [Tue, 9 Aug 2016 00:30:30 +0000 (17:30 -0700)]
i965: Stop including brw_defines.h in brw_state.h

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agoi965/state: Move is_drawing_lines/points to gen6_clip_state.c
Jason Ekstrand [Tue, 9 Aug 2016 00:23:10 +0000 (17:23 -0700)]
i965/state: Move is_drawing_lines/points to gen6_clip_state.c

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agogenxml/gen9: Make 3DSTATE_SBE::AttributeActiveComponentFormat an array
Jason Ekstrand [Thu, 11 Aug 2016 10:24:32 +0000 (03:24 -0700)]
genxml/gen9: Make 3DSTATE_SBE::AttributeActiveComponentFormat an array

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agogenxml: Add a uint MOCS field to VERTEX_BUFFER_STATE
Jason Ekstrand [Thu, 11 Aug 2016 07:27:22 +0000 (00:27 -0700)]
genxml: Add a uint MOCS field to VERTEX_BUFFER_STATE

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agogenxml: Make a couple of VERTEX_BUFFER_STATE fields boolean
Jason Ekstrand [Thu, 11 Aug 2016 07:12:43 +0000 (00:12 -0700)]
genxml: Make a couple of VERTEX_BUFFER_STATE fields boolean

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agogenxml: Make VERTEX_ELEMENT_STATE::Valid a bool
Jason Ekstrand [Thu, 11 Aug 2016 02:49:46 +0000 (19:49 -0700)]
genxml: Make VERTEX_ELEMENT_STATE::Valid a bool

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agogenxml/gen6: Make SAMPLER_STATE look a bit more like gen7
Jason Ekstrand [Wed, 10 Aug 2016 23:40:44 +0000 (16:40 -0700)]
genxml/gen6: Make SAMPLER_STATE look a bit more like gen7

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agogenxml: Add a uint MOCS field to DEPTH_BUFFER packets
Jason Ekstrand [Tue, 9 Aug 2016 15:32:09 +0000 (08:32 -0700)]
genxml: Add a uint MOCS field to DEPTH_BUFFER packets

This is easier than dealing with structs all the time

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agogenxml/gen6: Make "Depth Clear Value" a uint
Jason Ekstrand [Tue, 9 Aug 2016 15:18:20 +0000 (08:18 -0700)]
genxml/gen6: Make "Depth Clear Value" a uint

The actual data storred is in float, UNORM24, or UNORM16 depending on the
actual depth format.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agogenxml/gen6: Add the 3D_Prim_Topo_Type enum
Jason Ekstrand [Tue, 9 Aug 2016 00:32:10 +0000 (17:32 -0700)]
genxml/gen6: Add the 3D_Prim_Topo_Type enum

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agogenxml/gen6: Fix the length of 3DSTATE_WM
Jason Ekstrand [Sat, 6 Aug 2016 05:28:26 +0000 (22:28 -0700)]
genxml/gen6: Fix the length of 3DSTATE_WM

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agogenxml/gen6: Add a Surface Base Address field to HIER_DEPTH_BUFFER
Jason Ekstrand [Fri, 5 Aug 2016 23:26:57 +0000 (16:26 -0700)]
genxml/gen6: Add a Surface Base Address field to HIER_DEPTH_BUFFER

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agogenxml/gen6: Add uint MOCS fields for most things
Jason Ekstrand [Fri, 5 Aug 2016 21:17:18 +0000 (14:17 -0700)]
genxml/gen6: Add uint MOCS fields for most things

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agonir: Rely on the fact that bcsel takes a well formed boolean.
Kenneth Graunke [Wed, 17 Aug 2016 22:03:01 +0000 (15:03 -0700)]
nir: Rely on the fact that bcsel takes a well formed boolean.

According to Connor, it's safe to assume that the first operand of
bcsel, as well as the operand of b2f and b2i, must be well formed
booleans.

https://lists.freedesktop.org/archives/mesa-dev/2016-August/125658.html

With the previous improvements to a@bool handling, this now has no
change in shader-db instruction counts on Broadwell.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
8 years agoi965/sched: Change the scheduling heuristics to favor early program termination.
Francisco Jerez [Fri, 12 Aug 2016 23:13:16 +0000 (16:13 -0700)]
i965/sched: Change the scheduling heuristics to favor early program termination.

This uses the unblocked time of the exit assigned to each available
node to attempt to unblock exit nodes as early as possible,
potentially reducing the runtime of the shader when an exit branch is
taken.  There is a natural trade-off between terminating the program
as early as possible and reducing the worst-case latency of the
program as a whole (since this will typically move exit-unblocking
nodes closer to its dependencies potentially causing additional stalls
of the execution pipeline), but in practice the bandwidth and ALU
cycle savings from terminating the program earlier tend to outweigh
the slight increase in worst-case program execution latency, so it
makes sense to prefer nodes likely to unblock an earlier exit
regardless of the latency benefits of other available nodes.

I haven't observed any benchmark regressions from this change after
testing on VLV, HSW, BDW, BSW and SKL.  The FPS of the GfxBench
Manhattan benchmark increases by 10%-20% and the FPS of Unigine Valley
improves by roughly 5% depending on the platform and settings.

The change to the register pressure-sensitive heuristic is rather
conservative and gives precedence to the existing heuristic in order
to avoid increasing register pressure and causing spill count and SIMD
width regressions in shader-db.  It may make sense to revisit this
with additional performance data.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoi965/sched: Assign a preferred exit node to each node of the dependency graph.
Francisco Jerez [Tue, 16 Aug 2016 07:56:04 +0000 (00:56 -0700)]
i965/sched: Assign a preferred exit node to each node of the dependency graph.

This adds a bit of metadata to schedule_node that will be used to
compare available nodes in the scheduling heuristic code based on
which of them unblocks the earliest successor exit node.  Note that
assigning exit nodes wouldn't be necessary in a bottom-up scheduler
because we could achieve the same effect by scheduling the exit nodes
themselves appropriately.

No shader-db changes.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoi965/sched: Calculate the critical path of scheduling nodes non-recursively.
Francisco Jerez [Tue, 16 Aug 2016 07:01:31 +0000 (00:01 -0700)]
i965/sched: Calculate the critical path of scheduling nodes non-recursively.

The critical path of each node is calculated by induction based on the
critical paths of its children, which can be done in a post-order
depth-first traversal of the dependency graph.  The current code
implements graph traversal by iterating over all nodes of the graph
and then recursing into its children -- But it turns out that
recursion is unnecessary because the lexical order of instructions in
the block is already a good enough reverse post-order of the
dependency graph (if it weren't a reverse post-order some instruction
would have been located before one of its dependencies in the original
ordering of the basic block, which is impossible), so we just need to
walk the instruction list in reverse to achieve the same result more
efficiently.

No shader-db changes.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoi965/fs: Switch to per-subspan discard jumps.
Francisco Jerez [Mon, 8 Aug 2016 19:43:18 +0000 (12:43 -0700)]
i965/fs: Switch to per-subspan discard jumps.

ANY4H is more efficient than ANY8H and ANY16H because it makes sure
that whenever a whole subspan hits a discard statement it gets
disabled by the EU until the end of the program, regardless of whether
the discard condition is uniform across all channels of the SIMD8-16
thread.  OTOH ANY8H/ANY16H would cause the rest of the program to be
executed for *all* channels if only one of the channels hadn't taken
the discard branch, potentially increasing the bandwidth and ALU usage
of the program unnecessarily.

This change increases the FPS by over 3x of a simple micro-benchmark
that discards a bunch of fragments and then does a single costly
texturing operation.  I've just re-verified the FPS change on HSW and
SKL, but I expect all platforms from Gen6 up to get a similar benefit.

Note that we could potentially be more aggressive and use the NORMAL
predicate to discard individual channels, but that would need to
happen post-scheduling because the scheduler currently doesn't care to
reorder HALT instructions with respect to other instructions, and the
NORMAL predicate would cause the results of subsequent derivative
computations to become undefined -- If the scheduler didn't reorder
HALT instructions it would actually be safe to switch to NORMAL
because the behavior of derivative computations after a non-uniform
discard statement is undefined by the GLSL spec, but that would make
the optimization implemented by one of the following commits somewhat
more difficult.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoi965/fs: Drop bogus writemasking disable bit from HALT instructions.
Francisco Jerez [Mon, 8 Aug 2016 19:44:12 +0000 (12:44 -0700)]
i965/fs: Drop bogus writemasking disable bit from HALT instructions.

This may have been the reason people ran into problems with
non-uniform HALT instructions and ended up using the inefficient
ANY16H/ANY8H predicates instead of ANY4H or NORMAL in order to prevent
non-uniform discard.  The HALT instruction is able to handle
non-uniform execution masks just fine.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agomesa: avoid valgrind warning due to opaque only being set sometimes
Ilia Mirkin [Fri, 8 Jul 2016 05:35:15 +0000 (01:35 -0400)]
mesa: avoid valgrind warning due to opaque only being set sometimes

Valgrind complains with a "Conditional jump or move depends on
uninitialised value(s)" warning due to opaque being conditionally
initialized. However in the punchthrough_alpha == true case, it is
always initialized, so just flip the condition around to silence the
warning.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
8 years agovbo: remove unnecessary max_basevertex computation
Ilia Mirkin [Wed, 17 Aug 2016 21:12:10 +0000 (17:12 -0400)]
vbo: remove unnecessary max_basevertex computation

The max basevertex is already computed and added into max_index by the
caller, _tnl_draw_prims.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
8 years agovbo: add basevertex when looking up elements for vbo splitting
Ilia Mirkin [Wed, 17 Aug 2016 21:12:09 +0000 (17:12 -0400)]
vbo: add basevertex when looking up elements for vbo splitting

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97351
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
8 years agoradeonsi: initialize and finalize the LLVM function pass manager
Marek Olšák [Thu, 11 Aug 2016 22:57:30 +0000 (00:57 +0200)]
radeonsi: initialize and finalize the LLVM function pass manager

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
8 years agoisl: automake: use VISIBILITY_CFLAGS to restrict symbol visibility
Emil Velikov [Thu, 28 Jul 2016 13:43:46 +0000 (14:43 +0100)]
isl: automake: use VISIBILITY_CFLAGS to restrict symbol visibility

v2: Add VISIBILITY_CFLAGS to AM_CFLAGS (Ken)

Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> (v1)
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoanv: remove dummy VK_DEBUG_MARKER_EXT entry points
mil Velikov [Wed, 27 Jul 2016 15:19:41 +0000 (08:19 -0700)]
anv: remove dummy VK_DEBUG_MARKER_EXT entry points

The vkCmdDbgMarker{Begin,End} symbols are exported, yet the json does no
advertise that the driver supports the extension. Furthermore the
functions are empty stubs.

Remove those until we get a proper implementation and json notation.

Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Cc: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoanv: do not export the Vulkan API
Emil Velikov [Wed, 27 Jul 2016 13:02:53 +0000 (14:02 +0100)]
anv: do not export the Vulkan API

With version 1 of the Loader interface there is an internal/private symbol
(vk_icdGetInstanceProcAddr) which is used to retrieve all the API from the
Vulkan entrypoints from the ICD. Implying that exposing the Vulkan API is not
recommended.

Version 2 goes a step further explicitly forbiding the ICD from exposing Vulkan
symbols (and adding a negotiation API)

As a reference:
 - Nvidia 367.35
Missing negotiation API - version 1.
Exposes only vk_icdGetInstanceProcAddr.

 - AMD 16.30.3.306809
Have negotiation API - version 2,
Exposes vk_icdGetInstanceProcAddr.
Exposes a couple of Vulkan entry points - seems to be in violation with the spec.

Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Cc: Christian König <christian.koenig@amd.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoanv: automake: build with -Bsymbolic
Emil Velikov [Wed, 27 Jul 2016 13:02:52 +0000 (14:02 +0100)]
anv: automake: build with -Bsymbolic

Explicitly suggested in the Loader interface version 2 section, but it's good
idea either way. It essentially, ensures that our symbols are not interposed.

Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Cc: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoanv: automake: use VISIBILITY_CFLAGS to restrict symbol visibility
Emil Velikov [Thu, 28 Jul 2016 13:40:08 +0000 (14:40 +0100)]
anv: automake: use VISIBILITY_CFLAGS to restrict symbol visibility

Hide the internal symbols and annotate the vk_icdGetInstanceProcAddr as public
since the loader needs it (since v1 of the loader interface).

v2: Add VISIBILITY_CFLAGS to AM_CFLAGS (Ken)

Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> (v1)
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoanv: remove internal 'validate' layer
Emil Velikov [Thu, 28 Jul 2016 13:39:21 +0000 (14:39 +0100)]
anv: remove internal 'validate' layer

Presently the layer has only a single entry point. As mentioned by Jason the
function does not validate anything that isn't checked elsewhere, thus we can
drop the whole thing.

Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Cc: Jason Ekstrand <jason@jlekstrand.net>
Suggested-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agonir/search: Extend 'a@bool' to handle a couple of system values.
Kenneth Graunke [Wed, 17 Aug 2016 22:03:00 +0000 (15:03 -0700)]
nir/search: Extend 'a@bool' to handle a couple of system values.

load_front_face and load_helper_invocation produce booleans.

On Broadwell:

total instructions in shared programs: 11638956 -> 11638011 (-0.01%)
instructions in affected programs: 115093 -> 114148 (-0.82%)
helped: 628
HURT: 14

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agonir/search: Fold src_is_bool()/alu_instr_is_bool() into src_is_type().
Kenneth Graunke [Wed, 17 Aug 2016 22:02:59 +0000 (15:02 -0700)]
nir/search: Fold src_is_bool()/alu_instr_is_bool() into src_is_type().

I don't want src_is_bool() and src_is_type(x, nir_type_bool) to behave
differently.  Having the logic spread out over three functions makes it
harder to decide where to put new logic, as well.

So, combine them all.  It's a bit simpler because there's now only one
recursive function rather than a pair of mutually recursive functions.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agonir/search: Introduce a src_is_type() helper for 'a@type' handling.
Kenneth Graunke [Wed, 17 Aug 2016 22:02:58 +0000 (15:02 -0700)]
nir/search: Introduce a src_is_type() helper for 'a@type' handling.

Currently, 'a@type' can only match if 'a' is produced by an ALU
instruction.  This is rather limited - there are other cases we
can easily detect which we should handle.

Extending the code in-place would be fairly messy, so we introduce
a new src_is_type() helper.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoi965: Fix barrier count shift in scalar TCS backend.
Kenneth Graunke [Wed, 17 Aug 2016 13:35:01 +0000 (06:35 -0700)]
i965: Fix barrier count shift in scalar TCS backend.

The "Barrier Count" field goes in 14:9 of m0.2.  The vec4 backend
correctly shifts by 9, but the scalar backend only shifted by 8.

It's not like this changed - I think I just made a typo when writing
the original scalar TCS backend code.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
8 years agoi965: Fix execution size of scalar TCS barrier setup code.
Kenneth Graunke [Wed, 17 Aug 2016 13:26:01 +0000 (06:26 -0700)]
i965: Fix execution size of scalar TCS barrier setup code.

Previously, the scalar TCS backend was generating:

mov(8)   g17<1>UD     0x00000000UD    { align1 WE_all 1Q compacted };
and(8)   g17.2<1>UD   g0.2<0,1,0>UD   0x0001e000UD  { align1 WE_all 1Q };
shl(8)   g17.2<1>UD   g17.2<8,8,1>UD  0x0000000bUD  { align1 WE_all 1Q };
or(8)    g17.2<1>UD   g17.2<8,8,1>UD  0x00008200UD  { align1 WE_all 1Q };
send(8)  null<1>UW    g17<8,8,1>UD
         gateway (barrier msg) mlen 1 rlen 0 { align1 WE_all 1Q };

This is rubbish - g17.2<8,8,1>UD spans two registers, and is an illegal
region.  Not to mention it clobbers 8 channels of data when we only
wanted to touch m0.2.

Instead, we want:

mov(8)   g17<1>UD     0x00000000UD    { align1 WE_all 1Q compacted };
and(1)   g17.2<1>UD   g0.2<0,1,0>UD   0x0001e000UD  { align1 WE_all };
shl(1)   g17.2<1>UD   g17.2<0,1,0>UD  0x0000000bUD  { align1 WE_all };
or(1)    g17.2<1>UD   g17.2<0,1,0>UD  0x00008200UD  { align1 WE_all };
send(8)  null<1>UW    g17<8,8,1>UD
         gateway (barrier msg) mlen 1 rlen 0 { align1 WE_all 1Q };

Using component() accomplishes this.

Fixes GL44-CTS.tessellation_shader.tessellation_shader_tc_barriers.
barrier_guarded_read_write_calls on Skylake.  Probably fixes other
barrier issues on Gen8+.

v2: Use a group(1, 0) builder so inst->exec_size is set correctly
    (thanks to Francisco Jerez for catching that it was incorrect).

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> [v1]
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
8 years agoi965: Implement the WaPreventHSTessLevelsInterference workaround.
Kenneth Graunke [Wed, 8 Jun 2016 01:18:49 +0000 (18:18 -0700)]
i965: Implement the WaPreventHSTessLevelsInterference workaround.

Fixes several GL44-CTS.tessellation_shader (and GL45 and ES31) subcases:
- vertex_spacing
- tessellation_shader_point_mode.points_verification
- tessellation_shader_quads_tessellation.inner_tessellation_level_rounding

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
8 years agonir/builder: Add bany_inequal and bany helpers.
Kenneth Graunke [Wed, 17 Aug 2016 12:03:29 +0000 (05:03 -0700)]
nir/builder: Add bany_inequal and bany helpers.

The first simply picks the bany_inequal[234] opcodes based on the SSA
def's number of components.  The latter implicitly compares with zero
to achieve the same semantics of GLSL's any().

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
8 years agomesa: Fix uf10_to_f32() scale factor in the E == 0 and M != 0 case.
Kenneth Graunke [Tue, 16 Aug 2016 05:26:42 +0000 (22:26 -0700)]
mesa: Fix uf10_to_f32() scale factor in the E == 0 and M != 0 case.

GL_EXT_packed_float, 2.1.B Unsigned 10-Bit Floating-Point Numbers:

        0.0,                      if E == 0 and M == 0,
        2^-14 * (M / 32),         if E == 0 and M != 0,
        2^(E-15) * (1 + M/32),    if 0 < E < 31,
        INF,                      if E == 31 and M == 0, or
        NaN,                      if E == 31 and M != 0,

In the second case (E == 0 and M != 0), we were multiplying the mantissa
by 2^-20, when we should have been multiplying by 2^-19 (which is
2^(-14 + -5), or 2^-14 * 2^-5, or 2^-14 / 32).

The previous section defines the formula for 11-bit numbers, which is:

        2^-14 * (M / 64),         if E == 0 and M != 0,

In other words, we had accidentally copy and pasted the 11-bit code
to the 10-bit case, and neglected to change the exponent.

Fixes dEQP-GLES3.functional.pbo.renderbuffer.r11f_g11f_b10f_triangles
when run with surface dimensions of 1536x1152 or 1920x1080.

Cc: mesa-stable@lists.freedesktop.org
References: https://code.google.com/p/chrome-os-partner/issues/detail?id=56244
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Stephane Marchesin <stephane.marchesin@gmail.com>
Reviewed-by: Antia Puentes <apuentes@igalia.com>
8 years agoswr: [rasterizer core] only use Viewport/Scissors during SwrDraw* operations
Tim Rowley [Wed, 17 Aug 2016 19:30:32 +0000 (14:30 -0500)]
swr: [rasterizer core] only use Viewport/Scissors during SwrDraw* operations

Add explicit rects for:

- SwrClearRenderTarget
- SwrDiscardRect
- SwrInvalidateTiles
- SwrStoreTiles

Signed-off-by: Tim Rowley <timothy.o.rowley@intel.com>
8 years agoswr: [rasterizer common] reorder SWR_FORMAT_INFO
Tim Rowley [Wed, 17 Aug 2016 19:29:44 +0000 (14:29 -0500)]
swr: [rasterizer common] reorder SWR_FORMAT_INFO

Signed-off-by: Tim Rowley <timothy.o.rowley@intel.com>
8 years agoswr: [rasterizer core] make dirtytile list point directly to macrotilequeues
Tim Rowley [Tue, 16 Aug 2016 18:40:47 +0000 (12:40 -0600)]
swr: [rasterizer core] make dirtytile list point directly to macrotilequeues

Speeds up high geometry HPC workloads.

Signed-off-by: Tim Rowley <timothy.o.rowley@intel.com>
8 years agoswr: [rasterizer core] portability - remove use of INT64
Tim Rowley [Tue, 16 Aug 2016 18:38:36 +0000 (12:38 -0600)]
swr: [rasterizer core] portability - remove use of INT64

Signed-off-by: Tim Rowley <timothy.o.rowley@intel.com>
8 years agoswr: [rasterizer core] viewport transform disabled fix
Tim Rowley [Mon, 15 Aug 2016 17:58:54 +0000 (11:58 -0600)]
swr: [rasterizer core] viewport transform disabled fix

When viewport transform is disabled (ie. screen space coords are passed
in directly), the W component should be interpreted as RHW.

Signed-off-by: Tim Rowley <timothy.o.rowley@intel.com>
8 years agoswr: [rasterizer core] clamp scissor rects to current tile rect
Tim Rowley [Fri, 12 Aug 2016 22:59:25 +0000 (16:59 -0600)]
swr: [rasterizer core] clamp scissor rects to current tile rect

Signed-off-by: Tim Rowley <timothy.o.rowley@intel.com>
8 years agoswr: [rasterizer core] align stats structures
Tim Rowley [Fri, 12 Aug 2016 19:39:44 +0000 (13:39 -0600)]
swr: [rasterizer core] align stats structures

Signed-off-by: Tim Rowley <timothy.o.rowley@intel.com>
8 years agoswr: [rasterizer core] use AVX2 permute to simplify PaTriList
Tim Rowley [Thu, 11 Aug 2016 20:52:18 +0000 (14:52 -0600)]
swr: [rasterizer core] use AVX2 permute to simplify PaTriList

Signed-off-by: Tim Rowley <timothy.o.rowley@intel.com>
8 years agoswr: [rasterizer core] move some global variables to SWR_CONTEXT
Tim Rowley [Thu, 11 Aug 2016 16:49:43 +0000 (10:49 -0600)]
swr: [rasterizer core] move some global variables to SWR_CONTEXT

Signed-off-by: Tim Rowley <timothy.o.rowley@intel.com>
8 years agoswr: [rasterizer core] change scale on VP matrix element gathers
Tim Rowley [Wed, 10 Aug 2016 19:20:30 +0000 (13:20 -0600)]
swr: [rasterizer core] change scale on VP matrix element gathers

Was 1, which led to pulling denorms for non-zero indices.
Changed to sizeof(float).

Signed-off-by: Tim Rowley <timothy.o.rowley@intel.com>
8 years agoswr: [rasterizer] implementing native AVX-512 simd16 intrinsics
Tim Rowley [Wed, 10 Aug 2016 17:25:31 +0000 (11:25 -0600)]
swr: [rasterizer] implementing native AVX-512 simd16 intrinsics

Signed-off-by: Tim Rowley <timothy.o.rowley@intel.com>
8 years agoi965/blorp: Use nir_alu_type for the texture data type
Jason Ekstrand [Mon, 8 Aug 2016 23:53:00 +0000 (16:53 -0700)]
i965/blorp: Use nir_alu_type for the texture data type

This lets us remove the brw_reg.h include

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agoi965: brw_blorp_blit.cpp -> blorp_blit.c
Jason Ekstrand [Mon, 8 Aug 2016 22:33:43 +0000 (15:33 -0700)]
i965: brw_blorp_blit.cpp -> blorp_blit.c

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agoi965: brw_blorp_clear.cpp -> blorp_clear.c
Jason Ekstrand [Mon, 8 Aug 2016 22:30:57 +0000 (15:30 -0700)]
i965: brw_blorp_clear.cpp -> blorp_clear.c

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agoi965: Split brw_blorp.c/h into multiple files
Jason Ekstrand [Mon, 8 Aug 2016 22:25:17 +0000 (15:25 -0700)]
i965: Split brw_blorp.c/h into multiple files

This mega-commit pulls most of the i965-specific bits of blorp into the
brw_blorp.c/h files which now contain nothing but i965 wrappers around
"core blorp" calls.  The "core blorp" api is moved into blorp.h and the
internal blorp data structures are moved into blorp_priv.h.  The new file
blorp.c is created to house "core blorp" internals which are pulled from
the old brw_blorp.c

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
8 years agoi965/blorp: Factor the guts of blorp_hiz_exec into a helper
Jason Ekstrand [Tue, 26 Jul 2016 00:48:05 +0000 (17:48 -0700)]
i965/blorp: Factor the guts of blorp_hiz_exec into a helper

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>