gallium: rename 'state tracker' to 'frontend' Acked-by: Eric Anholt <eric@anholt.net> Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4902>
gallium: add pipe cap for scissored clears and pass scissor state to clear() hook this adds a new pipe cap that drivers can support which enables passing buffer clears with scissor test enabled through to be handled by the driver instead of having mesa draw a quad also adjust all existing clear() hooks to have the new parameter Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com> Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4310>
gallium: pass cso_velems_state into cso_context instead of pipe_vertex_element This removes one memcpy from the CSO hashing code. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3990>
softpipe: Refactor pipe_get/put_tile_rgba_* paths. We always want the same behavior of choosing which unpack to do to generate our 4x32-bit RGBA values, so just sink that choice down below the pipe_get/put_tile API. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2744>
util: Move gallium's PIPE_FORMAT utils to /util/format/ To make PIPE_FORMATs usable from non-gallium parts of Mesa, I want to move their helpers out of gallium. Since u_format used util_copy_rect(), I moved that in there, too. I've put it in a separate directory in util/ because it's a big chunk of related code, and it's not clear to me whether we might want it as a separate library from libmesa_util at some point. Closes: #1905 Acked-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
gallium/u_tests: test NV12 allocation and export Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
util: use standard name for vsnprintf() Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Anholt <eric@anholt.net>
util: use standard name for snprintf() Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Anholt <eric@anholt.net>
gallium: Change PIPE_CAP_TGSI_FS_FBFETCH bool to PIPE_CAP_FBFETCH count TGSI's FBFETCH instruction currently only supports reading from a single render target, but NIR intrinsics can support multiple render targets. radeonsi can only support fetching from RT 0, but other drivers may be able to support fetching from any render target. To express this, this patch renames PIPE_CAP_TGSI_FS_FBFETCH to simply PIPE_CAP_FBFETCH, and converts it from a boolean "is FBFETCH supported?" to an integer number of render targets which can be fetched. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
gallium/u_tests: use a compute-only context to test GCN compute ring
gallium: Remove unused variable in u_tests. Fixes: 0d17b685b1ff ("gallium/u_tests: add a compute shader test that clears an image") Reviewed-by: Marek Olšák <marek.olsak@amd.com>
gallium/u_tests: fix MSVC build by using old-style zero initializers
gallium/u_tests: add a compute shader test that clears an image
gallium: split depth_clip into depth_clip_near & depth_clip_far for AMD_depth_clamp_separate.
gallium/aux/util: use util_snprintf() in test_texture_barrier Instead of plain snprintf(). To fix the MSVC 2013 build: Compiling src\gallium\auxiliary\util\u_tests.c ... u_tests.c src\gallium\auxiliary\util\u_tests.c(624) : warning C4013: 'snprintf' undefined; assuming extern returning int ... gallium.lib(u_tests.obj) : error LNK2019: unresolved external symbol _snprintf referenced in function _test_texture_barrier build\windows-x86-debug\gallium\targets\graw-gdi\graw.dll : fatal error LNK1120: 1 unresolved externals scons: *** [build\windows-x86-debug\gallium\targets\graw-gdi\graw.dll] Error 1120 scons: building terminated because of errors. Fixes: 56342c97ee7 ("gallium/u_tests: test FBFETCH and shader-based blending with MSAA") Cc: Marek Olšák <marek.olsak@amd.com> Cc: Brian Paul <brianp@vmware.com> Cc: Roland Scheidegger <sroland@vmware.com> Cc: Dieter Nützel <Dieter@nuetzel-hh.de> Signed-off-by: Andres Gomez <agomez@igalia.com> Reviewed-by: Brian Paul <brianp@vmware.com>
gallium: add pipe_resource::nr_storage_samples, and set it same as nr_samples Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
gallium/aux/util: Fix some warnings util/u_cpu_detect.c: In function 'util_cpu_detect': util/u_cpu_detect.c:377:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (util_cpu_caps.nr_cpus == ~0u) ^~ util/u_hash_table.c:274:21: warning: unused parameter 'k' [-Wunused- parameter] util_hash_inc(void *k, void *v, void *d) ^ util/u_hash_table.c:274:30: warning: unused parameter 'v' [-Wunused- parameter] util_hash_inc(void *k, void *v, void *d) ^ util/u_tests.c: In function 'test_texture_barrier': util/u_tests.c:652:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < num_samples / 2; i++) { ^ Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
gallium/u_tests: test FBFETCH and shader-based blending with MSAA Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
gallium/util: s/uint/enum tgsi_semantic/ in simple shader code Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
gallium: add type parameter to create_fence_fd An fd can potentially have different types of objects backing it. Specifying the type helps us make sure we treat the FD correctly. This is in preparation to allow importing syncobj fence FDs in addition to native sync FDs. Signed-off-by: Andres Rodriguez <andresx7@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>