Alyssa Rosenzweig [Fri, 2 Oct 2020 16:27:25 +0000 (12:27 -0400)]
pan/bi: Add copy for register COMBINEs
Fixes:
dEQP-GLES2.functional.shaders.loops.for_constant_iterations.infinite_with_conditional_break_fragment
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7081>
Christian Gmeiner [Fri, 9 Oct 2020 09:00:23 +0000 (11:00 +0200)]
ci: piglit: conditionally build OpenCL tests
For baremetal piglit this is not yet needed.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7075>
Jose Maria Casanova Crespo [Fri, 9 Oct 2020 16:40:45 +0000 (18:40 +0200)]
vc4: Enable lower_umax and lower_umin
VC4 doesn't have support for UMAX and UMIN integer operations. So
we should avoid algebraic optimizations that generate umax/umin ops.
Fixes:
8e1b75b330954a ("nir/algebraic: optimize iand/ior of (n)eq zero")
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7083>
Jose Maria Casanova Crespo [Fri, 9 Oct 2020 16:33:26 +0000 (18:33 +0200)]
nir/algebraic: optimize iand/ior of (n)eq zero when umax/umin not available
Before
8e1b75b330954a ("nir/algebraic: optimize iand/ior of (n)eq zero") this
optimization didn't need the use of umax/umin. VC4 HW supports only signed
integer max/min operations.
lower_umin and lower_umax are added to allow enabling previous optimizations
behaviour for this cases.
Fixes:
8e1b75b330954a ("nir/algebraic: optimize iand/ior of (n)eq zero")
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7083>
Icecream95 [Fri, 9 Oct 2020 09:39:40 +0000 (22:39 +1300)]
panfrost: Add a debug flag to disable AFBC
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7076>
Marek Olšák [Tue, 6 Oct 2020 10:51:36 +0000 (06:51 -0400)]
radeonsi: disable SDMA on gfx6-7 and gfx10.3 to decrease CPU overhead
same as gfx8-10
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7055>
Marek Olšák [Mon, 5 Oct 2020 04:55:55 +0000 (00:55 -0400)]
radeonsi: update the DMA perf test
- don't test 2 waves/SA
- create the compute shader only once per subtest
- use only 1 TIME_ELAPSED query per subtest
- don't invalidate sL0 (it's not used)
- don't invalidate L2 for L2_LRU to test L2 throughput
- don't flush the CS after every run
- remove unused min/max computation
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7055>
Marek Olšák [Mon, 5 Oct 2020 05:06:33 +0000 (01:06 -0400)]
winsys/amdgpu: apply the VM alignment optimization to the physical alignment too
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7055>
Marek Olšák [Mon, 5 Oct 2020 05:05:44 +0000 (01:05 -0400)]
winsys/amdgpu: rework the VM alignment optimizations
- don't increase the alignment past 2 MB
- apply the second tweak to older chips too
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7055>
Marek Olšák [Tue, 6 Oct 2020 11:06:30 +0000 (07:06 -0400)]
ac/surface: fix valgrind warnings in DCC retile tile lookups
==12920== Conditional jump or move depends on uninitialised value(s)
==12920== at 0x8F39391: util_fast_urem32 (fast_urem_by_const.h:71)
==12920== by 0x8F39391: hash_table_search (hash_table.c:285)
==12920== by 0x8B06D5D: ac_compute_dcc_retile_tile_indices (ac_surface.c:136)
Fixes:
a37aeb128d5f7c "amd/common: Cache intra-tile addresses for retile map."
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7055>
Dave Airlie [Fri, 9 Oct 2020 02:07:31 +0000 (12:07 +1000)]
CI: build our own spirv tools
This causes a lot of hiccups on the CL tests, but I've got most of
them fixed in another MR in pieces.
This should at least give a much more realistic baseline.
v2: use script in both places
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7073>
Dave Airlie [Fri, 9 Oct 2020 19:53:12 +0000 (05:53 +1000)]
ci: fix deqp clone + fetch
This was taking > 10 minutes and I got bored, don't do a depth 1 fetch
in the first place just to do a proper fetch later.
Acked-by: Eric Anholt <eric@anholt.net>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7073>
John Bates [Thu, 1 Oct 2020 01:35:02 +0000 (18:35 -0700)]
disk_cache: build option for disabled-by-default
On some systems it is problematic to have the shader cache enabled
by default. This adds a build option to support the disk cache but
keep it disabled unless the environment variable
MESA_GLSL_CACHE_DISABLE=false.
For example, on Chrome OS, Chrome already has it's own shader
disk cache implementation so it disables the mesa feature. Tests
do not want the shader disk cache enabled because it can cause
inconsistent performance results and the default 1GB for the
disk cache could lead to problems that require more effort to
work around. The Mesa shader disk cache is useful for VMs though,
where it is easy to configure the feature with environment
variables. With the current version of Mesa, Chrome OS would need
to have a system-wide environment variable to disable the disk
cache everywhere except where needed. More elegant to just build
Mesa with the cache feature disabled by default.
Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6967>
Rhys Perry [Mon, 21 Sep 2020 14:56:40 +0000 (15:56 +0100)]
radv: use radv_optimize_nir() less in radv_link_shaders()
fossil-db (Navi):
Totals from 11 (0.01% of 137413) affected shaders:
CodeSize: 99372 -> 99480 (+0.11%)
Instrs: 19119 -> 19110 (-0.05%)
Cycles: 222144 -> 222000 (-0.06%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6891>
Rhys Perry [Mon, 21 Sep 2020 13:32:36 +0000 (14:32 +0100)]
radv: move optimizations in shader_compile_to_nir() to after io_to_scalar
This results in at least one less radv_optimize_nir() iteration.
No fossil-db changes.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6891>
Rhys Perry [Mon, 21 Sep 2020 14:56:25 +0000 (15:56 +0100)]
nir: return progress from nir_lower_io_to_scalar_early
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6891>
Boris Brezillon [Thu, 8 Oct 2020 12:17:23 +0000 (14:17 +0200)]
panfrost: Move the blend shader cache at the context level
Blend shaders can be shared among blend states, so let's move the blend
shader one level up so we don't have to re-create/re-compile shaders
when another blend state already asked for it.
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/7066>
Boris Brezillon [Thu, 8 Oct 2020 08:58:53 +0000 (10:58 +0200)]
panfrost: Get rid of the constant patching done on blend shader binaries
When constants are used in the blend equation we simply recompile the
shader.
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/7066>
Boris Brezillon [Thu, 8 Oct 2020 08:52:30 +0000 (10:52 +0200)]
panfrost: Let compile_blend_shader() allocate the blend shader object
This way we avoid an extra copy in panfrost_get_blend_shader().
Note that the allocation is attached to the blend state object
which simplifies the delete_blend_state() 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/7066>
Boris Brezillon [Thu, 8 Oct 2020 08:20:45 +0000 (10:20 +0200)]
panfrost: Don't leak NIR blend shaders
Right now we create shaders that are not attached to any memory
context, leading to memory leaks. Ideally, we should free the NIR
shader as soon as we've turned it into a binary, but there's no
function explicitly destroy a shader. Let's attach those to the blend
state so they get destroyed when this state is freed.
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/7066>
Boris Brezillon [Thu, 8 Oct 2020 08:49:12 +0000 (10:49 +0200)]
panfrost: Allocate blit_blend with ralloc()
This way we can use blend states as memory context which will help
simplify the blend shader creation/destruction logic.
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/7066>
Boris Brezillon [Thu, 8 Oct 2020 08:09:56 +0000 (10:09 +0200)]
panfrost: Pass compile arguments through a struct
So we can extend it more easily without having to patch all callers.
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/7066>
Boris Brezillon [Thu, 8 Oct 2020 08:25:13 +0000 (10:25 +0200)]
panfrost: Move the blend constant mask extraction out of make_fixed_blend_mode()
This way we can get a constant mask for the blend shader case too.
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/7066>
Boris Brezillon [Thu, 8 Oct 2020 08:04:48 +0000 (10:04 +0200)]
panfrost: Constify the rt_fmts arg passed to pan_lower_framebuffer()
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/7066>
Bas Nieuwenhuizen [Mon, 5 Oct 2020 11:45:36 +0000 (13:45 +0200)]
radv: Set fce metadata correctly on DCC initialization.
The fce metadata can always be set to false as we don't care about
the compressed clear color.
Avoiding useless fast clear eliminates improves basemark performance by
1%-1.5%.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7005>
Timur Kristóf [Mon, 5 Oct 2020 13:30:18 +0000 (15:30 +0200)]
aco/ngg: Calculate workgroup size of NGG shaders.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964>
Timur Kristóf [Fri, 2 Oct 2020 15:10:43 +0000 (17:10 +0200)]
aco/ngg: Allocate NGG GS space early for const vertex/primitive counts.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964>
Timur Kristóf [Fri, 2 Oct 2020 12:31:40 +0000 (14:31 +0200)]
aco/ngg: Use more efficient LDS layout to help reduce bank conflicts.
The LLVM backend has a trick which helps reduce LDS bank conflicts
by swizzling the LDS address where each vertex is emitted.
This commit implements the same thing for ACO.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964>
Timur Kristóf [Thu, 1 Oct 2020 14:59:18 +0000 (16:59 +0200)]
radv/aco: Enable NGG GS by default.
ACO NGG GS now supports everything we need except streamout
(aka. transform feedback), but we don't use NGG anyway when
streamout is needed.
Also add a note to the new features txt.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964>
Timur Kristóf [Thu, 1 Oct 2020 11:50:43 +0000 (13:50 +0200)]
aco/ngg: Add shader query support to NGG GS.
In each GS thread, we calculate the number of "real" primitives that
were emitted (points, lines, triangles, not strips). Then we
accumulate the number of "real" primitives emitted by the
entire threadgroup in GDS.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964>
Timur Kristóf [Fri, 2 Oct 2020 08:29:27 +0000 (10:29 +0200)]
aco/ngg: Place workgroup barrier outside control flow for NGG GS.
Merged shaders have a workgroup barrier which makes sure that
the first half is completed in every wave before the 2nd half
is started.
This barrier is located in divergent control flow, so that waves
that don't have any invocations in the 2nd half can finish as early
as possible. This is problematic for NGG GS because it has more
workgroup barriers after the 2nd half.
So, for NGG GS we need to put the barrier outside
control flow because otherwise the waves that have 0 GS threads
won't be able to wait for the waves which have non-zero GS threads.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964>
Timur Kristóf [Fri, 2 Oct 2020 08:29:06 +0000 (10:29 +0200)]
aco/ngg: Implement NGG GS output.
We store emitted GS vertices in LDS.
Then, at the end of the shader, the emitted vertices are compacted
and each thread loads a single vertex from LDS in order to export
a primitive as needed, and the vertex attributes.
The reason this is done is because there is an impedance mismatch
between how API GS and the NGG HW works. API GS can emit an arbitrary
number of vertices and primites in each thread, but NGG HW can only
export one vertex per thread.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964>
Timur Kristóf [Thu, 10 Sep 2020 16:37:01 +0000 (18:37 +0200)]
aco/ngg: Implement workgroup reduce / exclusive scan for NGG GS.
This function calculates two things at once:
1. The total number of vertices emitted by the threadgroup.
2. Exclusive scan of emitted vertex count accross the threadgroup.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964>
Timur Kristóf [Thu, 10 Sep 2020 16:36:04 +0000 (18:36 +0200)]
aco/ngg: Create LDS layout for NGG GS.
For NGG GS, we need to store the following in LDS:
1. The ESGS ring, similarly to legacy ESGS.
2. Emitted vertices from the GS threads.
3. Temporary space used by the workgroup scan.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964>
Timur Kristóf [Thu, 10 Sep 2020 16:36:27 +0000 (18:36 +0200)]
aco/ngg: Setup NGG GS.
Make it possible for ACO to recognize when to use HW NGG GS.
Also add a few notes about the various GS stages in the comments.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964>
Timur Kristóf [Mon, 14 Sep 2020 07:58:56 +0000 (09:58 +0200)]
aco/ngg: Allow NGG GS to create VS exports.
NGG GS need to use the same instructions to export vertex
attributes at the end.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964>
Timur Kristóf [Mon, 14 Sep 2020 07:58:38 +0000 (09:58 +0200)]
aco/ngg: Allow NGG GS to load per-vertex GS inputs.
They work the same way as in legacy GS, so we can reuse that.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964>
Timur Kristóf [Wed, 30 Sep 2020 12:41:54 +0000 (14:41 +0200)]
aco/ngg: Allow NGG GS to store ES outputs.
We can reuse the existing ES output code.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964>
Timur Kristóf [Thu, 1 Oct 2020 16:32:37 +0000 (18:32 +0200)]
aco/ngg: Clean up and reorganize NGG VS/TES code.
Make the NGG VS/TES code easier to follow, give better names to
some functions and make ngg_nogs_early_prim_export a variable.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964>
Timur Kristóf [Tue, 29 Sep 2020 22:41:12 +0000 (00:41 +0200)]
aco/ngg: Make primitive export packing less prone to error.
Use lshl_or instead of lshl_add, which makes it more robust in
handling -1 and -2 indices which will now just become null
exports, which is what we want.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964>
Timur Kristóf [Thu, 10 Sep 2020 16:34:18 +0000 (18:34 +0200)]
aco/ngg: Refactor ngg_emit_prim_export in preparation for NGG GS.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964>
Timur Kristóf [Fri, 4 Sep 2020 11:38:25 +0000 (13:38 +0200)]
aco/ngg: Refactor gs_alloc_req in preparation for NGG GS.
Previously, this function inferred the vertex and primitive counts
from the gs_tg_info shader argument, but in case of NGG GS, it will
need to be calculated in runtime.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964>
Timur Kristóf [Thu, 24 Sep 2020 14:01:18 +0000 (16:01 +0200)]
aco: Add wave-specific opcode for s_lshl and s_flbit.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964>
Timur Kristóf [Tue, 29 Sep 2020 16:06:44 +0000 (18:06 +0200)]
aco: Optimize thread_id_in_threadgroup when there is just one wave.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964>
Timur Kristóf [Wed, 30 Sep 2020 12:42:03 +0000 (14:42 +0200)]
aco: Use thread_id_in_threadgroup helper for ES outputs.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964>
Timur Kristóf [Fri, 4 Sep 2020 11:35:47 +0000 (13:35 +0200)]
aco: Extract thread_id_in_threadgroup to a separate function.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964>
Timur Kristóf [Mon, 14 Sep 2020 08:04:40 +0000 (10:04 +0200)]
aco: Extract lanecount_to_mask to a separate function.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964>
Timur Kristóf [Mon, 14 Sep 2020 07:39:34 +0000 (09:39 +0200)]
aco: Clarify missing export error message in assembler.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964>
Rhys Perry [Mon, 13 Jul 2020 10:52:14 +0000 (11:52 +0100)]
aco: Add loop creation helpers.
Will be useful for NGG GS and probably testing. The helpers take care of
divergence but not creating correct phis.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964>
Timur Kristóf [Mon, 5 Oct 2020 17:35:14 +0000 (19:35 +0200)]
radv/aco: Use new GS lowering options for ACO with NGG GS.
This makes it easier for ACO to implement NGG GS:
1. No need to keep track of vertex and primitive counts.
2. No need to discard incomplete primitives.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964>
Timur Kristóf [Fri, 2 Oct 2020 14:10:38 +0000 (16:10 +0200)]
nir: Add ability to count primitives per stream.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964>
Timur Kristóf [Fri, 2 Oct 2020 13:55:32 +0000 (15:55 +0200)]
nir: Count vertices per stream.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964>
Timur Kristóf [Wed, 15 Jul 2020 11:44:39 +0000 (13:44 +0200)]
nir: Add ability to overwrite incomplete GS primitives.
After each end_primitive and at the end of the shader before emitting
set_vertex_and_primitive_count, we check if the primitive that is being
emitted has enough vertices or not, and we adjust the vertex and
primitive counters accordingly.
As a result, if the backend uses this option, the backend compiler
will not have to worry about discarding the unneeded vertices
and primitives.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964>
Timur Kristóf [Tue, 16 Jun 2020 16:58:39 +0000 (18:58 +0200)]
nir: Add ability to count emitted GS vertices per primitive.
Add an option to nir_lower_gs_intrinsics so that it can also track
the number of emitted vertices per primitive, not just the total
vertex count.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964>
Timur Kristóf [Mon, 8 Jun 2020 10:16:13 +0000 (12:16 +0200)]
nir: Add ability to count emitted GS primitives.
Add an option to nir_lower_gs_intrinsics which tells it to track
the number of emitted primitives, not just vertices. Additionally,
also make it per-stream.
Also rename the set_vertex_count intrinsic to
set_vertex_and_primitive_count.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6964>
Greg V [Tue, 30 Oct 2018 17:38:03 +0000 (20:38 +0300)]
radv,anv: use CLOCK_MONOTONIC_FAST when CLOCK_MONOTONIC_RAW is undefined
CLOCK_MONOTONIC_FAST is a similar clock from FreeBSD.
Acked-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6995>
Emmanuel Vadot [Sun, 4 Oct 2020 09:00:49 +0000 (11:00 +0200)]
util/os_misc: os_get_available_system_memory() for FreeBSD
Based on the OpenBSD variant.
The only difference between those two system is the sysctl mib.
Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6995>
Samuel Pitoiset [Wed, 30 Sep 2020 13:26:41 +0000 (15:26 +0200)]
radv: use the same NIR compiler options for both compiler backends
No changes, they are already similar.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6938>
Samuel Pitoiset [Wed, 30 Sep 2020 13:19:59 +0000 (15:19 +0200)]
radv/llvm: do not lower sub
To match ACO.
Totals from 268 (0.20% of 136420) affected shaders:
CodeSize: 1214060 -> 1214096 (+0.00%); split: -0.05%, +0.06%
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6938>
Andreas Baierl [Wed, 7 Oct 2020 11:44:09 +0000 (13:44 +0200)]
lima/parser: Fix varyings decoding in RSW
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7044>
Samuel Pitoiset [Fri, 2 Oct 2020 09:06:50 +0000 (11:06 +0200)]
aco: dump the program if the disassembler failed
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6979>
Dave Airlie [Wed, 7 Oct 2020 20:11:35 +0000 (06:11 +1000)]
clover: don't call validate spirv at all if not needed
Suggested on irc seems like a good plan.
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7051>
Timothy Arceri [Thu, 8 Oct 2020 01:45:31 +0000 (12:45 +1100)]
util/disk_cache: remove unused function param
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7059>
Vinson Lee [Wed, 30 Sep 2020 00:48:31 +0000 (17:48 -0700)]
swr/rasterizer: Remove BuilderGfxMem member mpTrackMemAccessFuncTy.
mpTrackMemAccessFuncTy is not used anywhere.
Fix defect reported by Coverity Scan.
Uninitialized pointer field (UNINIT_CTOR)
uninit_member: Non-static class member mpTrackMemAccessFuncTy is not
initialized in this constructor nor in any functions that it calls.
Suggested-by: Jan Zielinski <jan.zielinski@intel.com>
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Jan Zielinski <jan.zielinski@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6930>
Vinson Lee [Tue, 6 Oct 2020 07:04:57 +0000 (00:04 -0700)]
meson: Use more portable compiler option -std.
GCC and Clang support --std and -std options but Intel C++
Compiler only supports -std.
icpc: command line warning #10159: invalid argument for option '--std'
Fixes:
8a05d6ffc65d ("driconf: Make the driver's declarations be structs instead of XML.")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7020>
Eric Anholt [Tue, 22 Sep 2020 18:05:14 +0000 (11:05 -0700)]
turnip: Add support for GetSwapchainGrallocUsage2ANDROID().
This is lifted straight from anv, which seems like a reasonable way to go.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7015>
Eric Anholt [Mon, 5 Oct 2020 21:54:52 +0000 (14:54 -0700)]
turnip: Detect Qualcomm gralloc and its UBWC flag on gralloc surfaces.
And document where to find information on qcom gralloc's private handle
layout. I chose not to #include the gralloc_priv because it seems that
there's not much we need yet, and I'm hoping we can avoid the build-time
dependency on the specific platform.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7015>
Eric Anholt [Tue, 22 Sep 2020 17:33:32 +0000 (10:33 -0700)]
turnip/kgsl: Add support for importing dma-bufs.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7015>
Eric Anholt [Mon, 5 Oct 2020 23:02:05 +0000 (16:02 -0700)]
turnip/kgsl: Fix last minute breakage of the build.
Need to land KGSL in CI!
Fixes:
8163c818e32e ("turnip: implement timestamp fences/semaphores for kgsl backend")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7015>
Nanley Chery [Wed, 7 Oct 2020 21:27:57 +0000 (14:27 -0700)]
Revert "anv: Add driconf option to disable compression for 16bpp format"
This reverts commit
bcfec61d1ee2675b8aaaf3adec8109ce6fa6c003.
The previous patch fixed the underlying issue that the above commit was
actually working around. It turns out that the previously observed
performance regression was due to invalid aux-map entries for
multi-layer HiZ+CCS buffers.
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7046>
Nanley Chery [Wed, 7 Oct 2020 15:36:28 +0000 (08:36 -0700)]
anv: Enable multi-layer aux-map init for HIZ+CCS
Fixes rendering corruption in the shadowmappingcascade Sascha Willems
Vulkan demo. To see the corruption, I adjusted the demo options as
follows:
1. Enable "Display depth map"
2. Set "Split lambda" to 0.100
3. Make "Cascade" non-zero.
Fixes:
80ffbe915fe ("anv: Add support for HiZ+CCS")
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7046>
Eric Anholt [Tue, 6 Oct 2020 20:39:32 +0000 (13:39 -0700)]
freedreno/ir3: Don't leave holes the UBO upload plan.
Shaders may not use a particular region of a UBO in a given shader (think
UBOs shared between stages, or between shaders), and by just always
extending the existing range for a given UBO, we'd waste bandwidth
uploading it, and also waste our precious const space in storing the
unused data.
Instead, only upload exactly the ranges we can use, and merge ranges when
they're neighbors. We may end up with more upload packets, but the
bandwidth savings is surely going to be worth it (and if find we want a
distance threshold for merging with nearby uploads, that would be easy to
add).
total instructions in shared programs: 9266114 -> 9255092 (-0.12%)
total full in shared programs: 343162 -> 341709 (-0.42%)
total constlen in shared programs: 1454368 -> 1275236 (-12.32%)
total cat6 in shared programs: 93073 -> 82589 (-11.26%)
total (ss) in shared programs: 212402 -> 206404 (-2.82%)
total (sy) in shared programs: 122905 -> 114007 (-7.24%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7036>
Eric Anholt [Tue, 6 Oct 2020 20:06:13 +0000 (13:06 -0700)]
freedreno/ir3: Clean up the UBO upload plan setup.
No more start > end for signaling that the slot isn't used, no more funny
setup of num_enabled.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7036>
Eric Anholt [Thu, 8 Oct 2020 16:57:06 +0000 (09:57 -0700)]
ci/softpipe: Add another flaky GS test to the skips list.
We've seen the new GS flake once or twice a week for a long time.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7070>
Mike Blumenkrantz [Tue, 6 Oct 2020 20:30:47 +0000 (16:30 -0400)]
util/hash_table: add function for reserving size in a hash table
rehashing a populated hash table is very expensive, so for the case where
the maximum/likely table size is already known, this function allows for
pre-sizing the table to avoid ever needing a rehash
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7037>
Jason Ekstrand [Thu, 8 Oct 2020 14:57:14 +0000 (09:57 -0500)]
nir/opt_deref: Fix the vector bitcast optimization
It assumes the parent is a vector or scalar so we need to fail if it
isn't.
Fixes:
9190f82d573c "nir/opt_deref: Add an optimization for bitcasts"
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7064>
Jason Ekstrand [Thu, 8 Oct 2020 15:41:31 +0000 (10:41 -0500)]
clover: Stop leaking NIR shaders
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7068>
Andrii Simiklit [Tue, 6 Oct 2020 07:04:55 +0000 (10:04 +0300)]
util/xmlconfig: eliminate memory leak
It fixes coverity issue: CID 1467703: (RESOURCE_LEAK):
`Variable "cp" going out of scope leaks the storage it points to.`
Fixes:
23c3eb1fe16 ("driconf: Delete disjoint range support")
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7021>
Samuel Pitoiset [Mon, 5 Oct 2020 12:57:15 +0000 (14:57 +0200)]
radv/llvm: remove dead code for 64-bit GS inputs
64-bit IO are lowered with NIR.
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/7008>
Samuel Pitoiset [Mon, 5 Oct 2020 11:09:58 +0000 (13:09 +0200)]
radv/llvm: do not lower nir_op_fsat
To match ACO.
fossilds-db (Navi10):
Totals from 20869 (15.30% of 136420) affected shaders:
SGPRs: 1851128 -> 1851920 (+0.04%); split: -0.41%, +0.46%
VGPRs: 1607360 -> 1608212 (+0.05%); split: -0.20%, +0.25%
SpillSGPRs: 267331 -> 261350 (-2.24%); split: -3.67%, +1.43%
CodeSize:
155460104 ->
155303508 (-0.10%); split: -0.21%, +0.11%
MaxWaves: 179156 -> 178928 (-0.13%); split: +0.48%, -0.60%
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/6932>
Samuel Pitoiset [Wed, 30 Sep 2020 08:48:29 +0000 (10:48 +0200)]
ac/nir: implement nir_op_fsat
With fmed3 if available, otherwise fallback to fmin/fmax.
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/6932>
Tomeu Vizoso [Mon, 5 Oct 2020 13:57:58 +0000 (15:57 +0200)]
ci: Disable pm_runtime and max clocks in LAVA jobs
To get more consistent performance and results, use the performance
devfreq governor and disable PM runtime.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7011>
Tomeu Vizoso [Mon, 5 Oct 2020 13:57:05 +0000 (15:57 +0200)]
ci: Test Panfrost on Khadas VIM3 boards
For testing Panfrost on Bifrost GPUs, add a job for dEQP GLES2 testing.
Right now almost all tests are skipped, but as we make progress and
things show stable, we'll be running more and more tests.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7011>
Tomeu Vizoso [Mon, 5 Oct 2020 07:14:11 +0000 (09:14 +0200)]
ci: Update kernel for LAVA
Update to v5.9-rc5-based drm-misc-for-next, so we can run jobs on
machines with Bifrost GPUs.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7011>
Kristian H. Kristensen [Mon, 28 Sep 2020 20:21:49 +0000 (20:21 +0000)]
freedreno/a6xx: Support PIPE_FORMAT_R8_G8B8_420_UNORM for texturing
This makes freedreno advertise support for
PIPE_FORMAT_R8_G8B8_420_UNORM on a6xx, which enables lowering NV12 to
this format.
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6693>
Kristian H. Kristensen [Wed, 7 Oct 2020 21:33:57 +0000 (21:33 +0000)]
freedreno/a6xx: Generalize pointers in struct fd6_pipe_sampler_view
Add resource pointers ptr1 and ptr2 and offsets offset1 and offset2,
and just emit relocs if the pointers are non-NULL. This lets us move
a little more logic to the CSO building.
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6693>
Kristian H. Kristensen [Mon, 28 Sep 2020 20:11:18 +0000 (20:11 +0000)]
st/mesa: Add NV12 lowering to PIPE_FORMAT_R8_G8B8_420_UNORM
Some GPUs can sample biplanar formats like NV12 natively, returning
the YUV values. Add a lowering type that uses that for sampling and
relies on existing colorspace conversions.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6693>
Kristian H. Kristensen [Mon, 28 Sep 2020 15:34:07 +0000 (15:34 +0000)]
util/formats: Add PIPE_FORMAT_R8_G8B8_420_UNORM
This is a planar, subsampled format. It's basically NV12, but without
colorspace conversion.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6693>
Jason Ekstrand [Sat, 22 Feb 2020 05:38:58 +0000 (23:38 -0600)]
iris: Use the data cache for indirect UBO pulls
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3932>
Jason Ekstrand [Fri, 21 Feb 2020 17:45:37 +0000 (11:45 -0600)]
anv: Use the data cache for indirect UBO pulls on Gen8+
On Gen7, the data cache is pretty terrible so we'd rather avoid it
there. On Gen8+, it should be fine and is less likely to conflict with
texturing so we should get less cache thrashing there.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3932>
Jason Ekstrand [Mon, 24 Feb 2020 21:51:41 +0000 (15:51 -0600)]
anv: Plumb the device into *bits_for_access_flags
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3932>
Jason Ekstrand [Fri, 21 Feb 2020 18:36:41 +0000 (12:36 -0600)]
anv: Use format_for_descriptor_type for descriptor buffers
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3932>
Jason Ekstrand [Fri, 21 Feb 2020 18:35:27 +0000 (12:35 -0600)]
anv: Add a device parameter to format_for_descriptor_type
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3932>
Jason Ekstrand [Fri, 21 Feb 2020 17:29:06 +0000 (11:29 -0600)]
intel/fs: Add an option to use dataport messages for UBOs
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3932>
Jason Ekstrand [Fri, 21 Feb 2020 16:59:38 +0000 (10:59 -0600)]
intel/fs: Add an alignment to VARYING_PULL_CONSTANT_LOAD_LOGICAL
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3932>
Jason Ekstrand [Thu, 20 Feb 2020 22:51:35 +0000 (16:51 -0600)]
i965: Take an isl_format in emit_buffer_surface_state
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3932>
Lionel Landwerlin [Wed, 7 Oct 2020 19:21:23 +0000 (22:21 +0300)]
intel/dev: fix 32bit build issue
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7049>
Jason Ekstrand [Tue, 6 Oct 2020 17:31:52 +0000 (12:31 -0500)]
intel/nir: Lower load_global_constant in lower_mem_access_bit_sizes
It's identical to nir_intrinsic_load_global except that it works on data
that's guaranteed to be constant throughout the shader invocation.
Fixes:
ff2f44d86585 "intel/fs: Implement nir_intrinsic_load_global_constant"
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6872>
Jason Ekstrand [Thu, 24 Sep 2020 21:28:56 +0000 (16:28 -0500)]
intel/nir: Don't try to emit vector load_scratch instructions
In
53bfcdeecf4c9, we added load/store_scratch instructions which deviate
a little bit from most memory load/store instructions in that we can't
use the normal untyped read/write instructions which can read and write
up to a vec4 at a time. Instead, we have to use the DWORD scattered
read/write instructions which are scalar. To handle this, we added code
to brw_nir_lower_mem_access_bit_sizes to cause them to be scalarized.
However, one case was missing: the load-as-larger-vector case. In this
case, we take small bit-sized constant-offset loads replace it with a
32-bit load and shuffle the result around as needed.
For scratch, this case is much trickier to get right because it often
emits vec2 or wider which we would then have to lower again. We did
this for other load and store ops because, for lower bit-sizes we have
to scalarize thanks to the byte scattered read/write instructions being
scalar. However, for scratch we're not losing as much because we can't
vectorize 32-bit loads and stores either. It's easier to just disallow
it whenever we have to scalarize.
Fixes:
53bfcdeecf4c9 "intel/fs: Implement the new load/store_scratch..."
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6872>
Dave Airlie [Mon, 28 Sep 2020 22:40:13 +0000 (08:40 +1000)]
ci: enable piglit testing of clover/llvmpipe.
This adds support for building clover/llvmpipe and running the
piglit CL tests on it.
It uses the gl testing container, and add builds the libclc
spirv libraries as part of that which requires the llvm spirv
translator in the build container.
It also builds the llvm spirv translator as part of the build
root and creates a mesa build that builds clover for testing
against it. It uses llvm 10 as the baseline.
This drops bswap as it has an oob memory access with llvmpipe
which cause flaky test results. phatk also seems flaky
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6901>