Commit Graph

146590 Commits

Author SHA1 Message Date
Mike Blumenkrantz 2e9e113b7f zink: cache bo SpvId array types
this cuts down on a truckload of useless new validation spam

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13559>
2021-10-28 01:48:17 +00:00
Yiwei Zhang 65abd1d4ae venus: implement vn_buffer_cache_entries_create
1. advertise high hit rate cache combinations, and we should limit the
   caches to those only require device memory pool alloc
2. use size = 1 to ask for buffer memory requirements so that we do a
   sanity check on our assumption of returned size and alignment. For
   implementations don't meet our assumption, continue without cache.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13428>
2021-10-28 00:23:14 +00:00
Yiwei Zhang af505ff3c8 venus: implement vn_buffer_cache_get_memory_requirements
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13428>
2021-10-28 00:23:14 +00:00
Yiwei Zhang a74f2495ca venus: implement vn_buffer_get_max_buffer_size
This change estimates the max_buffer_size with quick sort. Try to
avoid some traffic upon device creation time, but not worth adding a
buffer simple create api to avoid the extra requirement query traffic
since this is temporary.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13428>
2021-10-28 00:23:14 +00:00
Yiwei Zhang 13f2e50aee venus: add buffer cache init and usage flows
1. struct vn_buffer_cache_entry for buffer memory requirements
2. struct vn_buffer_cache for all buffer related cached info
3. implement vn_buffer_cache_init
4. implement vn_buffer_cache_fini
5. empty vn_buffer_get_max_buffer_size
6. empty vn_buffer_cache_entries_create
7. implement vn_buffer_cache_entries_destroy
8. empty vn_buffer_cache_get_memory_requirements

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13428>
2021-10-28 00:23:14 +00:00
Yiwei Zhang fc237f80c6 venus: add struct vn_image_memory_requirements
This aligns with vn_buffer_memory_requirements and can potentially
simplify future image memory requirements cache init.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13428>
2021-10-28 00:23:14 +00:00
Yiwei Zhang b108e096d1 venus: add struct vn_buffer_memory_requirements
This will simplify later buffer cache api.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13428>
2021-10-28 00:23:14 +00:00
Yiwei Zhang 927dea7c34 venus: refactor the ahb buffer mem_type_bits query api
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13428>
2021-10-28 00:23:14 +00:00
Yiwei Zhang 34b7d820e2 venus: refactor to add vn_buffer_init
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13428>
2021-10-28 00:23:14 +00:00
Yiwei Zhang df93a8a6dd venus: refactor to add vn_device_init
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13428>
2021-10-28 00:23:14 +00:00
Yiwei Zhang 2a79dfb724 venus: release queues on device creation failure
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13428>
2021-10-28 00:23:14 +00:00
Mike Blumenkrantz 2de6beaa12 zink: add better handling for CUBE_COMPATIBLE bit
this check was illegal because the usage bits weren't yet populated,
so add another check after usage bits are determined to figure out if
CUBE_COMPATIBLE can be applied

additionally, checking sample counts was never needed since the spec
prohibits CUBE_COMPATIBLE use with multisampling

zink DEBUG: ERR: 'Validation Error: [ VUID-vkGetPhysicalDeviceImageFormatProperties-usage-requiredbitmask ] Object 0: VK_NULL_HANDLE, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x991b3105 | vkGetPhysicalDeviceImageFormatProperties: value of usage must not be 0. The Vulkan spec states: usage must not be 0 (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-vkGetPhysicalDeviceImageFormatProperties-usage-requiredbitmask)'

