Commit Graph

116985 Commits

Author SHA1 Message Date
Nanley Chery
22be1447bb isl/drm: Map HiZ and CCS tilings to Y
In the function which translates ISL tilings to i915 tilings, map ISL's
HiZ and CCS tilings to Y instead of NONE (linear). The HW docs describe
HiZ and pre-Gen12 CCS surfaces as being Y-tiled in memory.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2019-10-28 10:47:05 -07:00
Jason Ekstrand
901bed5122 intel/isl: Update surf_fill_state for gen12
v2 (Nanley):
* Avoid driver churn for now.
* Include some media compression changes.

Co-authored-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2019-10-28 10:47:05 -07:00
Jason Ekstrand
caf4cc548e intel/isl/fill_state: Separate aux_mode handling from aux_surf
v2. Avoid driver churn for now. (Nanley)

Co-authored-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2019-10-28 10:47:05 -07:00
Jason Ekstrand
a1e0b21061 intel/isl: Add new aux modes available on gen12
v2. Add media compression. (Nanley)

Co-authored-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2019-10-28 10:47:05 -07:00
Nanley Chery
77f506382f i965/miptree: Avoid -Wswitch for the Gen12 aux modes
Avoid the compiler warnings for the new enums that will be introduced in
a future commit.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2019-10-28 10:47:05 -07:00
Nanley Chery
8af1853331 anv/private: Modify aux slice helpers for Gen12 CCS
The isl_surf structs for Gen12's CCS won't describe how many slices in
the main surface can be compressed. All slices will be compressable if
CCS is enabled, so lookup the main surface's logical dimension.

v2. Add a space before a `?`. (Jordan)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2019-10-28 10:47:05 -07:00
Nanley Chery
ba52cd7ab2 intel/blorp: Don't assert aux slices match main slices
This isn't accurate enough for HiZ which can have a discontiguous range
of supported aux slices. This also won't work with the plan to represent
Gen12 CCS as a single slice surface.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2019-10-28 10:47:05 -07:00
Jason Ekstrand
4021a3925c intel/blorp: Use surf instead of aux_surf for image dimensions
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2019-10-28 10:47:05 -07:00
Nanley Chery
d90bffaef8 intel/blorp: Halve the Gen12 fast-clear/resolve rectangle
Update their dimensions according to the Bspec.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2019-10-28 10:47:05 -07:00
Rafael Antognolli
43b48ee752 intel/blorp/gen12: Set FWCC when storing the clear color.
From "Render Target Fast Clear" description for Gen12:

   "SW must store clear color using MI_STORE_DATA_IMM with
   ForceWriteCompletionCheck bit set."

From Instruction_MI_STORE_DATA_IMM, bitfield 10 (when set to 1):

   "Following the last write from this command, Command Streamer
   will wait for all previous writes are completed and in global
   observable domain before moving to next command."

We use 4 SDIs to store the clear color (one per channel). From the
description, it looks to me that setting that flag only on the last SDI
should be enough.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2019-10-28 10:47:05 -07:00
Nanley Chery
07e16221d9 isl: Round up some pitches to 512B for Gen12's CCS
Gen12's CCS requires that the main surface have a pitch aligned to 512B.

v2. Provide a BSpec citation. (Ken)

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2019-10-28 10:47:05 -07:00
Nanley Chery
f6aefa94cc iris: Don't assume CCS_E includes CCS_D
There's no longer a clear-only compression mode of CCS on Gen12+.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2019-10-28 10:47:05 -07:00
Nanley Chery
300d77c2fa anv/cmd_buffer: Don't assume CCS_E includes CCS_D
There's no longer a clear-only compression mode of CCS on Gen12+.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2019-10-28 10:47:05 -07:00
Nanley Chery
4f0b5f9732 anv/image: Disable CCS_D on Gen12+
Clear-only compression no longer exists on TGL.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2019-10-28 10:47:04 -07:00
Nanley Chery
a94cb6503f isl: Disable CCS_D on Gen12+
Clear-only compression no longer exists on TGL.

