freedreno/a6xx: Add ARB_depth_clamp and separate clamp support. Passes piglit depth_clamp, depth-clamp-range, amd_depth_clamp_separate_range. This is part of enabling GL 3.2 (the other is bumping PIPE_CAP_GLSL_FEATURE_LEVEL, which I'm hoping to do once we have the KHR-GL* testing in place). Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6544>
freedreno: add env var to override GMEM size Sometimes it is useful to force a smaller size while debugging. Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6461>
freedreno: Drop UNIFORM_BUFFER_OFFSET_ALIGNMENT to 32 This is the value exposed by the a3xx-a4xx drivers according to an official Adreno OpenGL ES Developer guide I found, and also a report I saw for a5xx while googling. Fixes renderdoc replay of a manhattan31 trace captured on a Pixel 3a. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6416>
freedreno: support GL_EXT_semaphore Signed-off-by: Hyunjun Ko <zzoon@igalia.com> Reviewed-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4565>
freedreno: Enable GL_EXT_memory_object and GL_EXT_memory_object_fd Reviewed-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4565>
freedreno: Implement pipe screen's get_device/driver_uuid() v2: Don't need to prefix included uuid headers path with 'freedreno'. (Rob Clark) Reviewed-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4565>
gallium: replace 16BIT_TEMPS cap with 16BIT_CONSTS All drivers that support mediump lowering should support 16BIT_TEMPS, but some do not also want 16b consts to be lowered. Replace the pipe cap in preperation to remove LowerPrecisionTemporaries. Note: also updates reference checksums for the arm64_a630_traces job, due to lowering more to 16b Signed-off-by: Rob Clark <robdclark@chromium.org> Reviewed-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/6189>
freedreno: whitespace fix Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5957>
gallium: add PIPE_SHADER_CAP_GLSL_16BIT_TEMPS for LowerPrecisionTemporaries Reviewed-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5746>
a4xx: add polygon offset clamp, fix units For some reason, in order to get all tests to pass, pretty much all hardware (across vendors) has to program in offset_units * 2. This fixes dEQP-GLES3.functional.polygon_offset.float32_displacement_with_units. While we're at it, add polygon offset clamp support. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5763>
freedreno/ir3: fix/rework tess levels The previous version assumes tess level outputs will only be written once in the shader, however its not possible to guarantee that. It also assumes all invocations will write all the levels, which is also not guaranteed. This is required to fix the "tesselation" and "terraintessellation" demos with turnip. The comment about nir_lower_io_to_temporaries in lower_tess_ctrl_block is removed because nir_lower_io_to_temporaries specifically skips TESS_CTRL shaders so the comment doesn't make sense. The split load for tess levels workaround is removed, the new version only has scalar access unless if ever gets vectorized. This sets NIR_COMPACT_ARRAYS cap to avoid the glsl tess vec lowering with gallium. It seems this will also disable "LowerCombinedClipCullDistance", which I'm not sure was needed or not. Signed-off-by: Jonathan Marek <jonathan@marek.ca> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5744>
freedreno/ir3: disk-cache support Adds a shader disk-cache for ir3 shader variants. Note that builds with `-Dshader-cache=false` have no-op stubs with `disk_cache_create()` that returns NULL. Binning pass variants are serialized together with their draw-pass counterparts, due to shared const-state. Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5372>
freedreno/ir3: add ir3_compiler_destroy() Use ir3_compiler_destroy() rather than open-coding ralloc_free(). This will give us a place to add more compiler related cleanup code in the following patches. Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5372>
freedreno/ir3: switch PIPE_CAP_TGSI_TEXCOORD We don't really need the varying remapping, and it seems to somehow happen twice when shader-cache comes into the picture. But we can just choose not to have this problem. Now that everything is using the ir3_point_sprite() helper, we can flip this pipe cap without it being a massive flag-day. Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5595>
gallium: Add pipe cap for primitive restart with fixed index Adds PIPE_CAP_PRIMITIVE_RESTART_FIXED_INDEX which is a subset of the primitive restart cap for when the hardware can only support the fixed indices specified in GLES. The switch statements were automatically modified with this command: find \( \( -name \*.cpp -o -name \*.c \) \! -type l \) \ -exec sed -i -r \ 's/^(\s*case\s+PIPE_CAP_PRIMITIVE_RESTART)\s*:.*$/\0\n\1_FIXED_INDEX:/' \ {} \; v2: Add a note in screen.rst Reviewed-by: Eric Anholt <eric@anholt.net> (v1) Reviewed by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5559>
freedreno/a6xx: Turn on robustness extensions With UBO access going through LDC, all memory access uses buffer based io primitives. We can then advertise PIPE_CAP_ROBUST_BUFFER_ACCESS_BEHAVIOR and PIPE_CAP_DEVICE_RESET_STATUS_QUERY, which turn on GL_EXT_robustness, GL_KHR_robust_buffer_access_behavior and GL_KHR_robustness. Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5319>
gallium: add shader caps INT16 and FP16_DERIVATIVES Reviewed-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002>
freedreno: add batch debugging Something I cooked up in the process of debugging the issue fixed in the next commit. Might come in useful again in the future. Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5188>
freedreno: add adreno 650 Signed-off-by: Jonathan Marek <jonathan@marek.ca> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4611>
freedreno/a6xx: split up gmem/tile alignment requirements RB_BLIT has a granularity of 16x4, but tile sizes must be 32x16 aligned. Signed-off-by: Jonathan Marek <jonathan@marek.ca> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4611>