Mike Blumenkrantz [Sun, 9 Aug 2020 13:30:29 +0000 (09:30 -0400)]
zink: implement get_ssbo_size nir intrinsic
this is a little hacky since we're still using unpacked layout for everything,
requiring that we "adjust" the value we pass back to the user for std430 to
be the expected value as though we were using packed layout
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8628>
Mike Blumenkrantz [Fri, 7 Aug 2020 23:17:34 +0000 (19:17 -0400)]
zink: support nir_intrinsic_store_ssbo
this is gross, but it works
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8628>
Mike Blumenkrantz [Fri, 7 Aug 2020 23:16:01 +0000 (19:16 -0400)]
zink: rework ssbo indexing and binding
this is actually crazy, but there's no other way to do it from the variable.
ideally, nir would have a separate type for atomic counters to simplify this
and then also stop mangling binding/block index during lower_buffers
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8628>
Mike Blumenkrantz [Fri, 7 Aug 2020 23:14:01 +0000 (19:14 -0400)]
zink: handle more ssbo ops in ntv
this is easiest with a macro since it's already implemented for images
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8628>
Mike Blumenkrantz [Fri, 7 Aug 2020 23:12:20 +0000 (19:12 -0400)]
zink: handle null ssbo attachments without crashing
basically the same as any other null buffer descriptor attachment
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8628>
Mike Blumenkrantz [Tue, 12 Jan 2021 23:40:23 +0000 (18:40 -0500)]
zink: flag ssbo buffer resources as having pending writes per stage
I meant to squash this down but didn't get around to it
Fixes:
e79d905f5a0 ("zink: flag ssbo buffer resources as having pending writes on batch")
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8628>
Mike Blumenkrantz [Fri, 7 Aug 2020 18:57:39 +0000 (14:57 -0400)]
zink: add spirv builder function for OpAtomicStore
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8628>
cheyang [Tue, 15 Dec 2020 08:18:13 +0000 (16:18 +0800)]
glsl: redeclare built-in variable with separate shader
according to :
https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_separate_shader_objects.gles.txt
properly handle the declaration of these interface block varibales
Signed-off-by: cheyang <cheyang@bytedance.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8101>
Kenneth Graunke [Thu, 28 Jan 2021 07:27:02 +0000 (23:27 -0800)]
iris: Properly handle new unbind_num_trailing_slots parameters
Commits
0278d1fa323cf1f289..
b688ea31fcf7e20436 added a new parameter
to set_vertex_buffers(), set_shader_images(), and set_sampler_views()
which specifies a number of trailing slots to unbind. They updated
the iris functions to do the unbinding, but didn't update the code
to mark which things are bound in the bitfields. This meant that
later code would assume those unbound slots were bound, and crash
on a NULL dereference. All that's needed is to add that slot count
when unbinding things in the bitfield.
Fixes:
0278d1fa323 ("gallium: add unbind_num_trailing_slots to set_vertex_buffers")
Fixes:
72ff66c3d73 ("gallium: add unbind_num_trailing_slots to set_shader_images")
Fixes:
b688ea31fcf ("gallium: add unbind_num_trailing_slots to set_sampler_views")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8758>
Ian Romanick [Wed, 27 Jan 2021 20:01:26 +0000 (12:01 -0800)]
i965: Don't parse driconf again
It was already parsed in intelInitScree2, and the results are stored in
the screen.
Fixes:
d67ef485804 ("i965/screen: Allow drirc to set 'allow_rgb10_configs' again.")
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7387>
Ian Romanick [Fri, 30 Oct 2020 19:28:22 +0000 (12:28 -0700)]
i965: Use allow_higher_compat_version option during screen initialization
Currently, `allow_higher_compat_version` is only used during context
creation. Doing that means an application that doesn't request a
specific version can be given a version higher than 3.0.
However, an application still cannot request a higher version via
glXCreateContextAttribsARB. The GLX and DRI layers will only see that
version 3.0 is supported, so context creation will fail before the drive
is called. For this to work, max_gl_compat_version must be set to a
higher version.
This enables running many piglit tests on i965 with
allow_higher_compat_version.
v2: Fix a typo in a comment. Noticed by Tim. Fix a typo in the commit
message. Noticed by the spell checker. :)
v3: Don't parse driconf again. Suggested by Tim.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7387>
Ian Romanick [Wed, 27 Jan 2021 19:55:01 +0000 (11:55 -0800)]
i965: Don't advertise OpenGL 3.3+ if driconf disables GL_ARB_blend_func_extended
This prevents the assertion added in "i965: Use
allow_higher_compat_version option during screen initialization" from
failing when disable_blend_func_extended=true.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7387>
Simon Zeni [Thu, 21 Jan 2021 04:19:37 +0000 (23:19 -0500)]
egl/dri2: enable EGL_WL_bind_wayland_display in EGL device platform
EGL_WL_bind_wayland_display was previously supported on all platforms,
except the EGL device platform.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Simon Zeni <simon@bl4ckb0ne.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8638>
Marek Olšák [Tue, 26 Jan 2021 20:26:18 +0000 (15:26 -0500)]
radeonsi: fix centroid with VRS coarse shading
This has no effect on other shading. It should have been the default value.
Fixes:
c3432ad8524 - radeonsi: add an option to enable 2x2 coarse shading for non-GUI elements
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8726>
Marek Olšák [Tue, 26 Jan 2021 05:35:10 +0000 (00:35 -0500)]
gallium/u_vbuf: skip draws with 0 vertices
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8298>
Marek Olšák [Sat, 2 Jan 2021 22:53:13 +0000 (17:53 -0500)]
st/mesa: set take_index_buffer_ownership to skip an atomic in u_threaded
This reduces overhead by skipping the atomic, which is slow on AMD Zen.
It uses the same mechanism as vertex buffers.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8298>
Marek Olšák [Sat, 2 Jan 2021 22:52:04 +0000 (17:52 -0500)]
gallium,u_threaded: add pipe_draw_info::take_index_buffer_ownership
to skip atomics in u_threaded_context. This will decrease CPU overhead.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8298>
Marek Olšák [Sat, 2 Jan 2021 21:35:15 +0000 (16:35 -0500)]
gallium/util: optimize pipe_vertex_buffer_reference binding the same buffer
This eliminates atomic ops when the buffer doesn't change.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8298>
Marek Olšák [Sat, 12 Dec 2020 22:10:00 +0000 (17:10 -0500)]
gallium/u_threaded: unify user and non-user codepaths in set_constant_buffer
We can do this cleanup thanks to take_ownership.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8298>
Marek Olšák [Sat, 12 Dec 2020 21:02:49 +0000 (16:02 -0500)]
gallium/u_threaded: add a null constant buffer codepath
This consumes less space in the batch buffer.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8298>
Marek Olšák [Sat, 26 Dec 2020 15:09:48 +0000 (10:09 -0500)]
gallium/u_upload_mgr: eliminate all atomics for the upload buffer
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8298>
Marek Olšák [Sat, 2 Jan 2021 23:06:53 +0000 (18:06 -0500)]
st/mesa: skip atomics when binding UBOs
This uses the same mechanism as vertex buffers.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8298>
Marek Olšák [Sat, 2 Jan 2021 21:40:11 +0000 (16:40 -0500)]
st/mesa: eliminate all atomic ops when setting vertex buffers
This implements the same optimization as u_upload_mgr.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8298>
Marek Olšák [Sat, 2 Jan 2021 21:32:42 +0000 (16:32 -0500)]
cso_context,u_vbuf: add take_ownership param into set_vertex_buffers
st/mesa will use this to skip atomic ops for reference counting.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8298>
Marek Olšák [Sat, 26 Dec 2020 22:29:45 +0000 (17:29 -0500)]
gallium: add take_ownership param into set_vertex_buffers to eliminate atomics
There are a few places (mainly u_threaded_context) that do:
set_vertex_buffers(...);
for (i = 0; i < count; i++)
pipe_resource_reference(&buffers[i].resource.buffer, NULL);
set_vertex_buffers increments the reference counts while the loop
decrements them.
This commit eliminates those reference count changes by adding a parameter
into set_vertex_buffers that tells the callee to accept all buffers
without incrementing the reference counts.
AMD Zen benefits from this because it has slow atomics if they come from
different CCXs.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8298>
Marek Olšák [Mon, 21 Dec 2020 08:01:34 +0000 (03:01 -0500)]
gallium: add unbind_num_trailing_slots to set_sampler_views
Instead of calling this functions again to unbind trailing slots,
extend it to do it when binding. This reduces CPU overhead.
A lot of drivers ignore "start" and always unbind all slots after "count".
Such drivers don't need any changes here.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8298>
Marek Olšák [Mon, 21 Dec 2020 08:01:34 +0000 (03:01 -0500)]
gallium: add unbind_num_trailing_slots to set_shader_images
Instead of calling this function again to unbind trailing slots,
extend it to do it when images are being set. This reduces CPU overhead.
Only st/mesa benefits.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8298>
Marek Olšák [Mon, 21 Dec 2020 08:01:34 +0000 (03:01 -0500)]
gallium: add unbind_num_trailing_slots to set_vertex_buffers
Instead of calling this functions again to unbind trailing slots,
extend it to do it as part of the call that sets vertex buffers.
This reduces CPU overhead. Only st/mesa benefits from this.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8298>
Marek Olšák [Sat, 26 Dec 2020 17:01:10 +0000 (12:01 -0500)]
gallium: add take_ownership param into set_constant_buffer to eliminate atomics
We often do this:
pipe->set_constant_buffer(pipe, shader, slot, &cb);
pipe_resource_reference(&cb->buffer, NULL);
That results in atomic increment in set_constant_buffer followed by
atomic decrement after set_constant_buffer. This new interface
eliminates those atomics.
For the case above, this should be used instead:
pipe->set_constant_buffer(pipe, shader, slot, true, &cb);
cb->buffer = NULL; // if cb is not a local variable, else do nothing
AMD Zen benefits from this. The perf improvement is ~3% for Viewperf13/Catia.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8298>
Marek Olšák [Mon, 21 Dec 2020 06:27:44 +0000 (01:27 -0500)]
Revert "gallium/u_upload_mgr: allow use of FLUSH_EXPLICIT with persistent mappings"
It's no longer needed after radeonsi had its SDMA uploads removed.
This reverts commit
54f7545cd7925db9ff78b9dccbff7406dd2ad4a4.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8298>
Dave Airlie [Wed, 23 Dec 2020 23:51:23 +0000 (09:51 +1000)]
lavapipe: handle shader draw parameters
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8219>
Dave Airlie [Wed, 23 Dec 2020 23:50:45 +0000 (09:50 +1000)]
llvmpipe: handle firstvertex for vulkan draw parameters
Vulkan defines this a bit differently, so add support for
load_first_vertex.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8219>
Eleni Maria Stea [Thu, 14 Mar 2019 19:52:07 +0000 (21:52 +0200)]
anv: Enabled the VK_EXT_sample_locations extension
Enabled the VK_EXT_sample_locations for Intel Gen >= 7.
v2: Replaced device.info->gen >= 7 with True, as Anv doesn't support
anything below Gen7. (Lionel Landwerlin)
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1887>
Eleni Maria Stea [Thu, 14 Mar 2019 19:52:06 +0000 (21:52 +0200)]
anv: Removed unused header file
In src/intel/vulkan/genX_blorp_exec.c we included the file:
common/gen_sample_positions.h but not use it. Removed.
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1887>
Eleni Maria Stea [Thu, 14 Mar 2019 19:52:02 +0000 (21:52 +0200)]
anv: Add support for sample locations
Allowing the user to set custom sample locations, by filling the
extension structs and chaining them to the pipeline structs according
to the Vulkan specification section [26.5. Custom Sample Locations]
for the following structures:
'VkPipelineSampleLocationsStateCreateInfoEXT'
'VkSampleLocationsInfoEXT'
'VkSampleLocationEXT'
Once custom locations are used, the default locations are lost and need
to be re-emitted again in the next pipeline creation. For that, we emit
the 3DSTATE_SAMPLE_PATTERN at every pipeline creation.
v2: In v1, we used the custom anv_sample struct to store the location
and the distance from the pixel center because we would then use
this distance to sort the locations and send them in increasing
monotonical order to the GPU. That was because the Skylake PRM Vol.
2a "3DSTATE_SAMPLE_PATTERN" says that the samples must have
monotonically increasing distance from the pixel center to get the
correct centroid computation in the device. However, the Vulkan
spec seems to require that the samples occur in the order provided
through the API and this requirement is only for the standard
locations. As long as this only affects centroid calculations as
the docs say, we should be ok because OpenGL and Vulkan only
require that the centroid be some lit sample and that it's the same
for all samples in a pixel; they have no requirement that it be the
one closest to center. (Jason Ekstrand)
For that we made the following changes:
1- We removed the custom structs and functions from anv_private.h
and anv_sample_locations.h and anv_sample_locations.c (the last
two files were removed). (Jason Ekstrand)
2- We modified the macros used to take also the array as parameter
and we renamed them to start by GEN_. (Jason Ekstrand)
3- We don't sort the samples anymore. (Jason Ekstrand)
v3 (Jason Ekstrand):
Break the refactoring out into multiple commits
v4: Merge dynamic/non-dynamic changes into a single commit (Lionel)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1887>
Lionel Landwerlin [Thu, 5 Nov 2020 07:58:21 +0000 (09:58 +0200)]
intel/common: store sample position in plain arrays
Allows to extract the values in different ways than just the genxml
format.
v2 (Jason Ekstrand):
- Add a struct gen_sample_location so that we can re-use the array
macros from the earlier commit.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1887>
Eleni Maria Stea [Thu, 14 Mar 2019 23:20:12 +0000 (18:20 -0500)]
anv/state: Take explicit sample locations in emit helpers
This commit adds a "locations" parameter to emit_multisample and
emit_sample_pattern which, if provided, will override the default
sample locations.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1887>
Jason Ekstrand [Thu, 14 Mar 2019 23:02:49 +0000 (18:02 -0500)]
anv: Break SAMPLE_PATTERN and MULTISAMPLE emit into helpers
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1887>
Eleni Maria Stea [Thu, 14 Mar 2019 19:52:00 +0000 (21:52 +0200)]
anv: Implement physical device properties for VK_EXT_sample_locations
The VkPhysicalDeviceSampleLocationPropertiesEXT struct is filled with
implementation dependent values and according to the table from the
Vulkan Specification section [36.1. Limit Requirements]:
pname | max | min
pname:sampleLocationSampleCounts |- |ename:VK_SAMPLE_COUNT_4_BIT
pname:maxSampleLocationGridSize |- |(1, 1)
pname:sampleLocationCoordinateRange|(0.0, 0.9375)|(0.0, 0.9375)
pname:sampleLocationSubPixelBits |- |4
pname:variableSampleLocations | true |implementation dependent
The hardware only supports setting the same sample location for all the
pixels, so we only support 1x1 grids.
Also, variableSampleLocations is set to true because we can set sample
locations per draw.
Implement the vkGetPhysicalDeviceMultisamplePropertiesEXT according to
the Vulkan Specification section [36.2. Additional Multisampling
Capabilities].
v2: 1- Replaced false with VK_FALSE for consistency. (Sagar Ghuge)
2- Used the isl_device_sample_count to take the number of samples
per platform to avoid extra checks. (Sagar Ghuge)
v3: 1- Replaced VK_FALSE with false as Jason has sent a patch to replace
VK_FALSE with false in other places. (Jason Ekstrand)
2- Removed unecessary defines and set the grid size to 1 (Jason Ekstrand)
v4: Fix properties reporting in GetPhysicalDeviceProperties2, not
GetPhysicalDeviceFeatures2 (Lionel)
Use same alignment as other functions (Lionel)
Report variableSampleLocations=true (Lionel)
v5: Don't overwrite the pNext in GetPhysicalDeviceMultisamplerPropertiesEXT
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com> (v3)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1887>
Eleni Maria Stea [Thu, 14 Mar 2019 19:51:59 +0000 (21:51 +0200)]
anv: Added the VK_EXT_sample_locations extension to the anv_extensions list
Added the VK_EXT_sample_locations to the anv_extensions.py list to
generate the related entrypoints.
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1887>
Eric Anholt [Wed, 27 Jan 2021 20:24:08 +0000 (12:24 -0800)]
ci/freedreno: Make a630 piglit_shader run a manual run, too.
We haven't been able to stabilize the remaining flakes (scattered through
a bunch of innocuous-looking tests), so disable it until we can fix it or
replace the piglit runner with one that can handle flakes.
Closes: #4170
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8747>
Caio Marcelo de Oliveira Filho [Fri, 5 Jun 2020 17:23:35 +0000 (10:23 -0700)]
anv: Implement VK_KHR_workgroup_memory_explicit_layout
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8699>
Caio Marcelo de Oliveira Filho [Wed, 28 Oct 2020 21:55:05 +0000 (14:55 -0700)]
spirv: Implement SPV_KHR_workgroup_memory_explicit_layout
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8699>
Caio Marcelo de Oliveira Filho [Wed, 8 Jul 2020 00:38:03 +0000 (17:38 -0700)]
nir: Two shared memory *blocks* may alias each other
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8699>
Caio Marcelo de Oliveira Filho [Fri, 5 Jun 2020 20:35:29 +0000 (13:35 -0700)]
spirv: Update headers and metadata from latest Khronos commit
This corresponds to
faa570afbc91ac73d594d787486bcf8f2df1ace0
("Merge pull request #192 from cmarcelo/SPV_KHR_workgroup_memory_explicit_layout") in
https://github.com/KhronosGroup/SPIRV-Headers.
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8699>
Caio Marcelo de Oliveira Filho [Fri, 5 Jun 2020 17:15:50 +0000 (10:15 -0700)]
vulkan: Update XML and headers to 1.2.168
This brings in the following extensions:
- VK_KHR_workgroup_memory_explicit_layout
- VK_KHR_zero_initialize_workgroup_memory
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8699>
Eric Anholt [Wed, 27 Jan 2021 17:51:46 +0000 (09:51 -0800)]
ci/freedreno: Ban more flaky clip-enables tests.
Same cause as vs-clip-vertex-enable, presumably.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8744>
Adam Jackson [Tue, 26 Jan 2021 16:14:18 +0000 (11:14 -0500)]
egl: Fix error string returned by eglQueryDeviceAttribEXT
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8725>
Dave Airlie [Tue, 22 Dec 2020 05:07:08 +0000 (15:07 +1000)]
lavapipe: add support for external memory/fd/sempahore extensions
These are just dummy versions of these but enough to pass CTS
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8218>
Marek Olšák [Tue, 12 Jan 2021 08:23:23 +0000 (03:23 -0500)]
st/mesa: don't enable smoothing if multisampling is enabled
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8684>
Kenneth Graunke [Tue, 26 Jan 2021 08:47:08 +0000 (00:47 -0800)]
iris: Move the URB size checks into iris_update_compiled_xs
Instead of looping over all stages and re-accessing prog_data at the
end, we can just move the URB size check into iris_update_compiled_xs,
in the new != old block, where we know the shader changed - plus where
we're disabling tessellation. We already have the prog_data handy in
these cases, with a bit less pointer chasing.
Improves performance in Piglit's drawoverhead microbenchmark
(#63: DrawArrays, no state change) by 4.07856% +/- 0.540517% (n=850).
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8721>
Kenneth Graunke [Tue, 26 Jan 2021 06:25:51 +0000 (22:25 -0800)]
iris: Reconfigure the URB only if it's necessary or possibly useful
Reconfiguring the URB partitioning is likely to cause shader stalls,
as the dividing line between each stage's section of memory is moving.
(Technically, 3DSTATE_URB_* are pipelined commands, but that mostly
means that the command streamer doesn't need to stall.) So it should
be beneficial to update the URB configuration less often.
If the previous URB configuration already has enough space for our
current shader's needs, we can just continue using it, assuming we
are able to allocate the maximum number of URB entries per stage.
However, if we ran out of URB space and had to limit the number of
URB entrties for a stage, and the per-entry size is larger than we
need, we should reconfigure it to try and improve concurrency.
So, we begin tracking the last URB configuration in the context,
and compare against that when updating shader variants.
Cuts 36% of the URB reconfigurations (excluding BLORP) from a
Shadow of Mordor trace, and 46% from a GFXBench Manhattan 3.0 trace.
One nice thing is that this removes the need to look at the old
prog_data when updating shaders, which should make it possible to
unbind shader variants without causing spurious URB updates.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8721>
Kenneth Graunke [Tue, 26 Jan 2021 05:41:48 +0000 (21:41 -0800)]
intel: Produce a "constrained" output from gen_get_urb_config()
When calculating a URB configuration, we start with a notion of how
much space each stage /wants/ (to achieve the maximum amount of
concurrency), but sometimes fall back to giving it less than that,
because we don't have enough space. (Typically, this happens when
the per-stage size is large, or there are many stages, or both.)
We now output a "constrained" boolean which is true if we weren't
able to satisfy all the "wants" due to a lack of space.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8721>
Mike Blumenkrantz [Wed, 27 Jan 2021 14:58:13 +0000 (09:58 -0500)]
zink: don't export PIPE_CAP_MAX_COMBINED_SHADER_BUFFERS value
gallium automatically sums up the per-stage buffers if this isn't set,
and some drivers (e.g., amdvlk) export UINT_MAX here which breaks the universe
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8742>
Rhys Perry [Mon, 7 Dec 2020 15:05:40 +0000 (15:05 +0000)]
aco: implement non-uniform get_ssbo_size
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3711
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7969>
Rhys Perry [Mon, 12 Oct 2020 14:07:39 +0000 (15:07 +0100)]
radv,ac/nir: implement non-uniform get_ssbo_size
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3711
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7969>
Rhys Perry [Mon, 12 Oct 2020 14:03:28 +0000 (15:03 +0100)]
nir,spirv: allow non-uniform OpArrayLength
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7969>
Italo Nicola [Thu, 21 Jan 2021 23:25:05 +0000 (23:25 +0000)]
panfrost: advertise images for midgard
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-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/8066>
Italo Nicola [Wed, 16 Dec 2020 03:52:15 +0000 (03:52 +0000)]
pan/mdg: implement nir_intrinsic_image_size
To implement it in midgard, we just need to read the image_size sysval.
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-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/8066>
Italo Nicola [Fri, 11 Dec 2020 23:35:21 +0000 (23:35 +0000)]
pan/mdg: implement shader image instructions
Implements load store opreations as midgard_op_ld_image_* and
midgard_op_st_image_*.
Implements midgard_op_lea_tex, which takes an image coordinate and
returns it's memory address.
Image atomics are implemented as a combination of midgard_op_lea_tex and
the usual midgard atomic opcodes.
Currently we don't support multisampled shader images.
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-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/8066>
Italo Nicola [Fri, 25 Sep 2020 21:35:38 +0000 (21:35 +0000)]
pan/mdg: rename st_image opcodes and add float16 versions
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-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/8066>
Italo Nicola [Fri, 25 Sep 2020 21:10:54 +0000 (21:10 +0000)]
pan/mdg: add ld_image opcodes
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-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/8066>
Italo Nicola [Fri, 11 Dec 2020 23:36:45 +0000 (23:36 +0000)]
pan/mdg: enable image bitsize lowering pass
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-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/8066>
Italo Nicola [Fri, 11 Dec 2020 07:35:10 +0000 (07:35 +0000)]
pan/mdg: create nir pass to lower image coord bitsize
Image coordinates are 16-bit long in midgard, so we must lower them
before emitting image opcodes.
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-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/8066>
Italo Nicola [Wed, 16 Dec 2020 20:13:36 +0000 (20:13 +0000)]
panfrost: implement image_size sysval
Since there's no hardware support for it, we use a sysval to implement
nir_intrinsic_image_size.
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-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/8066>
Italo Nicola [Fri, 11 Dec 2020 20:55:14 +0000 (20:55 +0000)]
panfrost: emit shader image attribute descriptors
Each shader image attribute buffer descriptor needs a continuation,
meaning that each image attribute buffer is double the size of a common
attribute buffer.
For compute and fragment shaders, we allocate a single buffer with
enough space for all the attribute descriptors and attribute buffer
descriptors.
For vertex shaders, we do it separately to acomodate for the way
descriptors are currently allocated there.
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-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/8066>
Italo Nicola [Fri, 11 Dec 2020 16:47:35 +0000 (16:47 +0000)]
panfrost: implement gallium->set_shader_images
Implements gallium images endpoint.
If an AFBC resource is bound to an image, we convert it to tiled, since
images need pixel-level granularity and AFBC doesn't allow for that.
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-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/8066>
Italo Nicola [Wed, 16 Dec 2020 14:15:28 +0000 (14:15 +0000)]
panfrost: add resource modifier conversion
Adds a helper function to convert a resource to a chosen modifier.
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-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/8066>
Italo Nicola [Fri, 11 Dec 2020 07:58:41 +0000 (07:58 +0000)]
panfrost: decode 3d attribute continuation
Adds 3D attribute buffer continuations to pandecode and a message to
keep track of which buffer continuations we aren't decoding yet.
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-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/8066>
Italo Nicola [Thu, 22 Oct 2020 16:59:50 +0000 (16:59 +0000)]
panfrost: add 3d attribute buffer continuation to XML
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-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/8066>
Italo Nicola [Fri, 11 Dec 2020 07:57:23 +0000 (07:57 +0000)]
panfrost: fix attribute continuation decoding
Because attribute continuations aren't considered whole attributes, we
need to increase the total number of attributes for each continuation
when decoding, otherwise we will end up missing a buffer for every
continuation we have.
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-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/8066>
Marcin Ślusarz [Tue, 19 Jan 2021 19:04:13 +0000 (20:04 +0100)]
intel/perf: export information about units of performance counters
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8580>
Tony Wasserka [Tue, 26 Jan 2021 15:05:32 +0000 (16:05 +0100)]
aco/ra: Remove preprocessor guards for print_regs
This debug helper isn't used anywhere by default, but compiling it anyway
ensures future refactors don't break it.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8719>
Tony Wasserka [Tue, 26 Jan 2021 15:05:01 +0000 (16:05 +0100)]
aco/ra: Fix build with print_regs enabled
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8719>
Tony Wasserka [Tue, 26 Jan 2021 14:55:18 +0000 (15:55 +0100)]
aco/ra: Fix print_regs using the wrong constant to check for blocked slots
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8719>
Abhishek Kumar [Tue, 26 Jan 2021 18:20:13 +0000 (23:50 +0530)]
intel: change urb max shader geometry for KBL GT1
Below Deqp CTS failure is seen on KBL GT1(tested on 0x5906) only ,
GT2 all test passes, changing the max shader geometry to 256
(previous 640) fixes all failure tests.Similar issues on
CML GT1 (Gen9) is fixed
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8550
dEQP-GLES31.functional.geometry_shading.layered.
render_with_default_layer_cubemap
render_with_default_layer_3d
render_with_default_layer_2d_array
Signed-off-by: Abhishek Kumar <abhishek4.kumar@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8731>
Samuel Pitoiset [Wed, 16 Dec 2020 08:58:52 +0000 (09:58 +0100)]
radv: enable TC-compat HTILE for mipmaps on GFX10+
Mipmaps+layers should be investigated and mipmaps support added
for previous gens (GFX8-9).
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/8124>
Samuel Pitoiset [Wed, 16 Dec 2020 08:48:11 +0000 (09:48 +0100)]
radv: teach radv_htile_enabled() about the number of HTILE levels
This is the main function that enables/disables HTILE for mipmaps.
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/8124>
Samuel Pitoiset [Wed, 16 Dec 2020 08:33:28 +0000 (09:33 +0100)]
radv: add support for fast clearing levels of the HTILE buffer
This can probably be optimized further by checking if the levels
are contiguous in memory.
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/8124>
Samuel Pitoiset [Wed, 16 Dec 2020 07:57:20 +0000 (08:57 +0100)]
radv: remove mipmaps related assertions when initializing HTILE
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/8124>
Samuel Pitoiset [Tue, 15 Dec 2020 16:09:01 +0000 (17:09 +0100)]
radv: do not decompress/resummarize levels without HTILE
It's completely useless to decompress or resummarize levels that
are not compressed using HTILE.
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/8124>
Samuel Pitoiset [Tue, 15 Dec 2020 17:37:48 +0000 (18:37 +0100)]
radv: check if HTILE is enabled per-level instead of the entire image
With HTILE mipmaps support, we should check if the base level
currently in use supports compression.
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/8124>
Samuel Pitoiset [Wed, 16 Dec 2020 07:36:24 +0000 (08:36 +0100)]
radv: use the image view range when fast clearing depth
This doesn't change behevior since the driver currently doesn't
support HTILE for mipmaps and also because we can only clear the
whole array layers at once. This improves consistency regarding
the fast clear color path.
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/8124>
Samuel Pitoiset [Tue, 15 Dec 2020 17:59:18 +0000 (18:59 +0100)]
ac/surface: store HTILE mip info into the surface
GFX10 can only compress the first level in the mip tail.
GFX9+ is not yet supported because mips are interleaved.
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/8124>
Dave Airlie [Wed, 27 Jan 2021 02:08:19 +0000 (12:08 +1000)]
CI: add lavapipe to llvmpipe rules.
I've noticed that that llvmpipe tests don't all get run,
it's probably good enough to just run them on lavapipe
changes as well
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8732>
Dave Airlie [Fri, 4 Dec 2020 06:41:17 +0000 (16:41 +1000)]
lavapipe: add VK_EXT_conditional_rendering support.
This passes all the CTS tests.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8182>
Dave Airlie [Fri, 4 Dec 2020 07:03:11 +0000 (17:03 +1000)]
llvmpipe: handle vulkan conditional rendering
This implements the new hook to conditionialise rendering
on memory contents
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8182>
Dave Airlie [Fri, 4 Dec 2020 07:27:16 +0000 (17:27 +1000)]
gallium: add a cond rendering hook for vulkan.
The vulkan cond rendering hook is quite different than the
traditional gallium one so add a new interface for it.
This just conditionalises rendering on the memory location.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8182>
Dave Airlie [Mon, 21 Dec 2020 04:54:58 +0000 (14:54 +1000)]
lavapipe: rewrite attachment clearing for conditional rendering.
Attachment clears have to respect cond rendering, so they can't
call clear texture directly, they have to create temporary
surfaces and clear via those.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8182>
Dave Airlie [Mon, 21 Dec 2020 04:49:50 +0000 (14:49 +1000)]
lavapipe: refactor image surface creation
There is a need to create arbitrary surfaces for clearing,
so split out the templating from the storing to img->vk_surface
so temporary surfaces can be created for clearing.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8182>
Rhys Perry [Tue, 26 Jan 2021 14:24:48 +0000 (14:24 +0000)]
aco: don't affect isPrecise() after applying output modifiers
fossil-db (GFX10.3):
Totals from 26679 (19.14% of 139391) affected shaders:
SGPRs: 1757155 -> 1757059 (-0.01%); split: -0.05%, +0.04%
VGPRs: 1175932 -> 1173556 (-0.20%); split: -0.21%, +0.01%
CodeSize:
86203592 ->
85572480 (-0.73%); split: -0.73%, +0.00%
MaxWaves: 315513 -> 315805 (+0.09%); split: +0.10%, -0.00%
Instrs:
16297785 ->
16143745 (-0.95%); split: -0.95%, +0.00%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8718>
Nanley Chery [Wed, 13 Jan 2021 22:34:13 +0000 (14:34 -0800)]
iris: Disable aux as needed in iris_flush_resource
Disable compression in iris_flush_resource if the resource lacks a
modifier. When a caller wants to prepare such a resource for sharing
(via eglCreateImage for example), this change enables all reference
holders to access the resource in a common manner - without compression.
This fixes misrendering with 3D-accelerated qemu. A piglit test which
reproduces qemu's behavior, ext_image_dma_buf_import-export-tex, is also
enabled to pass.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2678
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8663>
Nanley Chery [Wed, 13 Jan 2021 22:31:05 +0000 (14:31 -0800)]
gallium: Flush GL API resources in eglCreateImage
Some drivers need to be able to remove compression from resources before
they are handed to consumers that wouldn't understand or expect it.
Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8663>
Nanley Chery [Thu, 21 Jan 2021 20:21:16 +0000 (12:21 -0800)]
gallium: Map _DRI_IMAGE_FORMAT_NONE to NULL
Many entries in the dri2_format_table have _DRI_IMAGE_FORMAT_NONE as the
dri_format. Make the result of dri2_get_mapping_by_format a tad more
well-defined by returning NULL when this format is passed into it.
Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8663>
Mike Blumenkrantz [Tue, 26 Jan 2021 12:42:59 +0000 (07:42 -0500)]
st/drawpixels: use GL_CLAMP_TO_EDGE instead of GL_CLAMP for samplers
no border colors here either
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Drive-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8714>
Mike Blumenkrantz [Tue, 26 Jan 2021 12:39:10 +0000 (07:39 -0500)]
st/bitmap: use GL_CLAMP_TO_EDGE for bitmap samplers
we aren't using border colors here, so this should be fine (and more compatible)
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Drive-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8714>
Daniel Schürmann [Mon, 25 Jan 2021 17:37:29 +0000 (18:37 +0100)]
aco: fix nir_intrinsic_ballot with wave32
Found by inspection.
Fixes:
21db083504fde3100f0b528f683a087357f5aaff ('aco/wave32: Allow setting the subgroup ballot size to 64-bit.')
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8703>
Caio Marcelo de Oliveira Filho [Wed, 20 Jan 2021 17:24:45 +0000 (09:24 -0800)]
ci: Add nouveau chipset 162 to shader-db runs
Suggested-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8585>
Caio Marcelo de Oliveira Filho [Wed, 20 Jan 2021 01:14:28 +0000 (17:14 -0800)]
compiler: Use util/bitset.h for system_values_read
It is currently a bitset on top of a uint64_t but there are already
more than 64 values. Change to use BITSET to cover all the
SYSTEM_VALUE_MAX bits.
Cc: mesa-stable
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Acked-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8585>
Caio Marcelo de Oliveira Filho [Wed, 20 Jan 2021 01:10:11 +0000 (17:10 -0800)]
nir/linking: Remove system_value handling from helper
All uses are passing variables of either nir_var_shader_in or
nir_var_shader_out modes. Note that currently there are more than 64
system values, so the uint64_t wouldn't be enough anyway.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8585>