Commit Graph

116131 Commits

Author SHA1 Message Date
Dave Airlie f92226931b st/mesa: Prefer R8 for bitmap textures
If it's not available, we fall back to A8. This should work on all drivers,
because we depend on it in the display-list code already.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2019-10-09 09:56:00 +02:00
Samuel Pitoiset ad96c4987c drirc: enable vk_x11_override_min_image_count for DOOM
DOOM fails to handle more images than expected when the adaptative
sync mode is enabled.

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1902
Cc: 19.2 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2019-10-09 08:38:38 +02:00
Samuel Pitoiset cbd6f0a0c2 radv: implement VK_KHR_shader_clock
NIR->LLVM and ACO already support nir_intrinsic_shader_clock.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2019-10-09 08:43:14 +02:00
Kenneth Graunke 0b7ecfdda5 iris: Implement the Broadwell NP Z PMA Stall Fix
This should help avoid stalls in the pixel mask array in certain
non-promoted depth cases.  It especially helps for Z16, as each bit
in the PMA corresponds to two pixels when using Z16, as opposed to
the usual one pixel.

Improves performance in GFXBench5 TRex by 22% (n=1).
2019-10-08 21:53:12 -07:00
Caio Marcelo de Oliveira Filho 4327837be9 docs: Update recently enabled VK extensions on Intel 2019-10-08 16:34:00 -07:00
Caio Marcelo de Oliveira Filho 9560c9b498 anv: Enable VK_EXT_shader_subgroup_{ballot,vote}
Anvil now supports and passes Vulkan CTS tests matching

    dEQP-VK.subgroups.*.ext_shader_subgroup_ballot.*
    dEQP-VK.subgroups.*.ext_shader_subgroup_vote.*

and crucible tests matching

    func.shader-ballot.*
    func.shader-subgroup-vote.*

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2019-10-08 16:34:00 -07:00
Kenneth Graunke b453b29fc7 st/mesa: Fix inverted polygon stipple condition
Fixes Piglit's gl-2.1-polygon-stipple-fs on iris.

Fixes: 63f24c3c01 ("gallium: Enable MESA_framebuffer_flip_y")
Reviewed-by: Fritz Koenig <frkoenig@google.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
2019-10-08 16:18:13 -07:00
Fritz Koenig 63f24c3c01 gallium: Enable MESA_framebuffer_flip_y
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
2019-10-08 13:53:01 -07:00
Fritz Koenig 66937abe2b mesa: Allow MESA_framebuffer_flip_y for GLES 3
Implement glFramebufferParameteriMESA on GLES 3 so
that the extension is not dependant on GLES 3.1

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
2019-10-08 13:53:01 -07:00
Fritz Koenig 9fb76392de mesa: GetFramebufferParameteriv spelling
GetFramebufferParameteriv was incorrectly spelled as
GetFramebufferParameteri.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
2019-10-08 13:53:01 -07:00
Fritz Koenig ab8e5a1539 include/GLES2: Sync GLES2 headers with Khronos
Bring in glFramebufferParameteriMESA/glGetFramebufferParameterivMESA

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
2019-10-08 13:53:01 -07:00
Clément Guérin 5afbe87d21 radeonsi: enable zerovram for Rocket League
Fixes corruption on game startup.

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1888

Cc: 19.1 19.2 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
2019-10-08 16:07:30 -04:00
Kenneth Graunke face221283 iris: Properly unreference extra VBOs for draw parameters
bound_vertex_buffers doesn't include extra draw parameters buffers.
Tracking this correctly is kind of complicated, and iris_destroy_state
isn't exactly in a hot path, so just loop over all VBO bindings.

Fixes: 4122665dd9 (iris: Enable ARB_shader_draw_parameters support)
Reported-by: Sergii Romantsov <sergii.romantsov@globallogic.com>
2019-10-08 11:14:21 -07:00
Eric Engestrom 6f26eae077 meson: fix sys/mkdev.h detection on Solaris
On Solaris, sys/sysmacros.h has long-deprecated copies of major() & minor()
but not makedev().
sys/mkdev.h has all three and is the preferred choice.

Let's make sure we check for all 3 major(), minor() and makedev().

