Commit Graph

125631 Commits

Author SHA1 Message Date
Samuel Pitoiset ab9ecb607b radv,vulkan: add a new x11 wsi drirc workaround for DOOM Eternal
DOOM Eternal happily creates a swapchain with 2 images for IMMEDIATE.
This fixes a 10% performance issue with RADV.

Cc: 20.1 <mesa-stable@lists.freedesktop.org>
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/5704>
2020-07-02 08:31:57 +00:00
Samuel Pitoiset 311b9f2583 Revert "vulkan/wsi/x11: Ensure we create at least minImageCount images."
This breaks some games like Wolfenstein Youngblood or Wolfenstein 2
that crash at launch if the number of images is more than what they
expected.

We could add vk_x11_strict_image_count to fix these game bugs but
it seems more conservative to revert that change and add a new wsi
drirc workaround for Doom Eternal.

This reverts commit 5f97dfc4c8.

Cc: 20.1 <mesa-stable@lists.freedesktop.org>
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/5704>
2020-07-02 08:31:57 +00:00
Samuel Pitoiset 11a6a96f8a radv: fix wide lines with multisample enabled
When set, EXPAND_LINE_WIDTH expands the line width by 1/cos(a),
where a is the minimum angle from horizontal or vertical. This
seems required by OpenGL line rasterization but not by Vulkan.

Similar to what AMDVLK and AMDGPU-PRO do for AA wide lines.

This fixes
dEQP-VK.rasterization.interpolation_multisample_*_bit.*lines_wide.

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/5698>
2020-07-02 07:51:48 +00:00
Daniel Stone efec833a18 CI: Disable Windows build due to unstable infrastructure
The Windows runner is having a lot of issues cloning repositories,
failing early due to an unhandled HTTP error. Temporarily disable it
until we can figure out what's going on and fix it.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5716>
2020-07-02 07:26:25 +00:00
Mike Blumenkrantz f2f57ef9f7 zink: implement Vk_EXT_index_type_uint8
this is a simple extension that enables using uint8-sized index buffers,
which lets us avoid having those go through primconvert

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5712>
2020-07-02 07:11:27 +00:00
Samuel Pitoiset 53372175c9 radv: fix wide points and lines
The maximum value for both points and lines is 65536. This doesn't
fix anything known (just found this while looking in that area).

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/5696>
2020-07-02 08:26:03 +02:00
Dave Airlie 8b8ffb12b4 docs: update llvmpipe GL 4.0 status
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3778>
2020-07-02 04:12:17 +00:00
Dave Airlie af7a7f6ce7 ci: fixup tests after all indirect images fixes.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3778>
2020-07-02 04:12:17 +00:00
Dave Airlie 0ecae0ac0b llvmpipe: handle indirect images properly
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3778>
2020-07-02 04:12:17 +00:00
Dave Airlie b7b22b735d draw/sample: add support for indirect images
This uses the array functions to implement indirect image support
for draw shaders

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3778>
2020-07-02 04:12:17 +00:00
Dave Airlie e6f7fe3324 gallivm/nir: add support for indirect image loading
This adds support for indirect image loading, image stores
can cause images with different formats to be stored to,
so this operates like the texture code now.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3778>
2020-07-02 04:12:17 +00:00
Dave Airlie bc1ac7dc3f gallivm/img: refactor out the texel return type (v2)
v2:
refactor to just pass type as pointed out by Roland.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3778>
2020-07-02 04:12:17 +00:00
Dave Airlie 6e25a5a375 gallivm/nir: refactor image operations for indirect support.
This just refactors the image code, so that outdata is passed
explicitly, and refactors the internal handling of NONE formats.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3778>
2020-07-02 04:12:17 +00:00
Dave Airlie 3ca3b07fc1 gallivm/nir: support passing image index into image code.
This doesn't do anything yet, just adds parsing support for it.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3778>
2020-07-02 04:12:17 +00:00
Dave Airlie f75c1e83e2 llvmpipe: pass number of images into image soa create
Just store this for now to use later with indexing

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3778>
2020-07-02 04:12:17 +00:00
Dave Airlie 8a4ef09e7e draw: pass number of images to image soa create
This is stored for now but will be used as part of indirect
image support

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3778>
2020-07-02 04:12:17 +00:00
Dave Airlie ee10f24a31 llvmpipe: enable ARB_gpu_shader5
This isn't fully free of bugs, but it's good to get CI working,
so fixing those bugs doesn't break anything.