v2. Add BSpec reference. (Sagar)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2019-10-28 10:47:04 -07:00
Nanley Chery
83fc15e5ba iris: Drop support for I915_FORMAT_MOD_Y_TILED_CCS on TGL+
The format of the CCS has changed.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2019-10-28 10:47:04 -07:00
Nanley Chery
0eaf293b47 anv/formats: Disable I915_FORMAT_MOD_Y_TILED_CCS on TGL+
The format of the CCS has changed.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2019-10-28 10:47:04 -07:00
Nanley Chery
d0fcc2dd50 anv: Properly allocate aux-tracking space for CCS_E
add_aux_state_tracking_buffer() actually checks the aux usage when
determining how many dwords to allocate for state tracking. Move the
function call to the point after the CCS_E aux usage is assigned.

Fixes: de3be61801 ("anv/cmd_buffer: Rework aux tracking")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2019-10-28 10:47:04 -07:00
Nanley Chery
698d723a6d anv/blorp: Use BLORP_BATCH_NO_UPDATE_CLEAR_COLOR
Avoid failing the `info->use_clear_address` assertion in ISL on Gen12+.

Fixes: 6c9f9a82d7 ("intel/genxml,isl: Add gen12 render surface state changes")
Reported-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2019-10-28 10:47:04 -07:00
Plamena Manolova
939ddccb7a anv: Add support for depth bounds testing.
In gen12 we use the 3DSTATE_DEPTH_BOUNDS instruction
to enable depth bounds testing.

Signed-off-by: Plamena Manolova <plamena.manolova@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2019-10-28 14:13:04 +00:00
Plamena Manolova
1df871f8ff iris: Add support for depth bounds testing.
In gen12 we use the 3DSTATE_DEPTH_BOUNDS instruction
to enable depth bounds testing.

Signed-off-by: Plamena Manolova <plamena.manolova@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2019-10-28 13:46:06 +00:00
Plamena Manolova
1ecd37eac6 genxml: Add 3DSTATE_DEPTH_BOUNDS instruction.
In gen12 we add the 3DSTATE_DEPTH_BOUNDS instruction
which enables support for depth bounds testing.

Signed-off-by: Plamena Manolova <plamena.manolova@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2019-10-28 13:45:24 +00:00
Danylo Piliaiev
8818e0df74 glsl: Initialize all fields of ir_variable in constructor
Better be safe, even if we could technically avoid this for
some fields.

Cc: <mesa-stable@lists.freedesktop.org>
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1999
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Tested-by: Witold Baryluk <witold.baryluk@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2019-10-28 12:49:15 +00:00
Timothy Arceri
1909bc526d util: remove LIST_IS_EMPTY macro
Just use the inlined function directly. The new function was introduced
in addcf410.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
2019-10-28 11:24:39 +00:00
Timothy Arceri
7f106a2b5d util: rename list_empty() to list_is_empty()
This makes it clear that it's a boolean test and not an action
(eg. "empty the list").

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
2019-10-28 11:24:38 +00:00
Timothy Arceri
c578600489 util: remove LIST_DEL macro
Just use the inlined function directly. The macro was replaced with
the function in ebe304fa54.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
2019-10-28 11:24:38 +00:00
Timothy Arceri
c976b427c4 util: remove LIST_DELINIT macro
Just use the inlined function directly. The macro was replaced with
the function in ebe304fa54.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
2019-10-28 11:24:38 +00:00
Timothy Arceri
d23d47c065 util: remove LIST_REPLACE macro
Just use the inlined function directly. The macro was replaced with
the function in ebe304fa54.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
2019-10-28 11:24:38 +00:00
Timothy Arceri
40258fb8b8 util: remove LIST_ADD macro
Just use the inlined function directly. The macro was replaced with
the function in ebe304fa54.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
2019-10-28 11:24:38 +00:00
Timothy Arceri
255de06c59 util: remove LIST_ADDTAIL macro
Just use the inlined function directly. The macro was replaced with
the function in ebe304fa54.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
2019-10-28 11:24:38 +00:00
Timothy Arceri
7ae1be1028 util: remove LIST_INITHEAD macro
Just use the inlined function directly. The macro was replaced with
the function in ebe304fa54.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
2019-10-28 11:24:38 +00:00
Erik Faye-Lund
15e7f94278 gitlab-ci: fixup debian tags
When resolving a merge-conflict, I accidentally only updated the
ARM64-tag tag. Let's correct this.

