Commit Graph

150037 Commits

Author SHA1 Message Date
Jesse Natalie e3a2cb4b67 d3d12: Implement residency management algorithm
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14959>
2022-02-10 20:06:15 +00:00
Jesse Natalie 40dafd0094 d3d12: Add a budget/usage callback to the screen
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14959>
2022-02-10 20:06:15 +00:00
Jesse Natalie 671deb541e d3d12: Add residency info to d3d12_bo
This is all currently immutable, but will be used to manage the
residency of the underlying D3D objects in a future commit.

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14959>
2022-02-10 20:06:15 +00:00
Jesse Natalie f4c74f74f8 d3d12: Add sampler's textures to batch bo tracking
This will be important for residency in a future change, but also
is necessary for synchronize() to work correctly for TBOs.

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14959>
2022-02-10 20:06:15 +00:00
Jesse Natalie 34e53d4c9c d3d12: Move ID3D12Fence from context to screen
There's already a single command queue for the screen, meaning that
all commands are being serialized implicitly into that queue. There's
no need to have separate fences for parallel contexts when those
fences would all share the same underlying timeline.

This adds an explicit lock to expand the scope of the implicit screen
command queue ordering to include fence signals.

Each context still gets its own submit sequence, which is used for 1
purpose right now: A uniqueness check in the state manager to see
if states are coming from separate command lists, to apply promotion
and decay logic.

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14959>
2022-02-10 20:06:15 +00:00
Jesse Natalie 7ce2d5aece d3d12: Forward wait condition from query -> result buffer
The no-wait condition was wrong before. If the query was used in the
current batch (query->fence_value == context->fence_value), we'd
continue on with the operation instead of returning false. Then the
buffer map would see that the bo is referenced in the current batch,
and would flush and wait, even though we were asked not to wait.

This fixes the condition by simply using the (correct) buffer map
logic.

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14959>
2022-02-10 20:06:15 +00:00
Jesse Natalie 5cbd7093af d3d12: When mapping a resource used in the current batch without blocking, at least flush
Also, resource_is_busy needs to opportunistically retire batches, so apps can
spin on non-blocking resource maps and eventually succeed.

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14959>
2022-02-10 20:06:15 +00:00
Ian Romanick 1cb3d1a6ae nir: Produce correct results for atan with NaN
Properly handling NaN adversely affects several hundred shaders in
shader-db (lots of Skia and a few others from various synthetic
benchmarks) and fossil-db (mostly Talos and some Doom 2016).  Only apply
the NaN handling work-around when the shader demands it.

v2: Add comment explaining the 1.0*y_over_x.  Suggested by Caio.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Fixes: 2098ae16c8 ("nir/builder: Move nir_atan and nir_atan2 from SPIR-V translator")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13999>
2022-02-10 18:15:39 +00:00
Ian Romanick 7d0d9b9fbc nir: Properly handle various exceptional values in frexp
frexp_sig of ±0, ±Inf, or NaN should just return the input unmodified.

frexp_exp of ±Inf or NaN is undefined, and frexp_exp of ±0 should return
the input unmodified.  This seems to already work.

No shader-db or fossil-db changes on any Intel platform.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Fixes: 23d30f4099 ("spirv,nir: lower frexp_exp/frexp_sig inside a new NIR pass")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13999>
2022-02-10 18:15:39 +00:00
Ian Romanick 93ed87af28 spirv: Produce correct result for GLSLstd450Tanh with NaN
No shader-db or fossil-db changes on any Intel platform.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Fixes: 9f9432d56c ("Revert "spirv: Use a simpler and more correct implementaiton of tanh()"")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13999>
2022-02-10 18:15:39 +00:00
Ian Romanick e442b9d792 spirv: Produce correct result for GLSLstd450Modf with Inf
GLSLstd450ModfStruct too.

No shader-db or fossil-db changes on any Intel platform.

