Commit Graph

134289 Commits

Author SHA1 Message Date
Italo Nicola 0b9b0ee532 panfrost: implement gallium->set_shader_images
Implements gallium images endpoint.
If an AFBC resource is bound to an image, we convert it to tiled, since
images need pixel-level granularity and AFBC doesn't allow for that.

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8066>
2021-01-27 12:39:41 +00:00
Italo Nicola f63a35baee panfrost: add resource modifier conversion
Adds a helper function to convert a resource to a chosen modifier.

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8066>
2021-01-27 12:39:41 +00:00
Italo Nicola c7c4fbc823 panfrost: decode 3d attribute continuation
Adds 3D attribute buffer continuations to pandecode and a message to
keep track of which buffer continuations we aren't decoding yet.

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8066>
2021-01-27 12:39:41 +00:00
Italo Nicola 2638f72d2d panfrost: add 3d attribute buffer continuation to XML
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8066>
2021-01-27 12:39:41 +00:00
Italo Nicola a36c95cd77 panfrost: fix attribute continuation decoding
Because attribute continuations aren't considered whole attributes, we
need to increase the total number of attributes for each continuation
when decoding, otherwise we will end up missing a buffer for every
continuation we have.

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8066>
2021-01-27 12:39:41 +00:00
Marcin Ślusarz 2fc5411e5e intel/perf: export information about units of performance counters
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8580>
2021-01-27 11:38:06 +00:00
Tony Wasserka 5fdc298e4b aco/ra: Remove preprocessor guards for print_regs
This debug helper isn't used anywhere by default, but compiling it anyway
ensures future refactors don't break it.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8719>
2021-01-27 12:08:47 +01:00
Tony Wasserka 3675aefa84 aco/ra: Fix build with print_regs enabled
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8719>
2021-01-27 12:08:47 +01:00
Tony Wasserka b241a050da aco/ra: Fix print_regs using the wrong constant to check for blocked slots
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8719>
2021-01-27 12:08:47 +01:00
Abhishek Kumar 26c9574bdb intel: change urb max shader geometry for KBL GT1
Below Deqp CTS failure is seen on KBL GT1(tested on 0x5906) only ,
GT2 all test passes, changing the max shader geometry to 256
(previous 640) fixes all failure tests.Similar issues on
CML GT1 (Gen9) is fixed
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8550

dEQP-GLES31.functional.geometry_shading.layered.
	 render_with_default_layer_cubemap
	 render_with_default_layer_3d
	 render_with_default_layer_2d_array

Signed-off-by: Abhishek Kumar <abhishek4.kumar@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8731>
2021-01-27 09:46:44 +00:00
Samuel Pitoiset 741c0b1605 radv: enable TC-compat HTILE for mipmaps on GFX10+
Mipmaps+layers should be investigated and mipmaps support added
for previous gens (GFX8-9).

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8124>
2021-01-27 09:19:09 +01:00
Samuel Pitoiset 5417c6690e radv: teach radv_htile_enabled() about the number of HTILE levels
This is the main function that enables/disables HTILE for mipmaps.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8124>
2021-01-27 09:19:09 +01:00
Samuel Pitoiset 13f34e65ba radv: add support for fast clearing levels of the HTILE buffer
This can probably be optimized further by checking if the levels
are contiguous in memory.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8124>
2021-01-27 09:19:09 +01:00
Samuel Pitoiset 6576033b20 radv: remove mipmaps related assertions when initializing HTILE
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8124>
2021-01-27 09:02:17 +01:00
Samuel Pitoiset d47b13c028 radv: do not decompress/resummarize levels without HTILE
It's completely useless to decompress or resummarize levels that
are not compressed using HTILE.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8124>
2021-01-27 09:02:17 +01:00
Samuel Pitoiset e7d898a268 radv: check if HTILE is enabled per-level instead of the entire image
With HTILE mipmaps support, we should check if the base level
currently in use supports compression.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8124>
2021-01-27 09:02:17 +01:00
Samuel Pitoiset 8f1db7401a radv: use the image view range when fast clearing depth
This doesn't change behevior since the driver currently doesn't
support HTILE for mipmaps and also because we can only clear the
whole array layers at once. This improves consistency regarding
the fast clear color path.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8124>
2021-01-27 09:02:17 +01:00
Samuel Pitoiset 8087202a65 ac/surface: store HTILE mip info into the surface
GFX10 can only compress the first level in the mip tail.
GFX9+ is not yet supported because mips are interleaved.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8124>
2021-01-27 09:02:17 +01:00
Dave Airlie 2f5ef1e891 CI: add lavapipe to llvmpipe rules.
I've noticed that that llvmpipe tests don't all get run,
it's probably good enough to just run them on lavapipe
changes as well

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8732>
2021-01-27 16:11:43 +10:00
Dave Airlie 34e3e16493 lavapipe: add VK_EXT_conditional_rendering support.
This passes all the CTS tests.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8182>
2021-01-27 10:57:42 +10:00
Dave Airlie 9cc3328842 llvmpipe: handle vulkan conditional rendering
This implements the new hook to conditionialise rendering
on memory contents

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8182>
2021-01-27 10:57:37 +10:00
Dave Airlie 86328fc7b7 gallium: add a cond rendering hook for vulkan.
The vulkan cond rendering hook is quite different than the
traditional gallium one so add a new interface for it.