Fixes: 71494c4874 ("zink: only mark resources as cube-compatible if supported")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12580>
2021-10-28 00:11:24 +00:00
Yiwei Zhang 5a2513a515 venus: assign valid memoryTypeIndex of exportable ahb memory for image
The current AHB spec leaves the input memoryTypeIndex undefined when
allocating exportable AHB memory backing an external image.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13537>
2021-10-28 00:02:54 +00:00
Bas Nieuwenhuizen 2c43fd4c41 amd/rgp: Use VGH clocks for RGP workaround.
Hear that it matters for RGP. This is the most likely scenario where
we would hit this workaround, given the tooling for profiling on the
deck will set profile_peak as workaround for hangs.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13534>
2021-10-27 21:51:59 +00:00
Emma Anholt bfbc41a9fa ci/piglit-runner: Merge piglit-driver-*.txt files into driver-*.txt.
The test names are definitely unique (deqp has specific prefixes, piglit
uses '@' as a separator instead of '.'), so we can just have a single file
regardless of test type.  Merges the two groups of xfails together so you
can't mix up which file to edit (I certainly have), and so that we don't
need to introduce yet another set of files when we add gtest for libva.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13517>
2021-10-27 20:54:11 +00:00
Emma Anholt 38dff02bfb ci/deqp-runner: Rename the deqp-drivername-*.txt files to drivername-*.txt
We have two testsuites with the same format for fails/flakes/skips files,
and test names that are definitely unique.  As I'm about to add a third
testsuite (gtest for libva-utils), so let's have just one file each for
fails/flakes/skips instead of one per type of testsuite.  This starts the
move with just the bulk rename of deqp.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13517>
2021-10-27 20:54:11 +00:00
Paulo Zanoni 3c49916d51 iris: destroy our mutexes a little later
While there seems to be no bug with the state things are today, I was
recently doing some debugging and put an iris_bo_wait() before a
bo_close() in iris_bufmgr_destroy(), which caused an issue since the
bo_deps_lock mutex had already been destroyed.

Since there are quite a few things we do with the bufmgr after
destroying the mutexes, I figured we should probably postpone mutex
destruction in order to be a little safer against future code
modifications like the one I just did.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13494>
2021-10-27 20:08:51 +00:00
Eric Engestrom e68616e5e6 docs: update calendar for 21.3.0-rc3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13557>
2021-10-27 20:45:46 +01:00
Yiwei Zhang 9fa702f28c venus: refactor private descriptor_set helpers to be private
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13522>
2021-10-27 18:33:11 +00:00
Sagar Ghuge 565d65baaf anv: Enable CCS for storage image formats
v2: (Jason Ekstrand)
- Restructure if condition.
- Add early return.

v3: (Felix)
- Don't set aux_supported to false for storage image on XeHPG.

v4: (Nanley)
- Check image view format against fmt_list.
- Add helper anv_get_isl_format_with_usage.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3606>
2021-10-27 10:59:56 -07:00
Sagar Ghuge 64ea7e5e33 anv: Pass correct aux usage while filling out surface state
While filling out surface state, pass correct aux usage for storage
images as we support compression on XeHPG.

v2: (Jason Ekstrand)
- Move assertion down a bit
- Use general layout aux usage

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3606>
2021-10-27 10:59:56 -07:00
Mike Blumenkrantz f79a25653b zink: move all shader bo/sharedmem access to compiler passes
this moves more code to nir passes, which makes it easier to debug
and also allows deleting some much-more-difficult-to-read ntv code

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13484>
2021-10-27 17:13:26 +00:00
Mike Blumenkrantz c18413b877 zink: add more glsl base types to get_glsl_basetype()
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13484>
2021-10-27 17:13:26 +00:00
Mike Blumenkrantz 6be3c0f82d zink: move all 64-32bit shader store rewriting to nir pass
this also enables natural 64bit stores on drivers that support it

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13484>
2021-10-27 17:13:26 +00:00
Mike Blumenkrantz 8a98e6fb97 zink: move shared intrinsic offset adjustments to compiler passes
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13484>
2021-10-27 17:13:26 +00:00
Mike Blumenkrantz 6d31f4b7b0 zink: move ssbo store offset adjustment to compiler passes
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13484>
2021-10-27 17:13:26 +00:00
Mike Blumenkrantz 150d6ee97e zink: move all 64-32bit shader load rewriting to nir pass
this also enables natural 64bit loads on drivers that support it

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13484>
2021-10-27 17:13:26 +00:00
Mike Blumenkrantz 3a1ecd1e8c zink: run lower_io_to_scalar before rewriting bo access
this is happening in ntv anyway, so move it to the compiler here

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13484>
2021-10-27 17:13:26 +00:00
Mike Blumenkrantz ee22cd619f zink: move bo load offset adjustment to compiler passes
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13484>
2021-10-27 17:13:26 +00:00
Mike Blumenkrantz 14f7eb9d4c zink: run optimize_nir() only once during compile
running all the optimizer passes repeatedly is stupid

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13484>
2021-10-27 17:13:26 +00:00
Mike Blumenkrantz 16f838576c nir/lower_io_to_scalar: add support for bo and shared io
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13485>
2021-10-27 16:46:01 +00:00
Emma Anholt 60cb471805 ci/radeonsi: Use a deqp-runner suite suite for stoney.
This should make it easier to tune the runtime, and enable KHR-GL* tests
in the future.  (Not done currently because something in KHR-GL* causes
oomkiller).

