Commit Graph

137751 Commits

Author SHA1 Message Date
Jesse Natalie bd219321a5 microsoft/compiler: Support fp16 i/o vars
Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Reviewed-by: Michael Tang <tangm@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10063>
2021-04-09 01:54:33 +00:00
Jesse Natalie 79bcefa8d9 microsoft/spirv_to_dxil: Lower io arrays
Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Reviewed-by: Michael Tang <tangm@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10063>
2021-04-09 01:54:33 +00:00
Jesse Natalie cac3aedb0f microsoft/spirv_to_dxil: Lower globals to function_temp
Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Reviewed-by: Michael Tang <tangm@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10063>
2021-04-09 01:54:33 +00:00
Mike Blumenkrantz f5ca29b430 zink: fix CI flakiness in glx-multithread-clearbuffer
unsetting zink from GALLIUM_DRIVER is required in order for lavapipe to
work, but setting it back is totally broken in the case where an app
creates a ton of screens simultaneously

instead, just leave it set to llvmpipe, and if a race condition occurs,
at least llvmpipe isn't going to fail a test that zink passes

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10120>
2021-04-08 20:55:20 -04:00
Bas Nieuwenhuizen 8b9033ad0a radv: Support DCC modifiers fully.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9998>
2021-04-08 22:29:12 +00:00
Bas Nieuwenhuizen 6ff88a823b radv: Add retiling for foreign queues.
This way modifier images that don't go through the present layout
get the retile executed properly.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9998>
2021-04-08 22:29:12 +00:00
Bas Nieuwenhuizen dece117fdc radv: Support DCC without DCC/FCE predicates.
Imported images can't have this as part of the associated memory.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9998>
2021-04-08 22:29:12 +00:00
Bas Nieuwenhuizen b61efd53b4 radv: Support DCC without a fast clear value.
For imported images we can't have one in the associated memory.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9998>
2021-04-08 22:29:12 +00:00
Adam Jackson f0861c803e glx: Downgrade sRGB-ful fbconfigs
Again, NVIDIA supports this on every fbconfig, Mesa alternates it on and
off for some reason but only on some drivers, and in particular llvmpipe
doesn't try to create sRGB-ful fbconfigs. Nerf it out of the fbconfig.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1648>
2021-04-08 21:43:04 +00:00
Adam Jackson 6b93746b56 glx: Downgrade tfp mipmap-capable fbconfigs
Again, NVIDIA does this but Mesa doesn't. Just disable it in the
fbconfig so apps can't try to use it.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1648>
2021-04-08 21:43:04 +00:00
Adam Jackson 000035222e glx: Downgrade aux-buffer-ful fbconfigs
Mesa's never supported this, but NVIDIA does, on every fbconfig. Just
disable it if we see it.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1648>
2021-04-08 21:43:04 +00:00
Adam Jackson 8917ca8af5 glx: Don't downgrade the visual caveat from the server
Mesa marks accumful fbconfigs as slow (for no especially good reason,
it's only accum operations that aren't accelerated, and we could fix
that). NVIDIA doesn't. All that mismatching on this attribute can do is
prevent a config from working exactly as well as it possibly can.

Trust the server's opinion here (but warn if you ask for warnings).

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1648>
2021-04-08 21:43:04 +00:00
Adam Jackson 7934b283dd glx: Stop pretending to validate the pbuffer fbconfig attributes
For hardware drivers we've never set this to anything interesting so
there's no benefit to validating it. For drisw we're at the mercy of
whatever the X server sent to us anyway, and it's not like any server is
going to vary two fbconfigs by _just_ these values.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1648>
2021-04-08 21:43:04 +00:00
Adam Jackson 40afef67e2 dri: Don't tie the accum buffer's alpha-ness to the color buffer's
Let's preface this all by noting that the accum buffer is unused even by
legacy feature standards, and that anybody needing it to be performant
is probably not using Mesa to begin with since we've never accelerated
it. This fix is really about making drisw work under hostile GLX
environments, since it doesn't have any control over what's running on
the server side.

NVIDIA's driver simply lists RGBA16 accumulation buffers for every
fbconfig, and the accum buffer's alpha channel is always non-zero even
if the color buffer is RGBX. If we try to point llvmpipe at such a
screen, then _none_ of the depth-24 fbconfigs will find a matching DRI
config, since DRI's accumful config will have 0 accum alpha bits. This
is somewhat limiting since most X applications are expecting an RGBX
config and will be accidentally translucent at depth 32.