This just conditionalises rendering on the memory location.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8182>
2021-01-27 10:57:31 +10:00
Dave Airlie a57361ae02 lavapipe: rewrite attachment clearing for conditional rendering.
Attachment clears have to respect cond rendering, so they can't
call clear texture directly, they have to create temporary
surfaces and clear via those.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8182>
2021-01-27 10:57:25 +10:00
Dave Airlie 4be0e92db1 lavapipe: refactor image surface creation
There is a need to create arbitrary surfaces for clearing,
so split out the templating from the storing to img->vk_surface
so temporary surfaces can be created for clearing.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8182>
2021-01-27 10:57:06 +10:00
Rhys Perry 0f178290ca aco: don't affect isPrecise() after applying output modifiers
fossil-db (GFX10.3):
Totals from 26679 (19.14% of 139391) affected shaders:
SGPRs: 1757155 -> 1757059 (-0.01%); split: -0.05%, +0.04%
VGPRs: 1175932 -> 1173556 (-0.20%); split: -0.21%, +0.01%
CodeSize: 86203592 -> 85572480 (-0.73%); split: -0.73%, +0.00%
MaxWaves: 315513 -> 315805 (+0.09%); split: +0.10%, -0.00%
Instrs: 16297785 -> 16143745 (-0.95%); split: -0.95%, +0.00%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8718>
2021-01-26 22:22:58 +00:00
Nanley Chery 40d6b92de9 iris: Disable aux as needed in iris_flush_resource
Disable compression in iris_flush_resource if the resource lacks a
modifier. When a caller wants to prepare such a resource for sharing
(via eglCreateImage for example), this change enables all reference
holders to access the resource in a common manner - without compression.

This fixes misrendering with 3D-accelerated qemu. A piglit test which
reproduces qemu's behavior, ext_image_dma_buf_import-export-tex, is also
enabled to pass.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2678
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8663>
2021-01-26 22:15:31 +00:00
Nanley Chery b26f510978 gallium: Flush GL API resources in eglCreateImage
Some drivers need to be able to remove compression from resources before
they are handed to consumers that wouldn't understand or expect it.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8663>
2021-01-26 22:15:31 +00:00
Nanley Chery 0a8cc88202 gallium: Map _DRI_IMAGE_FORMAT_NONE to NULL
Many entries in the dri2_format_table have _DRI_IMAGE_FORMAT_NONE as the
dri_format. Make the result of dri2_get_mapping_by_format a tad more
well-defined by returning NULL when this format is passed into it.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8663>
2021-01-26 22:15:31 +00:00
Mike Blumenkrantz 6c9aca951c st/drawpixels: use GL_CLAMP_TO_EDGE instead of GL_CLAMP for samplers
no border colors here either

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Drive-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8714>
2021-01-26 21:54:21 +00:00
Mike Blumenkrantz 66bb427762 st/bitmap: use GL_CLAMP_TO_EDGE for bitmap samplers
we aren't using border colors here, so this should be fine (and more compatible)

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Drive-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8714>
2021-01-26 21:54:21 +00:00
Daniel Schürmann b06609e903 aco: fix nir_intrinsic_ballot with wave32
Found by inspection.

Fixes: 21db083504 ('aco/wave32: Allow setting the subgroup ballot size to 64-bit.')

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8703>
2021-01-26 21:06:48 +00:00
Caio Marcelo de Oliveira Filho c02b682204 ci: Add nouveau chipset 162 to shader-db runs
Suggested-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8585>
2021-01-26 20:20:47 +00:00
Caio Marcelo de Oliveira Filho 9f3d5e99ea compiler: Use util/bitset.h for system_values_read
It is currently a bitset on top of a uint64_t but there are already
more than 64 values.  Change to use BITSET to cover all the
SYSTEM_VALUE_MAX bits.

