- Oct 12, 2020
-
-
Emma Anholt authored
-
Emma Anholt authored
It's typical in rust code to maintain the standard style, as set by rustfmt. That way, there can be fewer style arguments and nitpicking, since the tool just tells you.
-
- Oct 09, 2020
-
-
Dave Airlie authored
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: <mesa/mesa!7073>
-
Dave Airlie authored
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: <mesa/mesa!7073>
-
John Bates authored
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: <mesa/mesa!6967>
-
Rhys Perry authored
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: <!6891>
-
Rhys Perry authored
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: <mesa/mesa!6891>
-
Rhys Perry authored
Signed-off-by:
Rhys Perry <pendingchaos02@gmail.com> Reviewed-by:
Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <mesa/mesa!6891>
-
Boris Brezillon authored
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: <mesa/mesa!7066>
-
Boris Brezillon authored
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: <mesa/mesa!7066>
-
Boris Brezillon authored
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: <mesa/mesa!7066>
-
Boris Brezillon authored
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: <mesa/mesa!7066>
-
Boris Brezillon authored
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: <mesa/mesa!7066>
-
Boris Brezillon authored
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: <mesa/mesa!7066>
-
Boris Brezillon authored
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: <mesa/mesa!7066>
-
Boris Brezillon authored
Signed-off-by:
Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by:
Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <!7066>
-
Bas Nieuwenhuizen authored
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: <mesa/mesa!7005>
-
Timur Kristóf authored
Signed-off-by:
Timur Kristóf <timur.kristof@gmail.com> Reviewed-by:
Rhys Perry <pendingchaos02@gmail.com> Part-of: <mesa/mesa!6964>
-
Timur Kristóf authored
Signed-off-by:
Timur Kristóf <timur.kristof@gmail.com> Reviewed-by:
Rhys Perry <pendingchaos02@gmail.com> Part-of: <mesa/mesa!6964>
-
Timur Kristóf authored
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: <mesa/mesa!6964>
-
Timur Kristóf authored
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: <mesa/mesa!6964>
-
Timur Kristóf authored
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: <mesa/mesa!6964>
-
Timur Kristóf authored
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: <mesa/mesa!6964>
-
Timur Kristóf authored
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: <mesa/mesa!6964>
-
Timur Kristóf authored
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: <mesa/mesa!6964>
-
Timur Kristóf authored
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: <mesa/mesa!6964>
-
Timur Kristóf authored
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: <mesa/mesa!6964>
-
Timur Kristóf authored
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: <mesa/mesa!6964>
-
Timur Kristóf authored
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: <mesa/mesa!6964>
-
Timur Kristóf authored
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: <mesa/mesa!6964>
-
Timur Kristóf authored
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: <mesa/mesa!6964>
-
Timur Kristóf authored
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: <mesa/mesa!6964>
-
Timur Kristóf authored
Signed-off-by:
Timur Kristóf <timur.kristof@gmail.com> Reviewed-by:
Rhys Perry <pendingchaos02@gmail.com> Part-of: <mesa/mesa!6964>
-
Timur Kristóf authored
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: <mesa/mesa!6964>
-
Timur Kristóf authored
Signed-off-by:
Timur Kristóf <timur.kristof@gmail.com> Reviewed-by:
Rhys Perry <pendingchaos02@gmail.com> Part-of: <mesa/mesa!6964>
-
Timur Kristóf authored
Signed-off-by:
Timur Kristóf <timur.kristof@gmail.com> Reviewed-by:
Rhys Perry <pendingchaos02@gmail.com> Part-of: <mesa/mesa!6964>
-
Timur Kristóf authored
Signed-off-by:
Timur Kristóf <timur.kristof@gmail.com> Reviewed-by:
Rhys Perry <pendingchaos02@gmail.com> Part-of: <mesa/mesa!6964>
-
Timur Kristóf authored
Signed-off-by:
Timur Kristóf <timur.kristof@gmail.com> Reviewed-by:
Rhys Perry <pendingchaos02@gmail.com> Part-of: <mesa/mesa!6964>
-
Timur Kristóf authored
Signed-off-by:
Timur Kristóf <timur.kristof@gmail.com> Reviewed-by:
Rhys Perry <pendingchaos02@gmail.com> Part-of: <mesa/mesa!6964>
-
Timur Kristóf authored
Signed-off-by:
Timur Kristóf <timur.kristof@gmail.com> Reviewed-by:
Rhys Perry <pendingchaos02@gmail.com> Part-of: <mesa/mesa!6964>
-