Daniel Schürmann
b56ea19111
aco/spill: refactor live-in registerDemand calculation
...
This also fixes some hypothetical issue for loops without phis
and for loops with higher register pressure at the end of the
loop preheader.
No fossil-db changes.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9196 >
2021-04-13 18:40:57 +00:00
Daniel Schürmann
282eacc3e0
aco/spill: refactor some more spill decision taking
...
No fossil-db changes.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9196 >
2021-04-13 18:40:57 +00:00
Daniel Schürmann
dfb10e4f4b
aco/spill: don't count phis as variable access
...
This increases the chance of evicting phis
if these have longer next-use distances.
Totals from 6 (0.00% of 146267) affected shaders (Navi10):
CodeSize: 476992 -> 464388 (-2.64%)
Instrs: 81785 -> 79952 (-2.24%)
VClause: 2380 -> 2374 (-0.25%)
Copies: 26836 -> 25131 (-6.35%)
Branches: 2494 -> 2492 (-0.08%)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9196 >
2021-04-13 18:40:57 +00:00
Daniel Schürmann
b2a6346df7
aco/spill: spill phi constants and exec directly to VGPR
...
This lets us avoid some CSSA copies.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9196 >
2021-04-13 18:40:57 +00:00
Daniel Schürmann
99936d7142
aco/spill: reload spilled exec masks directly to exec
...
This handles the case of
exec = p_linear_phi %a, %b
where %a or %b might have been spilled.
By directly reloading these variables into the exec mask register,
we can avoid additional CSSA parallelcopies.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9196 >
2021-04-13 18:40:57 +00:00
Daniel Schürmann
beb292343a
aco/spill: refactor spill decision taking
...
No fossil-db changes.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9196 >
2021-04-13 18:40:57 +00:00
Boris Brezillon
17429b8ad4
panfrost: Pass a tile enable map to avoid reloading untouched tiles
...
We only do that when there are more than one damage rectangle and the
number of tiles to reload is significantly lower than the total number
of tiles covered by the damage extent, otherwise the overhead of the
TEM read might defeat the optimization that we might get from using one.
Signed-off-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/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
988b0d2863
panfrost: Kill the old tile-buffer preload logic
...
Now that the gallium driver uses the pan_preload() helpers we can get
rid of the code in pan_blit.c and all its dependencies.
Signed-off-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/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
ff3eada7eb
panfrost: Use the generic preload and FB helpers in the gallium driver
...
We also rework the code to have the FB descriptor shared by the tiler
and fragment jobs, instead of allocating a separate FB descriptor for
tiler jobs.
The new implementation seems to fix a few dEQP failures on T720.
Signed-off-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/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
d7008a6d7b
panfrost: Fix partial update
...
The KHR_partial_update spec says:
"
If EGL_EXT_buffer_age is supported, the contents of the buffer inside
the damage region may also be relied upon to contain the same content
as the last time they were defined for the current back buffer.
"
but we currently assume that everything inside the damage region will
be overwritten by new data and that the previous content doesn't need
to be reloaded.
Let's get rid of the damage rect inversion logic for now and reload
everything inside the damage extent. We will optimize things further
down the line, using pre-frame DCDs on Bifrost, and a tile enable map
on Midgard.
Signed-off-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/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
8ba2f9f698
panfrost: Create a blitter library to replace the existing preload helpers
...
pan_blitter.c is meant to replace the pan_blit.c which currently
provides helpers to preload the tile buffer. Some changes
are worth mentioning:
- we use pre-frame DCDs on Bifrost (Midgard still uses a tiler job
to preload the tile buffer)
- the blit shaders are now stored in a hash table and created lazily
- we now cache blend shader binaries and blit RSDs too
This library will soon be extended to cover regular blits.
Signed-off-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/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
a11807b795
panfrost: Always pass a non-NULL screen to set_damage_region()
...
We will soon have a different handling for Bifrost, and we need to know
which GPU we're targeting to choose the right path.
Signed-off-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/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
c5d6abae5b
panfrost: Extend pan_fb_info to allow passing pre/post frame DCDs
...
Signed-off-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/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
c52c3e2424
panfrost: Extend pan_fb_info to allow passing a tile enable map
...
We will use this tile enable map to implement KHR_partial_update and
replace the current solution where the preload process is done by
inverting damage regions, merging the resulting inverted regions and
issuing preloading draws for those rectangles.
Signed-off-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/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
96b71a59c0
panfrost: Decode pre/post frame DCDs
...
Bifrost FB descritptors can be attached 3 DCDs describing pre/post frame
operations (pre frames DCDs can be used to preload the tile buffers).
Decode them when mode != NEVER.
Signed-off-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/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
9f1bbced3c
panfrost: s/pandecode_vertex_tiler_postfix_pre/pandecode_dcd/
...
We will soon use this function to decode pre/post frame DCDs which are
not part of a job descriptor.
Signed-off-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/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
9d7a5a6b75
panfrost: Add the early ZS pre frame mode
...
We will use that one when preloading ZS buffers.
Signed-off-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/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
bacd9df8de
panfrost: Add align info to the draw and draw padding definitions
...
Needed if we want to allocate pre/post frame draw descriptors.
Signed-off-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/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
25f948d4d9
panfrost: Add an helper to emit fragment jobs
...
Signed-off-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/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
387f8c037d
panfrost: Add various helpers to simplify FB desc emission
...
Now that image and image views are gallium-agnostic and contain enough
information, we can provide generic helpers to emit FB descriptors and
their dependencies, thread storage and tiler descriptors.
This helpers will be re-used in the Vulkan driver.
Signed-off-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/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
0fc7c1f971
pan/midg: Use the sampler index passed to the texture instruction
...
Sampler index and texture index can differ.
Signed-off-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/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
477c67d79e
panfrost: Pass a const device to panfrost_sample_positions()
...
This function doesn't modify the dev object, we can constify this
argument.
Signed-off-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/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
e23cbac70e
panfrost: Provide a helper to retrieve image surface pointers
...
Signed-off-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/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
af34e29f15
panfrost: Provide a helper to calculate the polygon list size
...
Signed-off-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/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
f5d7c419e7
panfrost: Pass an image view to panfrost_new_texture()
...
pan_image_view contains everything we need to emit a texture
descriptor. Pass this object instead of the dozen of arguments
we have now.
Signed-off-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/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
9d0ad7fd2e
panfrost: Patch the gallium driver to use pan_image_layout_init()
...
Now that we have a generic implementation, we can use it and get rid
of panfrost_setup_layout().
Signed-off-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/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
051d62cf04
panfrost: Add a pan_image_layout_init() helper
...
We will need it for Vulkan.
Signed-off-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/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
f1d4df1cd7
panfrost: Move special Z32_S8X24 case out of panfrost_setup_layout()
...
We are about to move the panfrost_setup_layout() logic out of the
gallium driver, and the Z32_S8X24 split is not mandatory (some GPU
support this format natively). Let's move this special case out of
panfrost_setup_layout() and patch the format of the first plane
instead.
Signed-off-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/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
50f39908aa
panfrost: Move out-of-band CRC info to pan_image
...
We already have the data BO stored there, let's move the out-of-band
CRC BO too. We also add a CRC mode to pan_image_layout so we can easily
know where the CRC resides.
Signed-off-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/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
1c7e8a1692
panfrost: Add an offset field so we can attach a sub-buffer to an image
...
Needed for Vulkan.
Signed-off-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/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
8bd70ea6ea
panfrost: Split pan_image in two
...
Move the image view bit out of pan_image and create a separate
pan_image_view struct. Once this is done we can embed a pan_image
object in panfrost_resource which will be referenced by the image
view that we pass to panfrost_load_{midgard,bifrost}().
Signed-off-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/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
cfe9bca912
panfrost: Add extra info to the pan_image_layout struct
...
This means duplicating some of the bits we already have in the
pipe_resource object embedded in panfrost_resource, but if will also
allow us to move some code out of the gallium driver without requiring
copy those fields every time we call a generic helper.
Signed-off-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/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
efcb1e494b
panfrost: Stop passing a depth > 1 when creating 2D textures
...
The depth field is ignored if dim != 3D, but it's a bit confusing.
Signed-off-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/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
5d7c244c07
panfrost: Add a format field to pan_image_layout
...
We will need this information at the layout level if we want to move
some of the code out of the gallium driver and share it with the
Vulkan driver. Let's get rid of panfrost_resource.internal_format which
basically encodes the same thing.
Signed-off-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/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
3f8cebee09
panfrost: Move image states out of pan_image_layout
...
The layout is supposed to encode image miplevels/surfaces layout, not
the state data stored in the buffers. It doesn't matter for a gallium
driver, since resources are expected to hold both a layout and a state,
but Vulkan is a bit different. In Vulkan, the image state is explicitly
passed by the user when starting a render pass (vkCmdBeginRenderPass()),
and might evolve depending on the operation done in this render pass.
This state is not effective until the command buffer is queued and
executed. For these reasons, keeping the image state attached to the
VkImage object is not an option, but we'd still like to re-use the
layout and state objects, and all common helpers acting on those objects.
Let's move the state bits out of the layout to make that possible.
Signed-off-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/10033 >
2021-04-13 18:06:37 +00:00
Boris Brezillon
b00b6a727c
panfrost: s/panfrost_slice/pan_image_slice_layout/
...
We are about to move slice states out of the panfrost_slice object,
but before we do that, let's rename the existing struct to reflect what
this object refers to.
Signed-off-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/10033 >
2021-04-13 18:06:37 +00:00
Connor Abbott
ed20e69b0c
vtn: Handle ZeroExtend/SignExtend image operands
...
These decorations allow you to override the signedness of image
instructions. This means that we have to override the type we get from
the sampled image.
Apparently both Intel and AMD get the type from the descriptor rather
than the instruction, but this appears to not be the case with Adreno,
which is why this wasn't noticed until now. So this probably won't fix
any preexisting bugs, but it's required to fix
dEQP-VK.image.extend_operands_spirv1p4.* when exposing VK_KHR_spirv_1_4
on turnip.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7968 >
2021-04-13 17:41:27 +00:00
Lucas Stach
07546c69b0
Revert remaining half of "gallium/dri2: Pass the resource that corresponds to the plane"
...
As documented in 6ec7e0d406 (gallium: document convention for get_handle
calls on multi-planar resources) it's the drivers responsibility to walk
the chain of resources for multi-planar resources. The get_handle interface
should always be called with the base resource by the frontend.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de >
Acked-by: Simon Ser <contact@emersion.fr >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10212 >
2021-04-13 16:40:04 +00:00
Juan A. Suarez Romero
cbb1e2dcac
v3dv: fix assertion
...
Ensure subpass_idx has a valid value; we use "-1" as invalid one.
Fixes CID#1468096 "Macro compares unsigned to 0 (NO_EFFECT)"
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10203 >
2021-04-13 16:24:37 +00:00
Juan A. Suarez Romero
d69d8817c9
v3d: use GS_BIN inputs as VS_BIN outputs
...
When creating the Vextex Shader bin, only store outputs that will be
read later as inputs by the Geometry Shader bin.
This fixes
KHR-GLES31.core.geometry_shader.rendering.rendering.lines_input_triangle_strip_output_line_loop_drawcall
(exposed by previous commit).
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10129 >
2021-04-13 16:08:00 +00:00
Juan A. Suarez Romero
64943f2063
broadcom/compiler: use VPM offsets in GS load_per_vertex input
...
Vertex Shader has a store_out lowering pass that converts gallium driver
locations in offsets inside the VPM.
One of the consequences is that these offsets are consecutives; that is,
if the VS stores VARYING_SLOT_VAR0.xyz and VARYING_SLOT_VAR1.xyzw, there
isn't a hole in the VPM offsets for the un-stored VARYING_SLOT_VAR0.w.
Thus we need to change how the VPM offset is computed in the Geometry
Shader when loading the inputs.
This bug is exposed by !9050 .
v2 (Iago):
- Include explanatory comment.
- Use assert.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10129 >
2021-04-13 16:08:00 +00:00
Bas Nieuwenhuizen
61a1a385d3
radv: Re-enable retiling.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10037 >
2021-04-13 12:08:24 +00:00
Juan A. Suarez Romero
515ffe4af4
ci/broadcom: use SNMP to turn on/off devices
...
So far we were using a telnet-based script to communicate with the PoE
Switch to turn on/off the network ports the DUTs are connected.
But this script does not seem very reliable because from time to time the
switch fails to execute the steps in the script.
As the PoE Switch we use is a smart one with support for SNMP protocol,
it would be easier to use it to handle it, which allows to turn on/off
the ports without going through the nasty telnet steps
Acked-by: Michel Dänzer <mdaenzer@redhat.com >
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9954 >
2021-04-13 13:16:26 +02:00
Samuel Pitoiset
3720c6a6f6
radv: fix needed dynamic state for VRS
...
If the pipeline struct isn't found, the state might still be dynamic.
Cc: mesa-stable
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/10193 >
2021-04-13 08:48:42 +02:00
Erik Faye-Lund
437ed05708
compiler/glsl: do not cast struct to string
...
When formatting the error here, we're currently casting an
ast_type_qualifier as a string.
But we don't need to use a string here at all, because we know from
context exactly what qualifier we're talking about, because the
if-statements explicitly check for the uniform-qualifier.
So let's just hard-code the format-string to reference the right
qualifier instead of the string-shenanigans. The latter cannot do the
right thing.
Fixes: 2d03f48a65 ("glsl: Add parsing for GLSL uniform blocks.")
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9911 >
2021-04-13 06:16:41 +00:00
Erik Faye-Lund
2a984da18e
compiler/glsl: drop rogue argument to _mesa_glsl_error
...
This arugment is not present int the format-string, so we shouldn't pass
it to _mesa_glsl_error either.
Noticed by Coverity.
Fixes: 02dc74fbd7 ("glsl: parse invocations layout qualifier for ARB_gpu_shader5")
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9911 >
2021-04-13 06:16:41 +00:00
Marek Olšák
a0718e8977
st/mesa: fix nir_lower_io if it's done right after IO vectorization
...
Reviewed-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9050 >
2021-04-13 05:07:42 +00:00
Marek Olšák
d7250b0b08
gallium: add PIPE_SHADER_CAP_FP16_CONST_BUFFERS for FP16 uniforms
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9050 >
2021-04-13 05:07:42 +00:00
Marek Olšák
b19a836413
glsl: lower mediump uniforms to FP16 based on an option
...
Everything else is done - just allow it.
v2: update lower_precision_test.py
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com > (v1)
Reviewed-by: Eric Anholt <eric@anholt.net > (v1)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9050 >
2021-04-13 05:07:42 +00:00
Marek Olšák
43270e24b9
mesa: implement glGetActiveUniform for FP16 uniforms
...
We must return the types before lowering to 16 bits.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9050 >
2021-04-13 05:07:42 +00:00