This drops the redundant FDO_CI_CONCURRENT settings, since the default on
these boards is 4 anyway.

Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13504>
2021-10-27 09:19:34 -07:00
Thomas Wagner 4856586ac6 util: use anonymous file for memory fd creation
The original implementation in os_memory_fd.c always uses memfds.
Replace this by using the already existing os_create_anonymous_file in
order to support older systems or systems without memfd.

Fixes: 1166ee9caf ("gallium: add utility and interface for memory fd allocations")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13331>
2021-10-27 15:26:52 +00:00
Rhys Perry 49d290bcf7 radv: don't use a separate cache entry for GS copy shaders
This seems simpler and probably faster.

This also fixes a warning for these CTS tests:
dEQP-VK.pipeline.creation_feedback.graphics_tests.vertex_stage_geometry_stage_delayed_destroy_fragment_stage_delayed_destroy
dEQP-VK.pipeline.creation_feedback.graphics_tests.vertex_stage_geometry_stage_fragment_stage
because we no longer set found_in_application_cache=false for pipelines
with NGG GS.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13528>
2021-10-27 13:34:56 +00:00
Samuel Pitoiset 704340f0f6 radv: fix invalid wait_dst_stage_mask type
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/13354>
2021-10-27 07:24:35 +00:00
Jason Ekstrand 0bbb32ece4 glsl/nir/linker: Also remove image variables
If we don't, then the array shrinker may shrink them to an array of zero
images which can cause GLSL serialization to blow up but only the next
time the GLSL shader is loaded from the disk cache.

Fixes: b8ee37472d ("glsl: Use nir_var_mem_image for images")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5520
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13412>
2021-10-27 01:45:13 -05:00
Iago Toral Quiroga 0a277fabce broadcom/compiler: fix condition encoding bug
When both AC and MC are set, AC is encoded in bits 0..1 not 0..3.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13527>
2021-10-27 06:03:12 +00:00
Iago Toral Quiroga 3fbd6662b7 broadcom/compiler: rework simultaneous peripheral access checks
This was not quite correct in that our checks for the allowed cases
were not checking that there were no other peripheral access other
than the ones allowed.

For example, we allowed  wrtmuc signal and TMU write other than
TMUC, and we also allowed TMU read and VPM read/write. But we
cannot allow wrtmuc with TMU write other than TMUC and at the
same time a VPM write for example, so we can't just check if we
have a combination of allowed peripherals, we still need to check
that those are the only ones in use by the combined instructions.

