Samuel Pitoiset
4b978cd950
aco: do not use ds_{read,write}2 on GFX6
...
According to LLVM, these instructions have a bounds checking bug.
LLVM only uses them on GFX7+.
This fixes broken geometry in Assassins Creed Origins.
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2489
Fixes: 4a553212fa ("radv: enable ACO support for GFX6")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3746 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3746 >
2020-02-07 14:17:06 +01:00
Tapani Pälli
da76dfb515
intel/vec4: fix valgrind errors with vf_values array
...
Fixes valgrind errors introduced since commit a8ec4082 .
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2346
Fixes: a8ec4082 ("nir+vtn: vec8+vec16 support")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Matt Turner <mattst88@gmail.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3691 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3691 >
2020-02-07 09:06:18 +00:00
Andreas Baierl
1572e8f3e1
lima/parser: Change value name in RSW parser
...
Second value of SHADER_ADDRESS is the length of the first instruction
in the shader, so give it a better name.
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com
Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3619 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3619 >
2020-02-07 09:26:32 +01:00
Andreas Baierl
5802259e54
lima/parser: Extend AUX0 findings
...
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com >
Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3619 >
2020-02-07 09:26:32 +01:00
Andreas Baierl
cebfb3169c
lima/parser: Fix RSW depth test parsing
...
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com >
Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3619 >
2020-02-07 09:26:32 +01:00
Leandro Ribeiro
eaa0784fd3
i965: remove duplicated comment
...
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2416 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2416 >
2020-02-07 07:14:20 +02:00
Dave Airlie
fbc117cba3
llvmpipe: advertise 4 vertex streams
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3530 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3530 >
2020-02-07 00:54:42 +00:00
Dave Airlie
7e6690b1a6
draw: don't emit vertex to streams with no outputs
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3530 >
2020-02-07 00:54:42 +00:00
Dave Airlie
72154c9075
draw: emit multiple streams to streamout.
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3530 >
2020-02-07 00:54:42 +00:00
Dave Airlie
00c066e5a0
draw/gs: track emitted prims + verts per stream.
...
This adds tracking of the emitted prims/verts per-stream.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3530 >
2020-02-07 00:54:42 +00:00
Dave Airlie
0c77007c9d
draw: change geom shader output to an array of outputs.
...
Instead of a single output ptr, pass in one per output stream.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3530 >
2020-02-07 00:54:42 +00:00
Dave Airlie
8583fcd8f1
gallivm/nir: add support for multiple vertex streams
...
This adds support to the nir shader build for multiple vertex streams
we store separate stats for each stream, then write them out in the epilogue.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3530 >
2020-02-07 00:54:42 +00:00
Dave Airlie
b668841313
gallivm/swr: add stream_id to geom epilogue emit
...
We want to pass a stream in here so we can write out separate
prim/vertex counts for each stream at the end.
This also adds an ignore any stream option so we can stage more code
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3530 >
2020-02-07 00:54:42 +00:00
Dave Airlie
9d70002744
llvmpipe/query: add support for indexed queries
...
This adds support for the queries needed for gpu_shader5 vertex streams
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3530 >
2020-02-07 00:54:42 +00:00
Eric Anholt
4ca77f347d
u_tile: Skip the packed temporary and just store tiles directly.
...
We were generating a packed copy and then memcpying it, but we can just
pack directly to the destination. Change on glmark2 -b build:use-vbo=true
is modest: 1.06328% +/- 0.994771% (n=84) but does remove the function that
was .6% of CPU time.
I'm not doing the equivalent "get" path at this time because softpipe's
texture cache has some clipping issues that get revealed.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3698 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3698 >
2020-02-06 20:48:03 +00:00
Jose Maria Casanova Crespo
68bb26af63
broadcom: Fix implicit declaration of ffs for Android build
...
Include util/bitscan.h to ensure ffs is available when there is no
glibc like in Android.
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1983
Reviewed-by: Eric Anholt <eric@anholt.net >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2554 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2554 >
2020-02-06 18:31:13 +01:00
Rhys Perry
ce23911b77
aco: gfx10_wave64_bpermute reduce op to print_ir
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-By: Timur Kristóf <timur.kristof@gmail.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3683 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3683 >
2020-02-06 16:43:03 +00:00
Rhys Perry
20eb1acb6f
aco: fix gfx10_wave64_bpermute
...
Since 9254fb4fc7 , the pass replaced the SCC clobber with the scalar
identity temporary. Just skip most of the temporary setup, since we don't
need it for gfx10_wave64_bpermute.
Although shuffles are disabled on GFX10, Detroit: Become Human seems to
use them anyway.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-By: Timur Kristóf <timur.kristof@gmail.com >
Fixes: 9254fb4fc7 ('aco: don't use a scalar
temporary for reductions on GFX10')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3683 >
2020-02-06 16:43:03 +00:00
Georg Lehmann
1c79afd946
Correctly wait in the fragment stage until all semaphores are signaled
...
This fixes two issues:
- a crash if the application uses more than one semaphore for presenting because the driver expects one stage per semaphore
- the swapchain image could be not ready yet if the semaphores aren't signaled, #946 is possible related
Cc: <mesa-stable@lists.freedesktop.org >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3718 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3718 >
2020-02-06 15:16:47 +00:00
Thomas Hellstrom
451cf228d5
svga: Fix banded DMA upload
...
A previous commit ("winsys/svga: Limit the maximum DMA hardware buffer
size") made banded DMA transfer kick in when transfering gnome-shell
window contents under gnome-shell / wayland. This uncovered a bug where
we assumed that banded DMA transfers always occur to the top (y=0) of the
surface.
Fix this by taking the destination y offset into account.
Cc: 19.2 19.3 20.0 <mesa-stable@lists.freedesktop.org >
Fixes: 287c94ea49 ("Squashed commit of the following:")
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com >
Reviewed-by: Brian Paul <brianp@vmware.com >
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3733 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3733 >
2020-02-06 11:26:04 +00:00
Jason Ekstrand
5aec9e84a8
anv: No-op submit and wait calls when no_hw is set
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3734 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3734 >
2020-02-06 10:48:33 +00:00
Lionel Landwerlin
f9febfae41
anv: set MOCS on push constants
...
v2: Also set MOCS on 3DSTATE_CONSTANT_ALL (Ken)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: 67d2cb3e93 ("anv: Add get_push_range_address() helper.")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3732 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3732 >
2020-02-06 10:10:11 +00:00
Michel Dänzer
a140ea1ced
llvmpipe: Bump test timeout to 180 seconds
...
120 still wasn't always enough for the s390x cross-build job, see e.g.
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/1551685
Reviewed-by: Daniel Stone <daniels@collabora.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3715 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3715 >
2020-02-06 09:41:28 +00:00
Rafael Antognolli
4aa7af9e9a
intel: Load the driver even if I915_PARAM_REVISION is not found.
...
This param is only available starting on kernel 4.1. Use a default
value of 0 if it is not found instead.
v2: Update commit message (Lionel)
Cc: Jordan Justen <jordan.l.justen@intel.com >
Cc: Mark Janes <mark.a.janes@intel.com >
Fixes: 96e1c945f2 ("i965: Move device info initialization to common
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3727 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3727 >
2020-02-06 09:46:51 +02:00
Kenneth Graunke
20bcbcd958
isl: Fix the android build.
...
Fixes: 5bea0cf779 ("intel/isl: Move iris's pipe-to-isl format function to isl.")
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3729 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3729 >
2020-02-05 21:31:40 -08:00
Kenneth Graunke
a92be2fb26
intel/genxml: Drop "reserved" enum
...
This was adding "#define reserved 2" to genxml includes, which is a
fairly mean lowercase word to redefine. It ends up breaking the build
on Android, which has __u32 reserved fields in headers.
Defining it also has no purpose. Just drop it.
Fixes: 5bea0cf779 ("intel/isl: Move iris's pipe-to-isl format function to isl.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3729 >
2020-02-05 21:31:27 -08:00
Vinson Lee
deb2bbf57e
swr: Fix GCC 4.9 checks.
...
Fixes: f0a22956be ("swr/rast: _mm*_undefined_* implementations for gcc<4.9")
Fixes: e21fc2c625 ("swr/rast: non-regex knob fallback code for gcc < 4.9")
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Jan Zielinski <jan.zielinski@intel.com >
2020-02-05 19:39:13 -08:00
James Xiong
205ce0bea5
gallium: let the pipe drivers decide the supported modifiers
...
fixes: ac0219cc5b ("gallium: dmabuf support for yuv formats that are not natively supported")
Signed-off-by: James Xiong <james.xiong@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3527 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3527 >
2020-02-06 00:43:58 +00:00
James Xiong
d8569baaed
iris: handle the failure of converting unsupported yuv formats to isl
...
Signed-off-by: James Xiong <james.xiong@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3527 >
2020-02-06 00:43:58 +00:00
Eric Engestrom
76f300f2e4
Revert "egl: put full path to libEGL_mesa.so in GLVND json"
...
This reverts commit 0021f7dc30 .
That commit had 2 issues:
- I missed the `.0` from the filename, causing issues on Debian & Ubuntu
platforms.
- I didn't think about multilib/multi-arch systems, where we'd now need
a separate json for each arch as they point to different libs.
Reverting this commit for now, I'll try again later.
Requested-by: Michel Dänzer <michel@daenzer.net >
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2466
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2471
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2480
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3726 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3726 >
2020-02-06 00:19:13 +00:00
Timur Kristóf
4d34abd15c
aco/optimizer: Don't combine uniform bool s_and to s_andn2.
...
Fixes: 8a32f57fff
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3714 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3714 >
2020-02-05 22:53:45 +00:00
Eric Anholt
a77c3d5eed
nouveau: Reuse tgsi_get_gl_varying_semantic().
...
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3506 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3506 >
2020-02-05 22:26:00 +00:00
Eric Anholt
f4f769c851
nouveau: reuse tgsi_get_gl_frag_result_semantic().
...
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Tested-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3506 >
2020-02-05 22:25:59 +00:00
Eric Anholt
f9358f6f76
nouveau: Reuse tgsi_get_sysval_semantic().
...
It's now in a place accessible from the nouveau driver.
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Tested-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3506 >
2020-02-05 22:25:59 +00:00
Eric Anholt
e25967d6b8
mesa/st: Move the SYSTEM_VALUE -> TGSI_SEMANTIC map to tgsi_from_mesa.
...
This will let us reuse the table from nir-to-tgsi.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3506 >
2020-02-05 22:25:59 +00:00
Kristian H. Kristensen
9891062642
freedreno/a6xx: Implement layout for DRM_FORMAT_MOD_QCOM_COMPRESSED
...
This brings back fd6_fill_ubwc_buffer_sizes() to implement
layout_resource_for_modifier for DRM_FORMAT_MOD_QCOM_COMPRESSED.
Fixes: ecd62ff766 "freedreno: Allow UBWC on textures with multiple mipmap levels."
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3704 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3704 >
2020-02-05 20:53:32 +00:00
Kristian H. Kristensen
d233c8c914
freedreno: Add layout_resource_for_modifier screen vfunc
...
This function is responsible for completing the layout for an imported
resource with the given modifier. Returns 0 on success or -1 If the
modifier is unsupported, invalid or the input parameters are not
compatible with the modifier.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3704 >
2020-02-05 20:53:32 +00:00
Kristian H. Kristensen
af6fb4f0a9
freedreno: Set up supported modifiers in fd*_resource_screen_init()
...
Keep the modifier logic together.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3704 >
2020-02-05 20:53:32 +00:00
Kristian H. Kristensen
d0a7c8f4a8
freedreno/a6xx: Add fd6_resource_screen_init()
...
We'll move a few things here in the next commits.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3704 >
2020-02-05 20:53:32 +00:00
Eric Anholt
8d07d66180
glsl,nir: Switch the enum representing shader image formats to PIPE_FORMAT.
...
This means you can directly use format utils on it without having to have
your own GL enum to number-of-components switch statement (or whatever) in
your vulkan backend.
Thanks to imirkin for fixing up the nouveau driver (and a couple of core
details).
This fixes the computed qualifiers for EXT_shader_image_load_store's
non-integer sizeNxM qualifiers, which we don't have tests for.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com > (v3d)
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3355 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3355 >
2020-02-05 10:31:14 -08:00
Eric Anholt
5bea0cf779
intel/isl: Move iris's pipe-to-isl format function to isl.
...
This will get reused in the shader compiler once we switch it over to pipe
formats instead of GL enums. We can't easily deduplicate i965's
mesa-to-isl mapping because of cases like A32_FLOAT that are mapped
differently.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3355 >
2020-02-05 10:31:09 -08:00
Eric Anholt
bb615e5fe3
mesa: Clean up some endianness adapters for shader image formats.
...
We already had a uint version in formats.h, move the snorm/unorm ones
there, too.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3355 >
2020-02-05 10:31:09 -08:00
Jan Zielinski
23c137612b
gallium/swr: Fix various asserts and security issues
...
To improve the robustness of the code, we want to better
detect issues in testing (using asserts) and use more
secure techniques.
Reviewed-by: Krzysztof Raszkowski <krzysztof.raszkowski@intel.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3710 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3710 >
2020-02-05 16:08:44 +00:00
Alyssa Rosenzweig
7eaf21cb6f
pan/midgard: Fix scheduling issue with csel + render target reference
...
Fixes dEQP-GLES3.functional.shaders.fragdepth.write.dynamic_conditional_write
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3697 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3697 >
2020-02-05 15:41:55 +00:00
Boris Brezillon
38c20696a5
panfrost: Set the MALI_WRITES_{Z,S} flags when needed
...
In order to make Z/S writes from fragment shaders effective, we need
to set the MALI_WRITES_{Z,S} flags when the shader has a
FRAG_RESULT_{DEPTH,STENCIL} output variable.
Now that shaders can change the S value, we can expose the
STENCIL_EXPORT cap.
Signed-off-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/3697 >
2020-02-05 15:41:55 +00:00
Boris Brezillon
8ed94d38b4
panfrost: Add the MALI_WRITES_{Z,S} flags
...
We discovered 2 new shader flags used when a fragment shader updates
the depth/stencil value through a ZS writeout. If those flags are not
set, the depth/stencil value stored in the depth/stencil tilebuffer
remain unchanged.
While at it, rename unknown2 into flags_hi and rename flags into
flags_lo.
Signed-off-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/3697 >
2020-02-05 15:41:55 +00:00
Boris Brezillon
0406ea4856
panfrost: Z24 variants should be sampled as R32UI
...
Midgard has no dedicated samplers for Z24S8 and Z24X8 formats, and the
GPU expects the depth to be encoded in an IEEE 32-bit float. Turn all
Z24_UNORM variants into R32UI and let the shader do the conversion
using bfe+fmul instructions.
Signed-off-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/3697 >
2020-02-05 15:41:55 +00:00
Boris Brezillon
e1ba0cd452
pan/midgard: Add nir_intrinsic_store_zs_output_pan support
...
ZS fragment stores are done like color fragment stores, except it's
using a different RT id (0xFF), the depth and stencil values are stored
in r1.x and r1.y.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
[Fix the scheduling part]
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3697 >
2020-02-05 15:41:55 +00:00
Boris Brezillon
f5619f5073
pan/midgard: Turn Z/S stores into zs_output_pan intrinsics
...
Midgard can't write depth and stencil separately. It has to happen in
a single store operation containing both. Let's add a panfrost specific
intrinsic and turn all depth/stencil stores into a packed depth+stencil
one.
Note that this intrinsic is not yet handled in emit_intrinsic(), but
we'll address that later.
Signed-off-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/3697 >
2020-02-05 15:41:55 +00:00
Ian Romanick
59488cbbac
intel/fs: Don't count integer instructions as being possibly coissue
...
Integer instructions don't coissue. Before e64be391dd
("intel/compiler: generalize the combine constants pass"), this pass
only looked at float sources. There's no shader-db data in that commit,
so I collected some. The results are not good:
Haswell
total instructions in shared programs: 11898805 -> 11908127 (0.08%)
instructions in affected programs: 1218680 -> 1228002 (0.76%)
helped: 2
HURT: 5171
helped stats (abs) min: 12 max: 111 x̄: 61.50 x̃: 61
helped stats (rel) min: 1.59% max: 9.20% x̄: 5.40% x̃: 5.40%
HURT stats (abs) min: 1 max: 311 x̄: 1.83 x̃: 1
HURT stats (rel) min: 0.02% max: 9.91% x̄: 1.05% x̃: 0.70%
95% mean confidence interval for instructions value: 1.55 2.05
95% mean confidence interval for instructions %-change: 1.02% 1.08%
Instructions are HURT.
total cycles in shared programs: 221664974 -> 221404750 (-0.12%)
cycles in affected programs: 120012620 -> 119752396 (-0.22%)
helped: 3464
HURT: 3159
helped stats (abs) min: 1 max: 428160 x̄: 314.55 x̃: 16
helped stats (rel) min: <.01% max: 57.33% x̄: 3.40% x̃: 1.28%
HURT stats (abs) min: 1 max: 87846 x̄: 262.54 x̃: 14
HURT stats (rel) min: <.01% max: 85.57% x̄: 3.01% x̃: 0.77%
95% mean confidence interval for cycles value: -224.23 145.65
95% mean confidence interval for cycles %-change: -0.50% -0.19%
Inconclusive result (value mean confidence interval includes 0).
total spills in shared programs: 9804 -> 10047 (2.48%)
spills in affected programs: 6869 -> 7112 (3.54%)
helped: 2
HURT: 41
total fills in shared programs: 19863 -> 20319 (2.30%)
fills in affected programs: 17428 -> 17884 (2.62%)
helped: 2
HURT: 41
LOST: 20
GAINED: 13
This also prevents regressions in "intel/fs: Promote integer constants
after lowering integer multiplication" (note: that patch will probably
not be committed). When the passes are reorderd, code like
mul(8) acc0<1>D g9<8,8,1>D -2078209981D { align1 1Q };
gets turned into
mov(1) g23<1>D 2078209981D { align1 WE_all 1N };
...
mul(8) acc0<1>D g13<8,8,1>D -g23<0,1,0>D { align1 1Q compacted };
It's not 100% clear why, but these produce different results. Note that
-2078209981 & 0x0ffff = 0x0843, and -(2078209981 & 0x0ffff) =
0xffff0843. It seems like the upper 16-bits of the negation should be
ignored.
Fixes: e64be391dd ("intel/compiler: generalize the combine constants pass")
Cc: Iago Toral Quiroga <itoral@igalia.com >
Suggested-by: Matt Turner <mattst88@gmail.com >
Reviewed-by: Matt Turner <mattst88@gmail.com >
The shaders with spills or fills hurt are the usual suspects. A couple
compute shaders in Dirt Showdown and a compute shader in Bioshock
Infinite. On Haswell, a compute shader (that appears twice in
shader-db) from Aztec Ruins was also hurt for spill and fills.
Haswell
total instructions in shared programs: 11573934 -> 11568335 (-0.05%)
instructions in affected programs: 828623 -> 823024 (-0.68%)
helped: 2825
HURT: 6
helped stats (abs) min: 1 max: 134 x̄: 2.16 x̃: 1
helped stats (rel) min: 0.02% max: 9.05% x̄: 0.84% x̃: 0.61%
HURT stats (abs) min: 1 max: 216 x̄: 81.83 x̃: 56
HURT stats (rel) min: 0.16% max: 8.65% x̄: 4.21% x̃: 4.68%
95% mean confidence interval for instructions value: -2.31 -1.64
95% mean confidence interval for instructions %-change: -0.85% -0.80%
Instructions are helped.
total cycles in shared programs: 187573593 -> 187004633 (-0.30%)
cycles in affected programs: 82816107 -> 82247147 (-0.69%)
helped: 2186
HURT: 1741
helped stats (abs) min: 1 max: 35230 x̄: 326.96 x̃: 16
helped stats (rel) min: <.01% max: 46.11% x̄: 3.11% x̃: 0.90%
HURT stats (abs) min: 1 max: 6138 x̄: 83.73 x̃: 16
HURT stats (rel) min: <.01% max: 104.11% x̄: 2.73% x̃: 0.75%
95% mean confidence interval for cycles value: -197.13 -92.64
95% mean confidence interval for cycles %-change: -0.72% -0.33%
Cycles are helped.
total spills in shared programs: 7870 -> 7743 (-1.61%)
spills in affected programs: 2260 -> 2133 (-5.62%)
helped: 31
HURT: 5
total fills in shared programs: 6320 -> 6263 (-0.90%)
fills in affected programs: 3547 -> 3490 (-1.61%)
helped: 31
HURT: 6
LOST: 9
GAINED: 9
Ivybridge
total instructions in shared programs: 11863372 -> 11859793 (-0.03%)
instructions in affected programs: 757183 -> 753604 (-0.47%)
helped: 2236
HURT: 3
helped stats (abs) min: 1 max: 81 x̄: 1.86 x̃: 1
helped stats (rel) min: 0.03% max: 5.26% x̄: 0.74% x̃: 0.48%
HURT stats (abs) min: 11 max: 301 x̄: 192.33 x̃: 265
HURT stats (rel) min: 1.55% max: 10.51% x̄: 6.89% x̃: 8.62%
95% mean confidence interval for instructions value: -2.01 -1.18
95% mean confidence interval for instructions %-change: -0.77% -0.70%
Instructions are helped.
total cycles in shared programs: 178377378 -> 177946087 (-0.24%)
cycles in affected programs: 76261390 -> 75830099 (-0.57%)
helped: 1635
HURT: 1395
helped stats (abs) min: 1 max: 34796 x̄: 333.53 x̃: 16
helped stats (rel) min: <.01% max: 47.15% x̄: 2.82% x̃: 0.64%
HURT stats (abs) min: 1 max: 4315 x̄: 81.74 x̃: 18
HURT stats (rel) min: <.01% max: 49.98% x̄: 1.99% x̃: 0.53%
95% mean confidence interval for cycles value: -197.06 -87.62
95% mean confidence interval for cycles %-change: -0.78% -0.43%
Cycles are helped.
total spills in shared programs: 4188 -> 4182 (-0.14%)
spills in affected programs: 1557 -> 1551 (-0.39%)
helped: 30
HURT: 3
total fills in shared programs: 5056 -> 5245 (3.74%)
fills in affected programs: 2708 -> 2897 (6.98%)
helped: 30
HURT: 3
LOST: 5
GAINED: 1
No shader-db changes on any other Intel platform.
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3544 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3544 >
2020-02-05 15:13:17 +00:00