Fixes: 3d529c1739 ("gitlab-ci: also build Zink on CI")
2019-10-28 12:07:30 +01:00
Danylo Piliaiev
12a8f2616a intel/compiler: Fix C++ one definition rule violations
When building with "-flto" brw::block_data definitions
were colliding.

Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2019-10-28 12:02:40 +02:00
Erik Faye-Lund
3d529c1739 gitlab-ci: also build Zink on CI
This prevents accidentally breaking the driver-build while working on
other drivers.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
2019-10-28 08:51:48 +00:00
Erik Faye-Lund
86ed8132a5 zink: simplify gl-to-vulkan lowering
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
2019-10-28 08:51:48 +00:00
Erik Faye-Lund
412e2aa23b zink/spirv: more complete sampler-dim handling
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
2019-10-28 08:51:48 +00:00
Erik Faye-Lund
f26eab3175 zink: fixup scissoring
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
2019-10-28 08:51:48 +00:00
Duncan Hopkins
c4446098cf zink: limited uniform buffer size so the limits is not exceeded.
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
2019-10-28 08:51:48 +00:00
Erik Faye-Lund
4ef088f241 zink: do not set lineWidth to invalid value
Some implementations don't support the lineWidth-feature, so let's
avoid setting invalid state to them. But since we don't have a fallback
for this, inform the user.

Acked-by: Jordan Justen <jordan.l.justen@intel.com>
2019-10-28 08:51:48 +00:00
Erik Faye-Lund
59f8ba05f5 zink: pass screen to zink_create_gfx_pipeline
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
2019-10-28 08:51:48 +00:00
Duncan Hopkins
5cf93985a0 zink: respect ubo buffer alignment requirement
The driver can report a minimum alignment for UBOs, and that can be
larger than 64, which we've currently been using. Let's play ball, and
use the reported value instead.

Acked-by: Jordan Justen <jordan.l.justen@intel.com>
2019-10-28 08:51:48 +00:00
Duncan Hopkins
108ba81c95 zink: fix line-width calculation
There's two things that goes wrong in this code on some drivers:
1. Rounding off the line-width to granularity can push it outside the
   legal range.
2. A granularity of 0.0 results in NaN, because we divide by zero.

So let's make this code a bit more robust.

Acked-by: Jordan Justen <jordan.l.justen@intel.com>
2019-10-28 08:51:48 +00:00
Erik Faye-Lund
df11f3f2ab zink: fixup return-value
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
2019-10-28 08:51:48 +00:00
Erik Faye-Lund
d5cbc05cde zink: refactor blitting
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
2019-10-28 08:51:48 +00:00
Erik Faye-Lund
a7fbc8bc7f zink: implement resource_from_handle
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
2019-10-28 08:51:48 +00:00
Erik Faye-Lund
65fbb1836a zink: use VK_FORMAT_B8G8R8A8_UNORM for PIPE_FORMAT_B8G8R8X8_UNORM
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
2019-10-28 08:51:48 +00:00
Erik Faye-Lund
867d892d90 zink: do not set VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT for non-3D textures
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
2019-10-28 08:51:48 +00:00
Erik Faye-Lund
d8f1cf4946 zink/spirv: alias var0 on tex0 etc instead
This fixes Quake3, and is more in line with directx semantics.

Acked-by: Jordan Justen <jordan.l.justen@intel.com>
2019-10-28 08:51:48 +00:00
Erik Faye-Lund
c7bcb6e5dc zink: lower two-sided coloring
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
2019-10-28 08:51:48 +00:00
Erik Faye-Lund
67a9749ada zink/spirv: alias generic varyings on non-generic ones
This gets rid of the nasty location-allocation hack.

Acked-by: Jordan Justen <jordan.l.justen@intel.com>
2019-10-28 08:51:48 +00:00