Reported-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Tested-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-10-08 16:26:50 +01:00
Eric Engestrom 02b3aa3cf3 include: update drm-uapi
`drm.h` was missing a `#include <stdint.h>`, which was completely
breaking the non-linux builds after 272f9cfe6a ("dri: Use DRM_FORMAT_*
instead of defining our own copy.") started making use of it.

Fixes: 272f9cfe6a ("dri: Use DRM_FORMAT_* instead of defining our own copy.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/950
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2019-10-08 14:23:51 +01:00
Michel Dänzer 3b8aeb0906 loader: Simplify handling of the radeonsi driver
The list of AMD/ATI devices supported by radeon/r200/r300/r600 is
complete, so anything else must use radeonsi.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2019-10-08 09:02:34 +00:00
Bas Nieuwenhuizen a0c930d284 amd/llvm: Fix warning due to asserted-only variable.
[212/893] Compiling C object 'src/amd/llvm/ce8261c@@amd_common_llvm@sta/ac_nir_to_llvm.c.o'.
../mesa/src/amd/llvm/ac_nir_to_llvm.c: In function ‘visit_image_atomic’:
../mesa/src/amd/llvm/ac_nir_to_llvm.c:2636:17: warning: unused variable ‘format’ [-Wunused-variable]
 2636 |    const GLenum format = nir_intrinsic_format(instr);
      |                 ^~~~~~

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2019-10-08 10:22:56 +02:00
Boris Brezillon 71eda74f7c panfrost: Draw the wallpaper when only depth/stencil bufs are cleared
When only the depth/stencil bufs are cleared, we should make sure the
color content is reloaded into the tile buffers if we want to preserve
their content.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
2019-10-08 10:07:54 +02:00
Boris Brezillon c138ca80d2 panfrost: Make sure a clear does not re-use a pre-existing batch
glClear()s are expected to be the first thing GL apps do before drawing
new things. If there's already an existing batch targetting the same
FBO that has draws attached to it, we should make sure the new clear
gets a new batch assigned to guaranteed that the FB content is actually
cleared with the requested color/depth/stencil values.

We create a panfrost_get_fresh_batch_for_fbo() helper for that and
call it from panfrost_clear().

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
2019-10-08 10:07:54 +02:00
Kenneth Graunke 016c19bc89 iris: Update comment about 3-component formats and buffer textures
You can't render to PIPE_BUFFER so there's no reason to prefer RGBX.
PBO upload would like to use proper RGB textures as source data.
2019-10-07 23:11:45 -07:00
Chris Wilson 64207ebe66 iris: Allow packed RGB pbo uploads
Hitting any fallback path on Broxton as we require clflushing the whole
buffer even for an upload of a subtexture. However, since gallium
provides a pbo upload path, allow it to sample packed RGB if supported.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2019-10-07 23:11:38 -07:00
Tapani Pälli e4a826b2c8 anv/android: fix images created with external format support
This fixes a case where user first creates image and then later binds it
with memory created from AHW buffer.

Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2019-10-08 07:19:05 +03:00
Bas Nieuwenhuizen 72665a0f1f meson: Always add LLVM coroutines module.
It gets used by the gallium auxiliary draw module, which gets used
pretty much always when LLVM is used as JIT.

At the same time most builds don't hit the issue here because the
shared library of LLVM contains all modules.

Fixes: d32690b43c ("gallivm: add coroutine pass manager support")
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/951
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
2019-10-08 03:24:49 +02:00
Timur Kristóf 3a08110d43 amd: Move all amd/common code that depends on LLVM to amd/llvm.
This commit is a step towards the goal of being able to build RADV
without LLVM. In the future we would like to offer the option to
use RADV solely with ACO. There is still a need for the common AMD
code located in amd/common but the LLVM specific parts need to be
separated.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2019-10-08 00:44:08 +00:00
Ilia Mirkin 738bbee603 nvc0: add support for GL_EXT_demote_to_helper_invocation
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2019-10-07 20:42:11 -04:00
Ilia Mirkin 71c34a51c3 gallium/tgsi: add support for DEMOTE and READ_HELPER opcodes
This mirrors the intrinsics in the GLSL IR. One could imagine an
alternate definition where reading the semantic would account for the
READ_HELPER functionality, but that feels potentially dodgy and could be
subject to CSE unpleasantness.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2019-10-07 20:41:59 -04:00
Marek Olšák eec7b0a865 radeonsi: use simple_mtx_t instead of mtx_t
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2019-10-07 20:05:07 -04:00
Marek Olšák 5498a8d23c st/mesa: use simple_mtx_t instead of mtx_t
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2019-10-07 20:05:04 -04:00
Marek Olšák 732ea0b213 gallium: add PIPE_RESOURCE_FLAG_SINGLE_THREAD_USE to skip util_range lock
u_upload_mgr sets it, so that util_range_add can skip the lock.

The time spent in tc_transfer_flush_region decreases from 0.8% to 0.2%
in torcs on radeonsi.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2019-10-07 20:05:00 -04:00
Marek Olšák 59dd4dafb5 util: use simple_mtx_t for util_range
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2019-10-07 20:04:49 -04:00
Marek Olšák 3b2b83924e winsys/radeon: initialize SIMD properties in radeon_info
This was missed when I added them.

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1839
Fixes: 0692ae34e9 ("ac: move ac_get_num_physical_sgprs into radeon_info")

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
2019-10-07 18:44:19 -04:00
Kenneth Graunke 6d9c1f30e4 iris: Drop vtbl usage for some load_register calls
We can just call the actual functions directly.
2019-10-07 14:10:33 -07:00
Jordan Justen ae9c311b9a iris/state: Move reg/mem load/store functions earlier in file
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2019-10-07 14:10:33 -07:00
Eric Engestrom c84bd2b095 meson: drop unused inc_nir
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2019-10-07 21:49:40 +01:00
Eric Engestrom 1234505bd6 meson: drop duplicate inc_nir from spirv2nir
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2019-10-07 21:49:40 +01:00
Eric Engestrom f5808e6088 meson: drop duplicate inc_nir from libglsl
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2019-10-07 21:49:40 +01:00
Eric Engestrom 326be1774c meson: drop duplicate inc_nir from libiris
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2019-10-07 21:49:40 +01:00
Eric Engestrom 7a1dc6ab44 meson: rename libnir to _libnir to make it clear it's not meant to be used anywhere else
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2019-10-07 21:49:40 +01:00
Eric Engestrom 3e95b2773f meson: use idep_nir instead of libnir in pipe-loader
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2019-10-07 21:49:40 +01:00
Eric Engestrom 612e70c594 meson: use idep_nir instead of libnir in haiku softpipe
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2019-10-07 21:49:40 +01:00
Eric Engestrom 1975c5a59d meson: use idep_nir instead of libnir in gallium nine
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2019-10-07 21:49:40 +01:00
Eric Engestrom 140d7e8b3a meson: use idep_nir instead of libnir in libclnir
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2019-10-07 21:49:40 +01:00
Eric Engestrom a0a8b24078 meson: use idep_nir instead of libnir in libnouveau
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2019-10-07 21:49:40 +01:00
Eric Engestrom 731097c747 meson: add missing idep_nir_headers in iris_gen_libs
Fixes: 4929f020c3 ("iris: better SBE")
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2019-10-07 21:49:40 +01:00
Eric Engestrom 721b880e4c script: drop get_reviewer.pl
This script doesn't make sense anymore in the age of GitLab.

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2019-10-07 21:33:38 +01:00
Eric Engestrom b91ae0379b meson/loader: drop unneeded *.h file
Meson automatically tracks any file included by a file it already tracks,
and `pci_id_driver_map.h` & `loader.h` are included by `loader.c`, while
`loader_dri3_helper.h` is included by `loader_dri3_helper.c`.

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2019-10-07 21:30:16 +01:00
Eric Engestrom b9157ea415 loader: use ARRAY_SIZE instead of NULL sentinel
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2019-10-07 21:30:16 +01:00
Eric Engestrom 5be6c8959c loader: s/int/bool/ for predicate result
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2019-10-07 21:30:16 +01:00
Eric Engestrom 26149d119b loader: replace int/1/0 with bool/true/false
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2019-10-07 21:30:16 +01:00
Eric Engestrom 6202a13b71 egl: replace MESA_EGL_NO_X11_HEADERS hack with upstream EGL_NO_X11
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2019-10-07 20:28:59 +00:00