v2: Fix handling 16-bit (and presumably 64-bit) values.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Fixes: f92a35d831 ("vtn: Fix Modf.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13999>
2022-02-10 18:15:39 +00:00
Ian Romanick 75ef5991f5 spriv: Produce correct result for GLSLstd450Step with NaN
NOTE: This commit needs "nir: All set-on-comparison opcodes can take all
float types" or regressions will occur in other Vulkan SPIR-V tests.

No shader-db changes on any Intel platform.

NOTE: This commit depends on "nir: All set-on-comparison opcodes can
take all float types".

v2: Fix handling 16-bit (and presumably 64-bit) values.

About 280 shaders in Talos are hurt by a few instructions, and a couple
shaders in Doom 2016 are hurt by a few instructions.

Tiger Lake
Instructions in all programs: 159893290 -> 159895026 (+0.0%)
SENDs in all programs: 6936431 -> 6936431 (+0.0%)
Loops in all programs: 38385 -> 38385 (+0.0%)
Cycles in all programs: 7019260087 -> 7019254134 (-0.0%)
Spills in all programs: 101389 -> 101389 (+0.0%)
Fills in all programs: 131532 -> 131532 (+0.0%)

Ice Lake
Instructions in all programs: 143624235 -> 143625691 (+0.0%)
SENDs in all programs: 6980289 -> 6980289 (+0.0%)
Loops in all programs: 38383 -> 38383 (+0.0%)
Cycles in all programs: 8440083238 -> 8440090702 (+0.0%)
Spills in all programs: 102246 -> 102246 (+0.0%)
Fills in all programs: 131908 -> 131908 (+0.0%)

Skylake
Instructions in all programs: 134185495 -> 134186618 (+0.0%)
SENDs in all programs: 6938790 -> 6938790 (+0.0%)
Loops in all programs: 38356 -> 38356 (+0.0%)
Cycles in all programs: 8222366923 -> 8222365826 (-0.0%)
Spills in all programs: 98821 -> 98821 (+0.0%)
Fills in all programs: 125218 -> 125218 (+0.0%)

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Fixes: 1feeee9cf4 ("nir/spirv: Add initial support for GLSL 4.50 builtins")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13999>
2022-02-10 18:15:39 +00:00
Ian Romanick 38a94c82e6 intel/fs: Don't optimize out 1.0*x and -1.0*x
This (sort of) matches the behavior of nir_opt_algebraic.  This ensures
that subnormal values are properly flushed to zero.

With the aid of "nir/search: Float sources of texture instructions are
float users" and "nir/search: Transitively apply is_only_used_as_float",
there would have been no shader-db regressions on Intel platforms.
However, those caused a significant increase in compile time.  Since the
instruction regressions were so small, I just dropped those commits
rather than improve them.

All Haswell and newer platforms had similar results. (Ice Lake shown)
total instructions in shared programs: 20125042 -> 20125094 (<.01%)
instructions in affected programs: 7184 -> 7236 (0.72%)
helped: 0
HURT: 32
HURT stats (abs)   min: 1 max: 4 x̄: 1.62 x̃: 2
HURT stats (rel)   min: 0.11% max: 1.49% x̄: 0.85% x̃: 0.78%
95% mean confidence interval for instructions value: 1.39 1.86
95% mean confidence interval for instructions %-change: 0.74% 0.96%
Instructions are HURT.

total cycles in shared programs: 862745586 -> 862746551 (<.01%)
cycles in affected programs: 109872 -> 110837 (0.88%)
helped: 12
HURT: 23
helped stats (abs) min: 2 max: 774 x̄: 90.83 x̃: 19
helped stats (rel) min: 0.07% max: 25.23% x̄: 3.06% x̃: 0.40%
HURT stats (abs)   min: 2 max: 1106 x̄: 89.35 x̃: 12
HURT stats (rel)   min: 0.08% max: 45.40% x̄: 3.01% x̃: 0.47%
95% mean confidence interval for cycles value: -60.09 115.23
95% mean confidence interval for cycles %-change: -2.21% 4.07%
Inconclusive result (value mean confidence interval includes 0).

All of the shaders hurt are in either UE4 shooter-game or shooter_demo.

Tiger Lake
Instructions in all programs: 159893213 -> 159893290 (+0.0%)
SENDs in all programs: 6936431 -> 6936431 (+0.0%)
Loops in all programs: 38385 -> 38385 (+0.0%)
Cycles in all programs: 7019259514 -> 7019260087 (+0.0%)
Spills in all programs: 101389 -> 101389 (+0.0%)
Fills in all programs: 131532 -> 131532 (+0.0%)

Ice Lake
Instructions in all programs: 143624164 -> 143624235 (+0.0%)
SENDs in all programs: 6980289 -> 6980289 (+0.0%)
Loops in all programs: 38383 -> 38383 (+0.0%)
Cycles in all programs: 8440082767 -> 8440083238 (+0.0%)
Spills in all programs: 102246 -> 102246 (+0.0%)
Fills in all programs: 131908 -> 131908 (+0.0%)

Skylake
Instructions in all programs: 134185424 -> 134185495 (+0.0%)
SENDs in all programs: 6938790 -> 6938790 (+0.0%)
Loops in all programs: 38356 -> 38356 (+0.0%)
Cycles in all programs: 8222366529 -> 8222366923 (+0.0%)
Spills in all programs: 98821 -> 98821 (+0.0%)
Fills in all programs: 125218 -> 125218 (+0.0%)

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Fixes: f5dd6dfe01 ("anv: enable VK_KHR_shader_float_controls and SPV_KHR_float_controls")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13999>
2022-02-10 18:15:39 +00:00
Ian Romanick 38800b385c nir: All set-on-comparison opcodes can take all float types
Extend 4195a9450b so that the next poor fool doesn't come along and
say, "sge does the right thing for 16-bit sources, but slt gives a NIR
validation failure. What the deuce?"

NOTE: This commit is necessary to prevent regressions in GLSLstd450Step
tests of 16-bit sources at "spriv: Produce correct result for
GLSLstd450Step with NaN".

Fixes: 4195a9450b ("nir: sge operation is defined for floating-point types")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13999>
2022-02-10 18:15:39 +00:00
Ian Romanick 97ce3a56bd nir/search: Constify instr parameter to nir_search_expression::cond
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13999>
2022-02-10 18:15:39 +00:00
Ian Romanick 4dd4135551 nir: Constify def parameter to nir_ssa_def_bits_used
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13999>
2022-02-10 18:15:39 +00:00
Otavio Pontes 510d248299 nir: Use proper macro to set bits of variable correctly
When slots is 64 only the first bit was being set, instead of setting
all 64 bits of the variable, so for that case the function
get_variable_io_mask() always returned 0.

This behaviour caused variables that are being used both on producer and
consumer to be considered unused and thus being removed on
nir_remove_unused_io_vars().

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14955>
2022-02-10 17:19:54 +00:00
Daniel Stone 7a0ace7d4e Revert "ci: Disable Windows for now"
This reverts commit be385ab5bc.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14975>
2022-02-10 16:44:16 +00:00
Georg Lehmann c2168f845e nir/lower_mediump: Treat u2u16 like i2i16.
There is a comment in nir_fold_16bit_sampler_conversions saying that these
are the same, but the code only checks for i2i16.

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14893>
2022-02-10 16:13:54 +00:00
Mike Blumenkrantz 532665c73c zink: anv (icl) ci updates
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14973>
2022-02-10 16:01:04 +00:00
Danylo Piliaiev b84f059680 freedreno/pps: Expose same counters as blob
Expose most of the counters exposed by blob. By faking the value of
counters returned from kgsl I found the exact underlying counters and
constant coefficients being used.

Note, coefficients for counters that depend on time are NOT verified.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14323>
2022-02-10 15:15:33 +00:00
Samuel Pitoiset 03ab9d895e radv/ci: update CI lists for CTS 1.3.1.0
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14946>
2022-02-10 14:52:42 +00:00
Daniel Schürmann fce6ca0f3a radv: remove exports without color attachment or writemask
This lets us make use of NIR's more advanced DCE.
This includes removing of CF constructs, PS inputs and VS outputs.

Totals from 1959 (1.45% of 134913) affected shaders: (GFX10.3)
VGPRs: 73464 -> 71944 (-2.07%); split: -3.79%, +1.72%
SpillSGPRs: 6 -> 0 (-inf%)
CodeSize: 4860324 -> 4675248 (-3.81%); split: -4.92%, +1.11%
LDS: 2619904 -> 2781696 (+6.18%); split: -0.37%, +6.55%
MaxWaves: 50614 -> 50852 (+0.47%); split: +1.63%, -1.16%
Instrs: 924233 -> 887836 (-3.94%); split: -5.01%, +1.07%
Latency: 5635532 -> 5418083 (-3.86%); split: -4.53%, +0.67%
InvThroughput: 1107764 -> 1077542 (-2.73%); split: -3.44%, +0.71%
VClause: 17361 -> 16163 (-6.90%); split: -8.38%, +1.47%
SClause: 31886 -> 29323 (-8.04%); split: -8.52%, +0.48%
Copies: 53529 -> 52127 (-2.62%); split: -5.30%, +2.68%
Branches: 22993 -> 22802 (-0.83%); split: -3.44%, +2.61%
PreSGPRs: 53123 -> 51395 (-3.25%); split: -3.60%, +0.35%
PreVGPRs: 59699 -> 57424 (-3.81%); split: -5.13%, +1.32%

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14771>
2022-02-10 14:23:26 +00:00
Daniel Stone be385ab5bc ci: Disable Windows for now
Docker on Windows is broken for some reason, so just disable it for now.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14970>
2022-02-10 12:51:06 +00:00
Lionel Landwerlin 137e170bcb anv: update limit for maxVertexInputBindingStride
Before:
	maxVertexInputBindingStride                     = 2048 (gen7+)

After:
	maxVertexInputBindingStride                     = 2048 (gen7/gen8)
	maxVertexInputBindingStride                     = 4095 (gen9+)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14958>
2022-02-10 10:06:22 +00:00
Chia-I Wu f93059b19f venus: fix two VN_TRACE_SCOPE's in the same scope
Make sure __LINE__ is expanded.

Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14960>
2022-02-10 05:11:46 +00:00
Nanley Chery 987bc44954 iris: Drop the iris_resource aux usage bit fields
A big reason we had these fields was to help create a set of surface
states for a resource. That's largely being handled through other means
now.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14806>
2022-02-10 04:47:14 +00:00
Nanley Chery ae763940e8 iris: Compute aux.possible_usages from aux.usage
We're going to remove res->aux.possible_usages. This will simplify the
commit in which we do so.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14806>
2022-02-10 04:47:14 +00:00
Nanley Chery d905018a2c iris: Use iris_sample_with_depth_aux more often
We're going to remove res->aux.sampler_usages. This will simplify the
commit in which we do so.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14806>
2022-02-10 04:47:14 +00:00
Nanley Chery 85a7fb1e19 intel/isl: Add format assertions for surfaces using CCS
This caught some invalid CCS surface states created by iris.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14806>
2022-02-10 04:47:14 +00:00
Nanley Chery 05b8b08ef4 iris: Avoid making some invalid CCS surface states
Although a resource may support CCS with its original format, a texture
view of that resource may have a format that doesn't support
compression. Don't create CCS surface states for such texture views.

This change affects iris' behavior when running piglit's
arb_texture_view-rendering-formats_gles3 test on SKL.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14806>
2022-02-10 04:47:14 +00:00
Nanley Chery a9beb87dce iris: Inline some surface_state.cpu references
Now that we're using fill_surface_states, these aren't needed anymore.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14806>
2022-02-10 04:47:14 +00:00
Nanley Chery d705faad6c iris: Add and use fill_surface_states
This helper simplifies some repeated logic.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14806>
2022-02-10 04:47:14 +00:00
Nanley Chery eb51fd0414 iris: Add and use use_surface_state
This helper simplifies some repeated logic.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14806>
2022-02-10 04:47:14 +00:00
Nanley Chery 89ebdd67c4 iris: Add and use iris_surface_state::aux_usages
An iris_surface_state can have a different set of possible aux usages
than its iris_resource.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14806>
2022-02-10 04:47:14 +00:00
Nanley Chery b60af618a0 iris: Drop res param from surf_state_offset_for_aux
This has been unused since commit 117a0368b0.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14806>
2022-02-10 04:47:14 +00:00
Nanley Chery ce37e176f1 iris: Drop format param from fast_clear_color
It's unused.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14806>
2022-02-10 04:47:14 +00:00
Nanley Chery 6778b3a379 iris: Don't fast clear with the view format
Fast clear with the resource format instead. This is safe to do because
can_fast_clear_color ensures that the clear color generates the same
pixel with either the view format or the resource format.

On SKL, this prevents us from using an invalid surface state. This platform
doesn't support CCS_E with sRGB formats, but prior to this patch we allowed
fast-clearing with this combination. Piglit's fcc-write-after-clear test
can trigger this.

Fixes: 230952c210 ("iris: Don't support sRGB + Y_TILED_CCS on gen9")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14806>
2022-02-10 04:47:14 +00:00
Mike Blumenkrantz 68c1b50e48 aux/draw: fix llvm tcs lane vec generation
the idx param for LLVMBuildInsertElement is zero-indexed based on the
value of 'vector_length' (always 4), and the vector length is (obviously)
sized to 'vector_length', so this should be the member of the vec that is being
inserted, not the invocation index

cc: mesa-stable

fixes (zink, but only on my one machine):
KHR-GL46.tessellation_shader.single.max_patch_vertices
KHR-GL46.tessellation_shader.tessellation_shader_tc_barriers.barrier_guarded_read_write_calls
dEQP-GLES31.functional.tessellation.shader_input_output.barrier
dEQP-GLES31.functional.tessellation.shader_input_output.patch_vertices_5_in_10_out
dEQP-GLES31.functional.tessellation_geometry_interaction.feedback.tessellation_output_isolines_geometry_output_points
dEQP-GLES31.functional.tessellation_geometry_interaction.feedback.tessellation_output_isolines_point_mode_geometry_output_triangles
dEQP-GLES31.functional.tessellation_geometry_interaction.feedback.tessellation_output_quads_geometry_output_points
dEQP-GLES31.functional.tessellation_geometry_interaction.feedback.tessellation_output_quads_point_mode_geometry_output_lines
dEQP-GLES31.functional.tessellation_geometry_interaction.feedback.tessellation_output_triangles_geometry_output_points
dEQP-GLES31.functional.tessellation_geometry_interaction.feedback.tessellation_output_triangles_point_mode_geometry_output_lines

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14949>
2022-02-10 04:14:28 +00:00
Bas Nieuwenhuizen 8d5be0a2b3 radv: Add submit locking with trace bo.
Otherwise cmdbuffers from different queues can override the trace id
from each other, making for a very confusing hang report.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14868>
2022-02-10 03:49:02 +00:00
Ian Romanick e3cbc328e0 gallivm/nir: Call nir_lower_bool_to_int32 after nir_opt_algebraic_late
All of the opcodes in nir_opt_algebraic_late are the unsized (1-bit)
versions.  If the lowering to int32 happens first, many of the
optimizations and lowerings won't happen.

Of particular importance is the lowering of fisfinite.  If a shader
happens to contain fisfinite of an fp16 value, it will assert later
during compliation.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Fixes: 78b4e417d4 ("gallivm: handle fisfinite/fisnormal")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14942>
2022-02-10 03:12:46 +00:00
Emma Anholt d633eace3f ci/freedreno: Try to detect a wedged MMU that's happened recently.
Possibly since the VK-GL-CTS 1.3.1.0 uprev.  It doesn't seem to recover,
like it says.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14945>
2022-02-10 01:13:31 +00:00
Emma Anholt b7278b2281 ci/lvp: Add a flake that's shown up a couple of times since VKCTS 1.3.1.
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14945>
2022-02-10 01:13:31 +00:00
Emma Anholt 2d15f9e3c2 ci/r300: Drop xfails that were fixed with the VK-GL-CTS 1.3.1.0 uprev.
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14404>
2022-02-10 00:36:57 +00:00
Emma Anholt 20469009c7 nir: Delete the per-instr SSA liveness impl.
It was introduced for nir-to-tgsi, and I found that it was the wrong
approach.  There's a reason nobody else does RA this way.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14404>
2022-02-10 00:36:57 +00:00
Emma Anholt 74c02d99b2 nir_to_tgsi: Replace the NIR SSA liveness with TGSI reg-level liveness.
Allocating NIR registers ends up being required for drivers like r600 and
nv30, which don't do their own allocation (except in some cases on r600
where sb is used).

