Eric Anholt
e92f4ac9f4
android_stub: Update platform headers to include gralloc1.h.
...
This header is used in anv and radv, and soon turnip. Since the script
just checks out master, this also bumps the headers to upstream
02dfcc7c1562 ("Merge "Merge Android R"")
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6821 >
2020-10-19 18:41:50 +00:00
Samuel Pitoiset
72799886e7
radv: report latest extension spec versions
...
Found with the vulkan extension checker tool.
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/7158 >
2020-10-19 17:52:05 +00:00
Duncan Hopkins
cf17d62516
meson: Add xcb-fixes to loader when using x11 and dri3. Fixes undefined symbol for xcb_xfixes_create_region in loader_dri3_helper.c
...
loader_dr3_helper.c uses xcb_xfixes_create_region() that requires dep_xcb_xfixes to link. This is dependent on with_platform_x11 and with_dri3.
But the source meson file does not set this up dependent on with_dri3.
The build was initialsed using platforms=x11 and gallium-drivers=zink,swrast.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7164 >
2020-10-19 17:24:25 +00:00
Ian Romanick
25627ffe65
mesa: Pass the correct caller string to _mesa_lookup_or_create_texture
...
An actual bug found by the 'unused parameter' warning. :D
Reviewed-by: Matt Turner <mattst88@gmail.com >
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7167 >
2020-10-19 09:46:36 -07:00
Ian Romanick
9b847d4150
mesa/st: Silence unused parameter warnings in st_context.c
...
src/mesa/state_tracker/st_context.c: In function ‘st_Enable’:
src/mesa/state_tracker/st_context.c:101:57: warning: unused parameter ‘state’ [-Wunused-parameter]
101 | st_Enable(struct gl_context *ctx, GLenum cap, GLboolean state)
| ~~~~~~~~~~^~~~~
Reviewed-by: Matt Turner <mattst88@gmail.com >
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7167 >
2020-10-19 09:46:34 -07:00
Ian Romanick
4cd930565e
i965: Silence unused parameter warnings
...
src/mesa/drivers/dri/i965/intel_screen.c: In function ‘brw_driconf_get_xml’:
src/mesa/drivers/dri/i965/intel_screen.c:103:33: warning: unused parameter ‘driver_name’ [-Wunused-parameter]
103 | brw_driconf_get_xml(const char *driver_name)
| ~~~~~~~~~~~~^~~~~~~~~~~
src/mesa/drivers/dri/i965/intel_screen.c: In function ‘intel_unmap_image’:
src/mesa/drivers/dri/i965/intel_screen.c:882:33: warning: unused parameter ‘context’ [-Wunused-parameter]
882 | intel_unmap_image(__DRIcontext *context, __DRIimage *image, void *map_info)
| ~~~~~~~~~~~~~~^~~~~~~
src/mesa/drivers/dri/i965/intel_screen.c:882:54: warning: unused parameter ‘image’ [-Wunused-parameter]
882 | intel_unmap_image(__DRIcontext *context, __DRIimage *image, void *map_info)
| ~~~~~~~~~~~~^~~~~
src/mesa/drivers/dri/i965/intel_screen.c: In function ‘intelReleaseBuffer’:
src/mesa/drivers/dri/i965/intel_screen.c:2904:33: warning: unused parameter ‘dri_screen’ [-Wunused-parameter]
2904 | intelReleaseBuffer(__DRIscreen *dri_screen, __DRIbuffer *buffer)
| ~~~~~~~~~~~~~^~~~~~~~~~
src/mesa/drivers/dri/i965/brw_context.c: In function ‘brw_set_background_context’:
src/mesa/drivers/dri/i965/brw_context.c:144:58: warning: unused parameter ‘queue_info’ [-Wunused-parameter]
144 | struct util_queue_monitoring *queue_info)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
Reviewed-by: Matt Turner <mattst88@gmail.com >
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7167 >
2020-10-19 09:46:22 -07:00
Nanley Chery
3c87ac1f60
isl: Fix the aux-map encoding for D24_UNORM_X8
...
Bspec: 53911 now defines the encoding for this format.
Cc: mesa-stable
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7198 >
2020-10-19 15:58:43 +00:00
Jason Ekstrand
9a062383e3
anv: Implement VariableDescriptorCount
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7180 >
2020-10-19 14:50:47 +00:00
Jason Ekstrand
215218f32f
anv: Add a descriptor_count to descriptor sets
...
This is useful for asserting in-bounds descriptor set access.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7180 >
2020-10-19 14:50:47 +00:00
Jason Ekstrand
dd1971c9d8
anv: Bump the number of update-after-bind descriptors to 1M
...
It's a bit hard to exactly map our implementation to the limits
described by Vulkan. The bindless surface handle in the extended
message descriptors is 20 bits and it's an index into the table of
RENDER_SURFACE_STATE structs that starts at bindless surface base
address. This means that we can have at must 1M surface states
allocated at any given time. Since most image views take two
descriptors, this means we have a limit of about 500K image views.
However, since we allocate surface states at vkCreateImageView time,
this means our limit is actually something on the order of 500K image
views allocated at any time. The actual limit describe by Vulkan, on
the other hand, is a limit of how many you can have in a descriptor set.
Assuming anyone using 1M descriptors will be using the same image view
twice a bunch of times (or a bunch of null descriptors), we can safely
advertise a larger limit. 1M is what's required by D3D12, so let's
advertise that.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3335
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7180 >
2020-10-19 14:50:47 +00:00
Erik Faye-Lund
3c0ba7b180
zink: reject resource-imports with modifiers
...
Zink doesn't support forwarding DRM modifiers yet, so whenever those are
used, we end up ignoring them. That's not going to do the right thing in
most cases, so let's reject them instead.
Since d686835171
, the dri2 code tries to create a 0x0 surface without
any format when trying to import. This makes this go from
rendering-issues to asserting in debug builds, making things even worse.
Fixes: d686835171
("gallium/dri2: Support I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS import")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3654
Reviewed-by: Daniel Stone <daniels@collabora.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7214 >
2020-10-19 14:42:57 +00:00
Mike Blumenkrantz
068b4bf76c
doc/features: remove zink entries for GL 3.3 items
...
zink fully supports 3.3, so we don't need to be listed for these
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7204 >
2020-10-19 14:00:02 +00:00
James Park
af8d488ea5
util,ac,aco,radv: Cross-platform memstream API
...
POSIX memstream is not available on Windows.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7143 >
2020-10-19 03:37:42 -07:00
James Park
4c2e7b0893
util,radv,radv/winsys: Cross-platform rwlock API
...
POSIX rwlock is not available on Windows.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7144 >
2020-10-19 09:49:33 +00:00
Ricardo Garcia
9d4999e7cf
anv: Ignore continue flag in primary cmd buffers
...
According to the Vulkan specification, the
VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT flag will be ignored if
included in a VkCommandBufferBeginInfo for a primary command buffer.
This also implies pBeginInfo->pInheritanceInfo should not be read even
if the flag is present, and makes it legal to include the flag knowing
it will be ignored.
Signed-off-by: Ricardo Garcia <rgarcia@igalia.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7128 >
2020-10-19 09:14:29 +02:00
Samuel Pitoiset
b3529e56b5
ac/nir: implement missing nir_op_pack_half_2x16_split
...
RADV now lowers lower_pack_half_2x16.
Fixes: 2f125908b3
("radv,aco: lower_pack_half_2x16")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7187 >
2020-10-19 08:41:31 +02:00
Marek Olšák
57d317865e
radeonsi: enable NGG culling by default on Navi1x PRO cards
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7172 >
2020-10-17 01:58:19 +00:00
Marek Olšák
67a67ea29e
radeonsi: enable NGG on Navi14 PRO cards
...
These are the only cards where it works.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7172 >
2020-10-17 01:58:19 +00:00
Marek Olšák
bc3c74e2a2
radeonsi: tweak LATE_ALLOC_GS numbers for faster NGG culling
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7172 >
2020-10-17 01:58:19 +00:00
Marek Olšák
b38b5aabee
radeonsi: pack LDS better for NGG culling
...
There is a barrier between lds_pos_cull_* use and lds_pos_* use, so they
can occupy the same LDS space.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7172 >
2020-10-17 01:58:19 +00:00
Marek Olšák
8094367988
radeonsi: write VS/TES system values into LDS after culling
...
The system values are written into LDS after the new thread ID is known,
so it removes pointer indirection with the old thread ID.
Also, the LDS stores are skipped entirely if vertices are culled.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7172 >
2020-10-17 01:58:19 +00:00
Marek Olšák
1de0bf0a56
radeonsi: remove indirection when loading position at the end for NGG culling
...
If we store the position into LDS after we know the new thread ID,
we don't need to remember the old thread ID.
The culling code only needs W, X/W, Y/W, so we have to keep those.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7172 >
2020-10-17 01:58:19 +00:00
Marek Olšák
823ee12d57
radeonsi: optimize out LDS bank conflicts in the NGG culling shader
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7172 >
2020-10-17 01:58:19 +00:00
Marek Olšák
7648060dc0
radeonsi: enable NGG culling by default on gfx10.3 dGPUs
...
for better performance
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7172 >
2020-10-17 01:58:19 +00:00
Marek Olšák
e7d3f22c6a
radeonsi: don't disable NGG culling on gfx10.3
...
This was causing the hangs:
42f921387b
- radeonsi/gfx10: disable vertex grouping
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7172 >
2020-10-17 01:58:19 +00:00
Marek Olšák
6810e6e4d0
Revert "radeonsi/gfx10: disable vertex grouping"
...
This reverts commit 42f921387b
.
It causes GPU hangs on gfx10.3.
Fixes: a23802bcb9
- ac,radeonsi: start adding support for gfx10.3
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7172 >
2020-10-17 01:58:19 +00:00
Vinson Lee
7d1fb5fffe
v3dv: Initialize time before usage by free_stale_bos.
...
Fix defect reported by Coverity Scan.
Uninitialized scalar variable (UNINIT)
uninit_use_in_call: Using uninitialized value time.tv_sec when calling free_stale_bos.
Fixes: f78c99f357
("v3dv/bo: add a maximum size for the bo_cache and a envvar to configure it")
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7154 >
2020-10-16 22:34:22 +00:00
Vinson Lee
8eb246d7f6
v3dv: Remove unsigned comparison to zero.
...
index is of type uint32_t.
Fix defect reported by Coverity Scan.
Macro compares unsigned to 0 (NO_EFFECT)
unsigned_compare: This greater-than-or-equal-to-zero comparison of
an unsigned value is always true. index >= 0U.
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7153 >
2020-10-16 15:25:37 -07:00
Nanley Chery
5e27e04322
intel/isl: Drop redundant unpack of unorm channels
...
Fixes: 09ced65420
("intel/isl: Add format conversion code")
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7168 >
2020-10-16 18:35:57 +00:00
Nanley Chery
cf11ebfbc2
st/mesa: Add missing sentinels in format_map[]
...
Cc: mesa-stable
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7169 >
2020-10-16 18:19:39 +00:00
Mike Blumenkrantz
0c70268ff7
zink: mark ARB_sample_shading as supported
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7192 >
2020-10-16 17:14:51 +00:00
Mike Blumenkrantz
bf9a1e0a4b
zink: add a pipe_context::get_sample_position hook
...
standard for most gallium drivers, not sure why it's not a util function
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7192 >
2020-10-16 17:14:51 +00:00
Mike Blumenkrantz
b009bd9685
zink: add ntv handling for ARB_sample_shading
...
this involves variable handling and decorations as well as a weird bitcast
for the array[1] gl_SampleMask in spirv
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7192 >
2020-10-16 17:14:51 +00:00
Mike Blumenkrantz
441b32bf3f
zink: add helper for vec-type input variables in ntv
...
we'll see a lot of reuse of this type of thing, so we can avoid duplicating
it later
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7192 >
2020-10-16 17:14:51 +00:00
Mike Blumenkrantz
7c5129985b
zink: implement ARB_draw_indirect
...
other than the vaguely gross case of primitive restart with incompatible
draw modes and/or restart index, this is no trouble since the buffer formats
are compatible
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7191 >
2020-10-16 15:55:09 +00:00
Mike Blumenkrantz
3e3b6e995f
zink: set 3.3 complete in features.txt
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7190 >
2020-10-16 11:37:52 -04:00
Mike Blumenkrantz
80c66642cc
zink: bump GLSL to 3.30
...
somehow all these tests Just Pass™
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7190 >
2020-10-16 11:37:49 -04:00
Mike Blumenkrantz
44baddf1fe
zink: set 3.2 complete in features.txt
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7190 >
2020-10-16 11:37:47 -04:00
Mike Blumenkrantz
26b076ff66
zink: GLSL 1.50
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7190 >
2020-10-16 11:37:45 -04:00
Mike Blumenkrantz
b27ec49e02
zink: mark off GL 3.1 as done in features.txt
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7109 >
2020-10-16 13:57:56 +00:00
Mike Blumenkrantz
815f0c01b0
zink: bump to glsl 1.40
...
but leaving compat mode at 1.30 for now
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7109 >
2020-10-16 13:57:56 +00:00
Mike Blumenkrantz
8028991f36
zink: enable gs pipe caps
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7139 >
2020-10-16 09:15:34 -04:00
Mike Blumenkrantz
4c734da7de
zink: add gallium handling for geometry shaders
...
this is the create/bind/destroy hooks as well as the u_blitter shader
save during blit setup
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7139 >
2020-10-16 09:15:32 -04:00
Mike Blumenkrantz
d59e4b8ce6
zink: round out handling for streamout buffer stride setting during draw
...
this adds cases for tess and geometry shaders in the xfb path for grabbing
stride off the shader
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7139 >
2020-10-16 09:15:30 -04:00
Mike Blumenkrantz
9915c540b2
zink: remove ADJACENCY prim types from primconvert path
...
we can (and do) actually handle these natively
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7139 >
2020-10-16 09:15:28 -04:00
Mike Blumenkrantz
d656c600a3
zink: add handling for gs in ntv
...
this hooks up execution modes and the gs-specific instructions
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7139 >
2020-10-16 09:15:26 -04:00
Mike Blumenkrantz
9671cd9215
zink: re-transform gl_Position for gs input
...
we've transformed this in the vertex output, so we need to undo that here
ideally we'd only be performing this transform once, but that's going to get
complicated later with the halfz extension which requires shader keys on top
of this, so we can get around to simplifying things at that stage
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7139 >
2020-10-16 09:15:24 -04:00
Mike Blumenkrantz
ea2279daf1
zink: add ntv handling for geometry shader variables
...
these can reuse the unified loader codepath
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7139 >
2020-10-16 09:15:22 -04:00
Mike Blumenkrantz
423a342ae7
zink: handle shader io vars more generically for use with gs
...
geometry shaders have more inputs and use a lot of the same codepaths as
vertex shaders, so these changes add the inputs and remove checks for vertex-only
shaders
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7139 >
2020-10-16 09:15:20 -04:00
Mike Blumenkrantz
182f7f9ae8
zink: add some spirv_builder functions we'll be using for geometry shaders
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7139 >
2020-10-16 09:15:11 -04:00