Due to the somewhat ugly nature of how xserver constructs fbconfigs, if
you run a driver with this fix against a server from before this fix (or
vice versa), you will find the opposite result: none of your RGBX
fbconfigs will have an accum buffer, though the RGBA ones still will.
That's a pretty acceptable tradeoff to me since what we're gaining is
the ability to use llvmpipe at all.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1648>
2021-04-08 21:43:04 +00:00
Adam Jackson 0a6e726bfb mesa: gl_config::rgbBits should count alphaBits too
This backs {EGL,GLX}_BUFFER_SIZE, which explicitly include alpha.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1648>
2021-04-08 21:43:04 +00:00
Dave Airlie 8343dfe059 lavapipe: add dummy sampler ycbcr conversion
This at least keeps the CTS tests happy.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10098>
2021-04-08 20:13:23 +00:00
Dave Airlie 2a92e9ee3f lavapipe: add vk1.1 image swapchain support
Adding support to create images from memory in the swapchain.
Just missed this in my pass of 1.1 features

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10099>
2021-04-08 20:02:26 +00:00
Mike Blumenkrantz c79c2afd9f gallium/threaded_context: add another rule for buffer mapping
a synchronous driver can use PIPE_MAP_ONCE to infer that a buffer is
guaranteed to not be mapped multiple times, as this is only used when
doing map -> memcpy -> unmap directly

a threaded driver performs maps/unmaps asynchronously, so this flag
can only be used by the driver to confirm that the mapped region is accessed
exactly once, not that it will not need to remain mapped for other transfer_map
uses after it is unmapped

in short, consider this scenario:
  transfer_map(A) -> memcpy(map, data) -> transfer_unmap(map_A) ->
  transfer_map(A) -> memcpy(map, data) -> transfer_unmap(map_A)

when a synchronous driver executes this, the call chain is unmodified

when a tc driver executes this, the call chain may become:
  transfer_map(A) -> memcpy(map, data) ->
  transfer_map(A) -> memcpy(map, data) ->
  transfer_unmap(map_A) -> transfer_unmap(map_A)

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10113>
2021-04-08 19:35:10 +00:00
Christian Gmeiner 663272c4da etnaviv: tell the truth if alpha-test is supported
GPUs with the feature bit PE_NO_ALPHA_TEST set have no fixed-function
alpha test unit and we want to let st lower it with a shader variant.

For GC7000K this fixes all fbo-alphatest-formats piglits like:
 spec@ext_framebuffer_object@fbo-alphatest-formats
 spec@ext_packed_float@fbo-alphatest-formats
 spec@ext_texture_srgb@fbo-alphatest-formats

This only works with the NIR compiler backend.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Tested-by: Lukas F. Hartmann <lukas@mntmn.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9871>
2021-04-08 19:25:26 +00:00
Mike Blumenkrantz d1f96e0c72 features: mark off ARB_fragment_shader_interlock for zink
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10109>
2021-04-08 19:06:04 +00:00
Yiwei Zhang a049cff241 venus: implement vn_debug_init_once with os_get_option
getenv is not working well with Android VM. Instead, use os_get_option
to read Android system property.

e.g. adb shell setprop mesa.vn.debug drm

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10112>
2021-04-08 18:51:24 +00:00
Yiwei Zhang 82bb90e072 venus: bring up Android support
1. implement hwvulkan_device_t
2. mask Android extension support

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10112>
2021-04-08 18:51:24 +00:00
Yiwei Zhang fc3335a472 venus: properly enable WSI for different platforms
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10112>
2021-04-08 18:51:24 +00:00
Andrii Simiklit c6232afde0 nir/spirv: remove unused fields from `vtn_builder`
They were used for tracking whether SSA needed to be repaired,
but now the repair is done for all functions with structured control flow.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7755>
2021-04-08 18:28:08 +00:00
Andrii Simiklit 4220befb38 spirv: repair ssa defs for switchs with only default case
This fixes OpSwitch corner case when switch doesn't have any targets
just a `default` and SSAs defined in it is used after switch block
directly without phis.

v2: Just use `repair_ssa` for all structured control-flow cases
               ( - Jason Ekstrand <jason@jlekstrand.net>
                 - Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> )