The main buggy areas are missing indirect texture size,
and transform feedback geometry streams.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3778>
2020-07-02 04:12:17 +00:00
Dave Airlie 8807bdb1b7 gallivm/sample: handle size unit offset
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3778>
2020-07-02 04:12:17 +00:00
Dave Airlie d243655d34 llvmpipe/draw: wire up indirect offset
This bounds checks and adds to the llvm index.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3778>
2020-07-02 04:12:17 +00:00
Dave Airlie 3b973eab73 gallivm/sample: pass indirect offset into texture/image units
This isn't needed for the basic indirect code, but it is needed for
texture size/image size unfortunately. They could be done with a super
switch, but it seems simple to query them.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3778>
2020-07-02 04:12:17 +00:00
Dave Airlie e168d148d7 gallivm/nir: handle non-uniform texture offsets
The way we construt vertex/geom shaders means these can
diverge, so we have to just hammer it out manually,
there are likely optimisation opportuniities in here

Signed-off-by: Dave Airlie <airlied@redhat.com>

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3778>
2020-07-02 04:12:17 +00:00
Dave Airlie 9172e405ef gallivm/nir: add texture unit indexing
This hooks up the index from NIR into the sampler code.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3778>
2020-07-02 04:12:17 +00:00
Dave Airlie 52a050ea0a llvmpipe: add support for indirect texture access.
This hooks up the sampler switch statement generator
 to the llvmpipe sampler interface.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3778>
2020-07-02 04:12:17 +00:00
Dave Airlie 6dc904f600 draw: add support for indirect texture access
This hooks up the switch statement generator to the draw code.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3778>
2020-07-02 04:12:17 +00:00
Dave Airlie 28f906ad91 gallivm: add indirect texture switch statement builder.
This adds the apis to add an indirect accessor for arrays
of textures, using an LLVM switch statement and per-texture
sampler functions.

It also adds the indexer to the sampler parameters

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3778>
2020-07-02 04:12:16 +00:00
Dave Airlie 8b15a08ebd gallivm/sample: change texture function generator api
This passes some more paramters in directly and changes how
the returns are done in order to reuse this function for
indirect texture support later.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3778>
2020-07-02 04:12:16 +00:00
Dave Airlie 30c5cbbcd2 llvmpipe: pass number of samplers into llvm sampler code.
This is to be used later for indirect texture access

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3778>
2020-07-02 04:12:16 +00:00
Dave Airlie 6528a24cc5 draw: pass nr_samplers into llvm sample state creation.
This will be used later to handle indirect texture support.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3778>
2020-07-02 04:12:16 +00:00
Timothy Arceri d55aa78615 nir: add missing break to nir_opt_access()
Fixes: f2d0e48ddc ("glsl/nir: Add optimization pass for access flags")

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5714>
2020-07-02 12:11:30 +10:00
Timothy Arceri b8409a6af7 egl: move fallthrough comment so gcc can see it
Acked-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5714>
2020-07-02 12:11:30 +10:00
Timothy Arceri 0d5427fa44 iris: add missing fallthrough comment
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5714>
2020-07-02 12:11:30 +10:00
Timothy Arceri 1a8f918050 intel/compiler: add and fix up fallthrough comments for gcc warnings
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5714>
2020-07-02 12:11:30 +10:00
Timothy Arceri 512db7ec78 anv: update fallthrough comment so gcc sees it
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5714>
2020-07-02 12:11:30 +10:00
Timothy Arceri 06dc2f3f47 gallivm: add missing break
Fixes: 26c5ae80f0 ("llvmpipe: enable ARB_shader_group_vote")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5714>
2020-07-02 12:11:30 +10:00
Timothy Arceri 2ed35c7102 llvmpipe: add missing fallthrough comments
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5714>
2020-07-02 12:11:30 +10:00
Timothy Arceri de4004f8ba i965: add and fix fallthrough comments
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5714>
2020-07-02 12:11:30 +10:00
Matt Turner 8da810a7fb intel/compiler: Don't emit no-op cr0 changes
If mask is 0, we're asking for no changes to cr0.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5566>
2020-07-02 01:24:06 +00:00
Matt Turner fe14dc98bf intel/compiler: Add assert that set bits are within mask
We generate bitfields of bits that we want to retain (mask) and bits
that we want to set (brw_mode) in the cr0 register, so the bits we want
to set should be in the set of bits we want to retain.