Cc: mesa-stable
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Acked-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8585>
2021-01-26 20:20:47 +00:00
Caio Marcelo de Oliveira Filho ecd0ae09f9 nir/linking: Remove system_value handling from helper
All uses are passing variables of either nir_var_shader_in or
nir_var_shader_out modes.  Note that currently there are more than 64
system values, so the uint64_t wouldn't be enough anyway.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8585>
2021-01-26 20:20:46 +00:00
Eric Anholt 4fdd8b09bd ci/freedreno: Ban vs-clip-vertex-enables which flakes in CI.
It's reliably failing on its own, but has shown up as the top flake in CI.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8722>
2021-01-26 19:17:27 +00:00
Eric Anholt ce1bb26b06 ci/freedreno: Detect cheza HFI errors and restart the run.
These are intermittent (~1/day), seem to be around GPU faults (so
hopefully will go away once we clean up piglit's fault errors), and are
probably also related to our vintage firmware.  Until we can get new
hardware in the farm, just restart the flaked job.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8722>
2021-01-26 19:17:27 +00:00
Samuel Pitoiset 4c3ad4d065 nir/algebraic: mark more optimization with fsat(NaN) as inexact
These optimizations are duplicated from the main optimization table
to the late one... And I missed some in the original fix.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3368
Fixes: bc123c396a ("nir/algebraic: mark some optimizations with fsat(NaN) as inexact")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8716>
2021-01-26 17:06:23 +00:00
Timur Kristóf 3c03fa5801 radv: Only enable sparse features on Polaris and newer.
On Fiji, the CTS image can cause a hang when these are enabled.
Let's enable them for Polaris and newer only, for now.

Gitlab: #4136
Fixes: 9f43b44bf0
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8646>
2021-01-26 16:56:35 +00:00
Samuel Pitoiset f01ea0aef8 radv: remove unused EMPTY constant in radv_descript_set.c
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8711>
2021-01-26 17:31:07 +01:00
Samuel Pitoiset fbeca9df87 radv: remove stub() macros
They are unused since sparse texture is implemented.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8711>
2021-01-26 17:31:05 +01:00
Samuel Pitoiset 64ed873405 radv: remove radv_util.h
util_bitcount() is already defined in src/util/bitscan.h.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8711>
2021-01-26 17:31:03 +01:00
Gert Wollny 4099cdc97f compiler/nir: Add support for lowering stores with nir_lower_instruction
The function is very convenient for lowering any type of instruction
that can be easily filtered, but so far instructions that didn't return
a value were siletly ignored.

Fix this by
  - not requiring a return value in the instruction
  - add a new special return value from the lowering implementation
    function to indicated that an instruction that doesn't have a
    return value must be removed, and
  - don't try to collect and replace uses in this case.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8177>
2021-01-26 15:27:17 +00:00
David McFarland e3f56601e0 radv: fix divide by zero with no tesselation params
Cc: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7878>
2021-01-26 15:14:33 +00:00
Daniel Schürmann 9a49760e82 aco: fix VCC hint on boolean subgroup operations
Found by inspection.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8712>
2021-01-26 14:59:30 +00:00
Rhys Perry b729cd58d7 nir/algebraic: eliminate exact a*0.0 if float execution mode allow it
fossil-db (GFX10):
Totals from 611 (0.44% of 139391) affected shaders:
SGPRs: 40528 -> 40288 (-0.59%)
VGPRs: 16136 -> 16152 (+0.10%); split: -0.15%, +0.25%
CodeSize: 970192 -> 951036 (-1.97%)
MaxWaves: 10561 -> 10557 (-0.04%); split: +0.08%, -0.11%
Instrs: 174874 -> 172879 (-1.14%); split: -1.18%, +0.04%

fossil-db (GFX10.3):
Totals from 611 (0.44% of 139391) affected shaders:
SGPRs: 40680 -> 40488 (-0.47%)
VGPRs: 18368 -> 18276 (-0.50%); split: -0.57%, +0.07%
CodeSize: 1050712 -> 1033624 (-1.63%); split: -1.64%, +0.02%
MaxWaves: 8658 -> 8674 (+0.18%)
Instrs: 205364 -> 201220 (-2.02%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5523>
2021-01-26 11:36:13 +00:00
Rhys Perry 614ab26afd nir/algebraic: optimize out exact a+0.0 if it's used only as a float
fossil-db (GFX10):
Totals from 133 (0.10% of 139391) affected shaders:
SGPRs: 7864 -> 7856 (-0.10%); split: -0.20%, +0.10%
VGPRs: 4884 -> 4836 (-0.98%)
CodeSize: 288932 -> 287084 (-0.64%)
MaxWaves: 1973 -> 1979 (+0.30%)
Instrs: 53899 -> 53550 (-0.65%)

fossil-db (GFX10.3):
Totals from 133 (0.10% of 139391) affected shaders:
SGPRs: 7832 -> 7835 (+0.04%); split: -0.06%, +0.10%
VGPRs: 5144 -> 5088 (-1.09%)
CodeSize: 318912 -> 316696 (-0.69%)
MaxWaves: 1735 -> 1746 (+0.63%)
Instrs: 65367 -> 64853 (-0.79%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5523>
2021-01-26 11:36:13 +00:00
Rhys Perry 2f0d480c73 aco: optimize out a*1.0 if it's used as a float
fossil-db (GFX10):
Totals from 370 (0.27% of 139391) affected shaders:
CodeSize: 641436 -> 634156 (-1.13%); split: -1.14%, +0.00%
Instrs: 117668 -> 115739 (-1.64%); split: -1.64%, +0.00%

fossil-db (GFX10.3):
Totals from 370 (0.27% of 139391) affected shaders:
SGPRs: 26888 -> 26912 (+0.09%)
VGPRs: 13964 -> 13916 (-0.34%)
CodeSize: 692008 -> 679008 (-1.88%)
MaxWaves: 4779 -> 4783 (+0.08%)
Instrs: 134265 -> 132026 (-1.67%); split: -1.67%, +0.00%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5523>
2021-01-26 11:36:13 +00:00
Rhys Perry 54a09545ec aco: optimize a*0.0
fossil-db (GFX10):
Totals from 1943 (1.39% of 139391) affected shaders:
SGPRs: 99952 -> 99544 (-0.41%); split: -0.44%, +0.03%
VGPRs: 60880 -> 60272 (-1.00%); split: -1.02%, +0.02%
CodeSize: 5138488 -> 5107500 (-0.60%); split: -0.61%, +0.01%
MaxWaves: 32193 -> 32380 (+0.58%)
Instrs: 983178 -> 975684 (-0.76%); split: -0.77%, +0.01%

fossil-db (GFX10.3):
Totals from 1943 (1.39% of 139391) affected shaders:
SGPRs: 99832 -> 99648 (-0.18%); split: -0.25%, +0.06%
VGPRs: 64708 -> 63944 (-1.18%); split: -1.27%, +0.09%
CodeSize: 5196732 -> 5157632 (-0.75%); split: -0.76%, +0.00%
MaxWaves: 27478 -> 27486 (+0.03%); split: +0.06%, -0.03%
Instrs: 1007222 -> 998737 (-0.84%); split: -0.84%, +0.00%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5523>
2021-01-26 11:36:13 +00:00
Rhys Perry 2849f0b5aa nir/algebraic: optimize out exact a*1.0 if it's used only as a float
fossil-db (GFX10):
Totals from 10180 (7.30% of 139391) affected shaders:
SGPRs: 549392 -> 549448 (+0.01%); split: -0.00%, +0.01%
VGPRs: 243228 -> 243008 (-0.09%); split: -0.11%, +0.02%
CodeSize: 12939080 -> 12603996 (-2.59%); split: -2.59%, +0.00%
MaxWaves: 186948 -> 186976 (+0.01%)
Instrs: 2497266 -> 2414648 (-3.31%)

fossil-db (GFX10.3):
Totals from 10180 (7.30% of 139391) affected shaders:
SGPRs: 549672 -> 549280 (-0.07%); split: -0.23%, +0.16%
VGPRs: 289296 -> 283672 (-1.94%); split: -2.83%, +0.88%
CodeSize: 13920180 -> 13255560 (-4.77%); split: -4.77%, +0.00%
MaxWaves: 151789 -> 153165 (+0.91%)
Instrs: 2756978 -> 2671517 (-3.10%); split: -3.10%, +0.00%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5523>
2021-01-26 11:36:13 +00:00
Rhys Perry 0c3d8e8e2e aco: disable a*1.0 optimization if the instruction is precise
fossil-db (GFX10):
Totals from 10370 (7.44% of 139391) affected shaders:
SGPRs: 564072 -> 564016 (-0.01%); split: -0.01%, +0.00%
VGPRs: 248312 -> 248532 (+0.09%); split: -0.02%, +0.11%
CodeSize: 12866732 -> 13208904 (+2.66%); split: -0.00%, +2.66%
MaxWaves: 190198 -> 190170 (-0.01%)
Instrs: 2460818 -> 2545351 (+3.44%)

fossil-db (GFX10.3):
Totals from 10370 (7.44% of 139391) affected shaders:
SGPRs: 563904 -> 564272 (+0.07%); split: -0.16%, +0.22%
VGPRs: 289344 -> 295016 (+1.96%); split: -0.88%, +2.84%
CodeSize: 13519204 -> 14197020 (+5.01%); split: -0.00%, +5.01%
MaxWaves: 155946 -> 154566 (-0.88%)
Instrs: 2719177 -> 2806919 (+3.23%); split: -0.00%, +3.23%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5523>
2021-01-26 11:36:13 +00:00