Another example is that even if we allow a TMU write (other than TMUC)
with a wrtmuc signal, the resulting instruction must still have just
one TMU write other than TMUC, but we were allowing the merge if one
instruction signaled wrtmuc and the other wrote to tmu other than tmuc
without testing if the combined result would have 2 tmu writes.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13527>
2021-10-27 06:03:12 +00:00
Manuel Stoeckl 2c61d89d36 gbm: add GBM_FORMAT_GR1616 and RG1616
Only GR1616 has a corresponding DRI format.

Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13501>
2021-10-27 02:53:05 +00:00
Manuel Stoeckl 759eaf517a gbm: add missing R16 case in gbm_bo_get_bpp
Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13523>
2021-10-27 02:28:34 +00:00
Bas Nieuwenhuizen 1fe375e7cf radv: Add bufferDeviceAddressMultiDevice support.
We don't support multiple devices so this is a nop. However, Baldurs Gate 3 enables
this and with the new more complete checks this causes device creation to fail.

Fixes: 2e5718c957 ("vulkan: provide common functions to check device features")
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5509
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13482>
2021-10-27 01:47:58 +00:00
Marek Olšák e1619b268a glthread: add a trivial thread-safe way to skip display list execution
There are apps that never put state changes into display lists.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13403>
2021-10-27 01:24:03 +00:00
Marek Olšák c14d755f3d glthread: add an option to make glCheckFramebufferStatus a no-op
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13403>
2021-10-27 01:24:03 +00:00
Marek Olšák f4348ef60d glthread: don't sync for glIsEnabled with a few enums
viewperf benefits

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13403>
2021-10-27 01:24:03 +00:00
Marek Olšák 6b370cbe28 glthread: don't execute display lists if they have no effect
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13403>
2021-10-27 01:24:03 +00:00
Mike Blumenkrantz b0c40bc905 nir/lower_samplers_as_deref: rewrite more image intrinsics
"I think we want to lower them."

-Jason "And I do know how the pass works" Ekstrand

fixes #5540

cc: mesa-stable

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13489>
2021-10-27 00:02:22 +00:00
Mike Blumenkrantz c9ce151ff9 zink: more accurately update samplemask for fs shader keys
the fs samplemask needs to be updated on framebuffer rebind and on
fs bind to ensure that the key gets updated in time for the pipeline
change

fixes #5559

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13531>
2021-10-26 23:48:11 +00:00
Mike Blumenkrantz 8899f6a198 zink: fix gl_SampleMaskIn spirv generation
the uint[1] -> uint dance is only relevant on the first load, so move
the variable type shuffling inside the create block to avoid breaking successive
loads

fixes #5543

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13488>
2021-10-26 23:34:23 +00:00
Dave Airlie f42a4f6451 radv: fence->user_ptr and ctx->fence_map are now totally unused.
Garbage collect them.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13525>
2021-10-26 22:22:22 +00:00
Alyssa Rosenzweig 861a35b3bc mesa: Require MRT support for GL3/ES3
OpenGL 3.0 requires the driver can draw to 8 simultaneous render
targets. Similarly, OpenGL ES 3.0 requires the driver can draw to 4
simultaneous render targets. Fix the version computation logic to take
this into account.

On Mali T720, we support ~all features of OpenGL ES 3.1 except we only
support a single render target. Mali T720 should advertise OpenGL 2.1
and OpenGL ES 2.0 only. With the previous logic, it incorrectly
advertised OpenGL ES 3.1.

v2: Lie about the minimum for GL 3.0 to make freedreno a3xx happy. Add
Emma's reviewed-by.

v3: Update the Mali T720 CI expectations. There are tests that pass on
GLES3 but not GLES2. Unclear if these are dEQP bugs or Mesa bugs, lima
hits the same issues. Add them to the known fails

Note to mesa-stable maintainers: this downgrades the OpenGL version
advertised on Mali T720. As such, this patch should apply to the
unreleased 21.3 (Eric) but should NOT be backported to any released Mesa
versions (21.2 or older should NOT have this patch). This is a bit of a
compromise; Emma agreed with this plan on IRC.

Reported-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net> [v2]
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> [v2]
Cc: 21.3 mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13455>
2021-10-26 21:53:43 +00:00