Commit Graph

15 Commits

Author SHA1 Message Date
Georg Lehmann 4f6c7a6025 radv: Don't hash ycbcr sampler base object.
Stops gamescope from recompiling pipelines on every start.

Cc: mesa-stable

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15454>
2022-03-18 17:56:15 +00:00
Emma Anholt aed4c0b5a9 nir: Drop the unused instr arg for src/dest copy functions.
Now that we don't use ralloc, we don't need this arg to get at the right
ralloc ctx.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11776>
2021-09-14 17:53:06 +00:00
Joshua Ashton 855cb78d46 radv: Handle unnormalized samplers in YCbCr lowering
We need to divide these by their divisors and special-case COSITED_EVEN.

Fixes NV12 compositing in Gamescope.

Fixes: 91702374 ("radv: Add ycbcr lowering pass.")
Cc: mesa-stable
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10816>
2021-05-15 18:15:52 +00:00
Michel Dänzer 2928c21eb7 Convert most remaining free-form fall-through comments to FALLTHROUGH
One exception is src/amd/addrlib/, for which -Wimplicit-fallthrough is
explicitly disabled.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10220>
2021-04-15 16:01:22 +00:00
Bas Nieuwenhuizen 59c501ca35 radv: Format.
Using

find ./src/amd/vulkan -regex '.*/.*\.\(c\|h\|cpp\)' | xargs -P8 -n1 clang-format --style=file -i

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10091>
2021-04-10 03:31:58 +02:00
Jason Ekstrand 117668b811 nir: Make nir_ssa_def_rewrite_uses take an SSA value
This commit replaces the new_src parameter of nir_ssa_def_rewrite_uses()
with an SSA def, removes nir_ssa_def_rewrite_uses_ssa(), and rewrites
all the users as needed.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9383>
2021-03-08 16:59:55 +00:00
Bas Nieuwenhuizen d9d9acd3ea radv: Start using util_format_description for everything.
Steps:

git reset --hard
sed -i 's/struct vk_format_description \*/struct util_format_description \*/g' *.{c,h}
sed -i 's/VK_FORMAT_COLORSPACE/UTIL_FORMAT_COLORSPACE/g' *.c
sed -i 's/= VK_FORMAT_COLORSPACE/= UTIL_FORMAT_COLORSPACE/g' *.h
sed -i 's/enum vk_format_colorspace /enum util_format_colorspace /g' *.h
sed -i 's/VK_FORMAT_TYPE/UTIL_FORMAT_TYPE/g' *.c
sed -i 's/VK_FORMAT_LAYOUT/UTIL_FORMAT_LAYOUT/g' *.c
sed -i 's/vk_format_channel_description/util_format_channel_description/g' *.c
sed -i 's/vk_format_description(/vk_format_description_legacy(/g' *.py
sed -i 's/const struct vk_format_description \*/static const struct vk_format_description \*/g' *.py

Then manually:

1) Rename the vk_format_colorspace definition back (only want the uses renamed)
2) Fix the desc->format == VK_FORMAT_... warnings
3) Add vk_format_description implementation (and remove warning pragmas)

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8797>
2021-02-13 21:47:17 +00:00
Bas Nieuwenhuizen 7cf8c4f683 radv: Do no use vk_format for getting divisors.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8797>
2021-02-13 21:47:16 +00:00
Bas Nieuwenhuizen abb2b43c9c radv: Remove VK_SWIZZLE_*.
Values are the same as PIPE_SWIZZLE_*.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8797>
2021-02-13 21:47:16 +00:00
Connor Abbott 219b84fd5f radv/meta: Use sized types for nir_tex_instr::dest_type
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7989>
2021-01-25 11:21:42 +01:00
Jonathan Marek 064d39e620 radv: use common nir_convert_ycbcr
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: D Scott Phillips <d.scott.phillips@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4528>
2020-04-20 22:01:43 +00:00
Jason Ekstrand 349898a967 nir: Drop nir_tex_instr::texture_array_size
It's set by lots of things and we spend a lot of time maintaining it but
no one actually uses the value for anything useful.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3940>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3940>
2020-02-26 18:29:49 +00:00
Bas Nieuwenhuizen 5692351264 radv: Implement cosited_even sampling.
Apparently cosited_even was the required one instead of midpoint.

This adds slight offset of 0.5 pixels to the coordinates (+ we need
the image size to convert to normalized coords)

Fixes: 91702374d5 "radv: Add ycbcr lowering pass."
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2019-05-06 11:09:30 +00:00
Bas Nieuwenhuizen aab201635e radv: Set is_array in lowered ycbcr tex instructions.
Fixes array tests.

Fixes: 91702374d5 "radv: Add ycbcr lowering pass."
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2019-05-02 02:29:51 +02:00
Bas Nieuwenhuizen 91702374d5 radv: Add ycbcr lowering pass.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2019-04-25 19:56:20 +00:00