Also, remove the initialization of mask from
fs_visitor::emit_shader_float_controls_execution_mode since
brw_rnd_mode_from_nir initializes the mask parameter unconditionally.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5566>
2020-07-02 01:24:06 +00:00
Greg V 29e2a3b8f5 gallium,util: undef ALIGN on FreeBSD to prevent name clash
Some rare headers like ipc/shm and pthread_np cause
machine/param.h to be included which defines a macro called ALIGN.

Signed-off-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3559>
2020-07-01 16:47:05 +00:00
Emmanuel f678811b56 i965: Explicitly cast value to uint64_t
In FreeBSD x86 and aarch64 __u64 is typedef to unsigned long and
is the same size as unsigned long long.
Since we are explicitly specifying the format, cast the value
to the proper type.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Emmanuel <manu@FreeBSD.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3559>
2020-07-01 16:47:05 +00:00
Emmanuel 565a80450d iris: Explicitly cast value to uint64_t
In FreeBSD x86 and aarch64 __u64 is typedef to unsigned long and
is the same size as unsigned long long.
Since we are explicitly specifying the format, cast the value
to the proper type.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Emmanuel <manu@FreeBSD.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3559>
2020-07-01 16:47:05 +00:00
Emmanuel 708db983dd meson: Do not enable USE_ELF_TLS for FreeBSD
Compiling with this option result in too much TLS usage and FreeBSD
cannot handle that.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Signed-off-by: Emmanuel <manu@FreeBSD.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3559>
2020-07-01 16:47:05 +00:00
Michel Dänzer 6cba468b5e gitlab-ci: Do not create the "success" job when the test-docs job exists
It's redundant in that case.

v2:
* Adapt to v2 of test-docs job rules.

Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5469>
2020-07-01 14:31:38 +00:00
Michel Dänzer 8e2cb8ef27 gitlab-ci: Extend .ci-run-policy template for docs jobs
Requires using rules: in the pages job as well, so it doesn't inherit
the rules from the template.

v2:
* Add comment explaining that cases not covered by explicit rules
  default to "when: never".

Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5469>
2020-07-01 14:31:38 +00:00
Michel Dänzer 1c612e8c09 gitlab-ci: Use rules: instead of except:/only: for test-docs job
Only run the job automatically for Marge Bot, otherwise let it be
triggered manually.

v2:
* Never run this job for the main project, since it's only needed in
  pre-merge pipelines.
* Add comment explaining that cases not covered by explicit rules
  default to "when: never".

Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5469>
2020-07-01 14:31:38 +00:00
Erik Faye-Lund 196ac4c6f3 ci: move test-docs to container stage
While we're at it, rename it to reflect that we're now also testing docs
here.

Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5469>
2020-07-01 14:31:38 +00:00
Erik Faye-Lund 28ca70b6b6 ci: move deploy-stage later in the pipeline
This makes it not clutter up the pipeline results page so much.

Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5469>
2020-07-01 14:31:38 +00:00
Erik Faye-Lund 8774707b1e ci: test docs for non-master builds
This ensures that we test on CI before merge-requests gets merged.

Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5469>
2020-07-01 14:31:38 +00:00
Erik Faye-Lund 24fe9f43e5 ci: only build docs if any docs changed
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5469>
2020-07-01 14:31:38 +00:00
Erik Faye-Lund d1ca80235d ci: only build docs in the upstream-repo
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5469>
2020-07-01 14:31:38 +00:00