Closes: #3787
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7755>
2021-04-08 18:28:08 +00:00
Yevhenii Kharchenko edd12acbec intel/compiler: remove unused member 'input_vue_map'
v2: Instead of fixing unitialized member 'fs_visitor::input_vue_map'
(as reported by Coverity Scan in defect CID 1474559),
remove unused members 'vec4_tcs_visitor::input_vue_map' and
'fs_visitor::input_vue_map'.

Also fixed 'debug_enabled' argument skipped in a fs_visitor constructor
call from brw_compile_tes().

Signed-off-by: Yevhenii Kharchenko <yevhenii.kharchenko@globallogic.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10040>
2021-04-08 18:20:10 +00:00
Samuel Pitoiset 63772f3ca5 radv: add MSAA support to ClearColorImage() on compute queue
Found by inspection.

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/10070>
2021-04-08 17:42:15 +00:00
Chia-I Wu 31a3f2e4f4 venus: initial support for WSI
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>
2021-04-08 17:15:37 +00:00
Chia-I Wu 91f914338d venus: initial support for transform feedback
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>
2021-04-08 17:15:37 +00:00
Chia-I Wu 5dfe49e588 venus: advertise extensions promoted to 1.2
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>
2021-04-08 17:15:37 +00:00
Chia-I Wu 1cb0caf0ae venus: advertise extensions promoted to 1.1
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>
2021-04-08 17:15:37 +00:00
Chia-I Wu 4db8163392 venus: initial support for command buffers
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>
2021-04-08 17:15:37 +00:00
Chia-I Wu 723f0bf74a venus: initial support for module and pipelines
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>
2021-04-08 17:15:37 +00:00
Chia-I Wu 5782506597 venus: initial support for events and queries
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>
2021-04-08 17:15:37 +00:00
Chia-I Wu 8e2844b377 venus: initial support for render pass and fb
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>
2021-04-08 17:15:37 +00:00
Chia-I Wu 99fb8f6c69 venus: initial support for descriptor sets
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>
2021-04-08 17:15:37 +00:00
Chia-I Wu c1cc3e8b7d venus: initial support for buffers/images/samplers
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>
2021-04-08 17:15:37 +00:00
Chia-I Wu 2c78d5ce52 venus: initial support for VkDeviceMemory commands
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>
2021-04-08 17:15:37 +00:00
Chia-I Wu ddd7533055 venus: initial support for queue/fence/semaphore
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>
2021-04-08 17:15:37 +00:00
Chia-I Wu 5d94efd1b2 venus: initial support for VkDevice commands
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>
2021-04-08 17:15:37 +00:00
Chia-I Wu 108f386a61 venus: initial support for VkPhysicalDevice commands
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>
2021-04-08 17:15:37 +00:00
Chia-I Wu 90802b514d venus: initial support for vkCreateInstance
Connect to the renderer.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>
2021-04-08 17:15:37 +00:00
Chia-I Wu 83d7c2bb40 venus: add a ring buffer
vn_ring is a fast way to submit commands, skipping vn_renderer entirely.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>
2021-04-08 17:15:37 +00:00
Chia-I Wu cd576a3742 venus: add a CS encoder/decoder
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>
2021-04-08 17:15:37 +00:00
Chia-I Wu 247232d596 venus: add experimental renderers
There are a virtio-gpu renderer and a vtest renderer.  The vtest
renderer must be enabled with VN_DEBUG=vtest.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>
2021-04-08 17:15:37 +00:00
Chia-I Wu b5653e3414 venus: add generated venus-protocol headers
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>
2021-04-08 17:15:37 +00:00
Chia-I Wu b0736f49d3 venus: add driver skeleton
It only has enough stubs to be loadable by the loader.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>
2021-04-08 17:15:37 +00:00
Chia-I Wu dab339b07e virgl: update headers from virglrenderer
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>
2021-04-08 17:15:37 +00:00
Rhys Perry 5f62083c26 nir/gather_info: fix partial masking of compact I/O with location_frac!=0
nir_lower_clip_cull_distance_arrays() can create compact variables with
location_frac!=0.

Fixes: cc7a187411 ("nir/gather_info: implement partial masking of struct and compact I/O")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4554
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10002>
2021-04-08 16:39:48 +00:00
Mike Blumenkrantz b927de8b7f aux/trace: dump all the blend state members
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10092>
2021-04-08 16:08:32 +00:00