Rather than add a NIR register liveness impl
(https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14158), switch
from NIR-based liveness to just doing the same channel-based liveness
logic that the NIR registers needed at the TGSI level.  The actual
liveness code here basically comes straight out of
brw_vec4_live_variables.cpp.

Since we do the liveness in TGSI now, it also means we don't need to be
careful about not reading SSA values from later TGSI instructions (which
may be useful for doing some greedy instruction selection in generating
TGSI instructions).

i915g:
total instructions in shared programs: 400719 -> 380730 (-4.99%)
instructions in affected programs: 284760 -> 264771 (-7.02%)
total tex_indirect in shared programs: 12289 -> 12290 (<.01%)
tex_indirect in affected programs: 4 -> 5 (25.00%)
total temps in shared programs: 32172 -> 22086 (-31.35%)
temps in affected programs: 30647 -> 20561 (-32.91%)
LOST:   0
GAINED: 148

r300:
total instructions in shared programs: 1472463 -> 1459286 (-0.89%)
instructions in affected programs: 507009 -> 493832 (-2.60%)
total temps in shared programs: 212143 -> 201678 (-4.93%)
temps in affected programs: 78007 -> 67542 (-13.42%)

softpipe:
total temps in shared programs: 517071 -> 294387 (-43.07%)
temps in affected programs: 509324 -> 286640 (-43.72%)

Acked-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14404>
2022-02-10 00:36:57 +00:00
Emma Anholt f4ce3178d9 nir_to_tgsi: Track our TGSI insns in blocks before emitting tokens.
To do register allocation well, we want to have a point before
ureg_insn_emit() to look at the liveness of the values and allocate them
to TGSI temporaries.  In order to do that, we have to switch from
ureg_OPCODE() emitting TGSI tokens directly to a new ntt_OPCODE() that
stores the ureg args in a block structure.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14404>
2022-02-10 00:36:57 +00:00
Emma Anholt 3f84c67af8 tgsi: Refactor out a tgsi_util_get_src_usage_mask().
The function operated on a tgsi_full_instruction, but for code generation
in NIR-to-TGSI I want to reuse this logic using pieces of tgsi_ureg
structs.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14404>
2022-02-10 00:36:57 +00:00
Emma Anholt e92209f299 i915g: Report the temps usage
This is another important metric for this driver, and we don't do our own
RA so ours is just what TGSI uses.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14404>
2022-02-10 00:36:57 +00:00
Eric Engestrom bfcc7c20c8 docs: update calendar and link releases notes for 21.3.6
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14956>
2022-02-10 00:28:37 +00:00