Erik Faye-Lund
086f760974
zink: use ralloc for spirv_builder as well
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5954 >
2020-07-17 17:33:35 +00:00
Erik Faye-Lund
810bf7d32b
zink: pass mem_ctx to ralloc_size-call
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5954 >
2020-07-17 17:33:35 +00:00
Erik Faye-Lund
35beb938fc
zink: use ralloc for plain malloc-calls
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5954 >
2020-07-17 17:33:35 +00:00
Erik Faye-Lund
12b324b30c
zink: use ralloc in nir-to-spirv
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5954 >
2020-07-17 17:33:34 +00:00
Icecream95
ca44c009b5
panfrost: Set depth_enabled when stencil is enabled
...
Fixes square circles in the KiCad 3D viewer.
v2: Cleanup a bit, add a comment, and handle the fs->writes_stencil case
to be pedantic (Alyssa).
Reported-by: Urja Rannikko <urjaman@gmail.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5946 >
2020-07-17 16:28:52 +00:00
Icecream95
01147481f9
panfrost: Report TEXTURE_BUFFER_OBJECTS cap when gl3 flag set
...
OpenGL 3.3 is now reported again when PAN_MESA_DEBUG=gl3 is set.
Fixes: 96fa8d70bc ("panfrost: Report CAPs more honestly")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5947 >
2020-07-17 15:05:21 +00:00
Icecream95
314ba5e174
nir: Add a face_sysval argument to nir_lower_two_sided_color
...
This is needed for handling drivers that use an input for loading the
face, for example Panfrost with Midgard GPUs.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Tested-by: Urja Rannikko <urjaman@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5915 >
2020-07-17 14:50:26 +00:00
Icecream95
2a6db94b05
panfrost: Do per-sample shading when outputs are read
...
Fixes dEQP-GLES31.functional.blend_equation_advanced.msaa.*
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5930 >
2020-07-17 14:34:47 +00:00
Icecream95
4a8ad1e08f
pan/mdg: Don't disassemble blit shaders
...
There are a lot of them and they are mostly uninteresting, so don't
disassemble them or print shader-db results.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5948 >
2020-07-17 09:37:31 -04:00
Elie Tournier
575ab303a8
virgl: set PIPE_CAP_BLEND_EQUATION_ADVANCED
...
Signed-off-by: Elie Tournier <elie.tournier@collabora.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5516 >
2020-07-17 06:19:16 +00:00
Elie Tournier
a0f42b89a1
virgl: Encode barrier for blend_equation_advanced
...
Signed-off-by: Elie Tournier <elie.tournier@collabora.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5516 >
2020-07-17 06:19:16 +00:00
Elie Tournier
a026364b55
virgl: Use alpha_src_factor to store blend_equation_advenced value
...
Signed-off-by: Elie Tournier <elie.tournier@collabora.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5516 >
2020-07-17 06:19:16 +00:00
Elie Tournier
377731ec1b
gallium: Add PIPE_CAP_BLEND_EQUATION_ADVANCED
...
Signed-off-by: Elie Tournier <elie.tournier@collabora.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5516 >
2020-07-17 06:19:16 +00:00
Elie Tournier
57174c9102
virgl: Reserved last caps of capability_bits
...
This cap is used by virglrenderer but not by Mesa.
Signed-off-by: Elie Tournier <elie.tournier@collabora.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5516 >
2020-07-17 06:19:16 +00:00
Rhys Kidd
e7fd1ce9a2
nvc0_2d: Document SET_PIXELS_FROM_MEMORY_CORRAL_SIZE from rnndb
...
Present in both cl502d and cl902d.
Based on envytools commit 889f8fb4445863c19336c31dd13ecbdd3b19a196
Signed-off-by: Rhys Kidd <rhyskidd@gmail.com >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5922 >
2020-07-17 10:22:24 +10:00
Rhys Kidd
bc69e73415
nv50_2d,nvc0_2d: Document SET_PIXELS_FROM_MEMORY_SAFE_OVERLAP from rnndb
...
Present in both cl502d and cl902d.
Based on envytools commit 0b9d3e717828a06be6937395464c34dfc870a6dc
Signed-off-by: Rhys Kidd <rhyskidd@gmail.com >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5922 >
2020-07-17 10:22:24 +10:00
Alyssa Rosenzweig
40b99bb79e
panfrost: Revert "Disable frame throttling"
...
This reverts commit 4fee7b30c0 , which was
intended to be a temporary workaround for a leak introduced in
a65e29ccb2 ("gallium: simplify throttle implementation"). However, that
leak was then fixed in 023282a4f6 and we
forgot to revert this hack.
Closes : #2108
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5858 >
2020-07-16 19:59:43 +00:00
Alyssa Rosenzweig
19da8121d6
panfrost: Enable Chromium
...
With the latest batch of fixes, Chromium works (including WebGL support,
although performance is still WIP).
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5858 >
2020-07-16 19:59:43 +00:00
Alyssa Rosenzweig
96fa8d70bc
panfrost: Report CAPs more honestly
...
We're overreporting on some chips and underreporting on others. Let's be
more honest.
This exposes OpenGL ES 3.0 on Mali T760 through T860.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5858 >
2020-07-16 19:59:43 +00:00
Alyssa Rosenzweig
afa4b32019
panfrost: Fix faults with RASTERIZER_DISCARD
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5858 >
2020-07-16 19:59:43 +00:00
Alyssa Rosenzweig
6c6a8b2f07
panfrost: Honour cso->compare_mode
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5858 >
2020-07-16 19:59:43 +00:00
Alyssa Rosenzweig
9addb82148
panfrost: Avoid integer underflow in rt_count_1
...
If rt_count = 0, this underflows to MAX_MRT. The hw doesn't seem to care
but it's semantically incorrect and confuses pandecode.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5858 >
2020-07-16 19:59:43 +00:00
Alyssa Rosenzweig
77bb19eebd
panfrost: Abort on unsupported blit
...
Instead of silently failing.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5858 >
2020-07-16 19:59:43 +00:00
Alyssa Rosenzweig
cce3d925d2
panfrost: Implement Z32F_S8 blits
...
Requires the ability to texture the stencil-only portion, and then
u_blitter kicks in for the rest.
v2: Fix dEQP-GLES31.functional.stencil_texturing.*
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5858 >
2020-07-16 19:59:43 +00:00
Alyssa Rosenzweig
6ffebfbff8
panfrost: Fix sRGB clear colour packing
...
It should be sRGB transformed first, which the generic path handles but
the RGBA8 special path does not.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5858 >
2020-07-16 19:59:43 +00:00
Alyssa Rosenzweig
721b5c6eef
panfrost: Set PIPE_CAP_MIXED_COLORBUFFER_FORMATS
...
Missed that this is needed, fixes fbo.completeness.*
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5858 >
2020-07-16 19:59:43 +00:00
Alyssa Rosenzweig
a0003c329a
panfrost: Overhaul tilebuffer allocations
...
Based on the colour buffers in use, we need to select a tile size
allowing either 128-bits of storage per pixel or 512-bits. Based on the
size chosen, we scale the offsets into the tilebuffer. Likewise, we need
to calculate offsets based on bpp (with special cases) rather than
picking an average case.
Fixes regressions that otherwise would be caused by the next commit.
v2: Fix colour clears (Icecream95).
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5858 >
2020-07-16 19:59:43 +00:00
Alyssa Rosenzweig
3d13870ee2
panfrost: Call util_blitter_save_fragment_constant_buffer_slot
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5858 >
2020-07-16 19:59:43 +00:00
Dave Airlie
e16f59c316
llvmpipe: fix position offset interpolation
...
pos offset only applies to the gl_FragPos input, when I refactored
I messed that up, only use pos_offset for the position inputs
and use 0.5 otherwise.
This fixes:
GTF-GL45.gtf30.GL3Tests.fragment_coord_conventions.fragment_coord_conventions_multisample
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5926 >
2020-07-17 05:09:54 +10:00
Dave Airlie
87e27543fe
llvmpipe: fix stencil only formats.
...
Currently the test crashes with LLVM errors
Stored value type does not match pointer operand type!
store <8 x i32> %s_dst, <8 x i8>* %261
Change the stored type for 8-bit stencil formats.
Fixes:
GTF-GL45.gtf44.GL31Tests.texture_stencil8.texture_stencil8_gl44
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5926 >
2020-07-17 05:09:34 +10:00
Thong Thai
045711dc1c
radeonsi: use PIPE_FORMAT_P010 for 10-bit VP9 decoding
...
Signed-off-by: Thong Thai <thong.thai@amd.com >
Reviewed-by: Leo Liu <leoliu@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5848 >
2020-07-16 17:52:20 +00:00
Alyssa Rosenzweig
293f251871
panfrost: Use Midgard-specific reloads
...
v2: Be more explicit about sampler types. Prefer the term "load" to
"resolve" to match VK convention. Generate shaders for MRT 8x. Blit
shader generation adds about 6ms to startup cost. We could cache thes.
shaders to disk if we needed to (or indeed, ship binaries).
v3: Fallback on u_blitter on Bifrost so Bifrost continues to work.
KHR_partial_update support is mostly no-oped on Bifrost now, but that's
okay for now - compositors are still functional.
v4: Specialize on multisample state as well to enable reloads of MSAA
textures. This requires 2x the shader variants, so I assume we're up to
12ms startup cost for generation. Annoying. Also fix interactions with
depth- or stencil-only clears of combined depth-stencil surfaces.
v5: Cache to the device (screen) instead of the context, reducing
duplicated work in apps that create many contexts (e.g. Chromium)
v6: Squash in KHR_partial_update cleanup to fix intermediate
regressions on a few tests.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5824 >
2020-07-16 15:10:55 +00:00
Marek Olšák
081691b5ae
radeonsi: prevent a gfx10_ngg_calculate_subgroup_info failure for TES+NGG GS
...
arb_tessellation_shader-tes-gs-max-output -small -scan 1 50 -auto -fbo
doesn't pass, but at least all shaders are compiled successfully.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5700 >
2020-07-16 04:04:52 +00:00
Alyssa Rosenzweig
34a03109b8
panfrost: Extract panfrost_batch_reserve_framebuffer
...
We need to trigger it explicitly for reloads without draws (for Z^S
reload which is an edge case).
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5929 >
2020-07-15 22:19:37 +00:00
Alyssa Rosenzweig
5d0d8faaa6
panfrost: Track surfaces drawn per-batch
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5929 >
2020-07-15 22:19:37 +00:00
Alyssa Rosenzweig
64734c0947
panfrost: Set zs_samples as necessary
...
Fixes MSAA Z/S.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5929 >
2020-07-15 22:19:37 +00:00
Alyssa Rosenzweig
8225604fd5
panfrost: Handle per-sample shading
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5929 >
2020-07-15 22:19:37 +00:00
Alyssa Rosenzweig
080b751d4a
panfrost: Add rectangle subtraction algorithm
...
For better supporting KHR_partial_update.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5929 >
2020-07-15 22:19:37 +00:00
Alyssa Rosenzweig
e061bf004b
panfrost: Identify zs_samples field
...
For MSAA depth/stencil.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5929 >
2020-07-15 22:19:37 +00:00
Alyssa Rosenzweig
6088891ef7
panfrost: Include sample count in payload estimates
...
Otherwise we might not reserve enough space.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5929 >
2020-07-15 22:19:37 +00:00
Alyssa Rosenzweig
adacf1f511
panfrost: Expose panfrost_get_blend_shader
...
It is needed to produce a blend shader for blits.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5929 >
2020-07-15 22:19:37 +00:00
Alyssa Rosenzweig
528e132d4f
panfrost: Force Z/S writeback
...
This is unfortunately necessary for conformance at this stage.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5929 >
2020-07-15 22:19:37 +00:00
Rhys Kidd
a9c9486106
nv50_2d: regenerate envytools-based rnndb headers
...
The headers hadn't been regenerated from envytools in a long time,
and there were a few minor divergences.
Based on envytools commit c20929ed0f3be18b8419f7332ee22d905feb6589
Among other things, rnndb has changed naming to G80/etc, for now
I've not tackled switching that over and replaced the nvidia
codenames back to the chip ids that mesa uses with the following:
$ sed -i 's/G80_2D/NV50_2D/g' rnndb/graph/g80_2d.xml.h
$ sed -i 's/GF100_2D/NVC0_2D/g' rnndb/graph/g80_2d.xml.h
No other modifications of the headergen'd headers was done, which
was helped by the differing #define's being unutilised presently.
Signed-off-by: Rhys Kidd <rhyskidd@gmail.com >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5920 >
2020-07-16 00:24:51 +10:00
Icecream95
787c1ed209
panfrost: Dual source blend support
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5620 >
2020-07-15 01:30:00 +00:00
Rob Clark
2e4bab84fb
freedreno/a6xx: don't enable early-z/lrz if no z-test
...
But if shader explicitly asks for early-fragment-tests, obey it's
wishes.
Fixes a handful of skia (skqp) CTS fails (9.0_r12)
* gles_bug593049
* gles_circular_arcs_fill
* gles_circular_arcs_stroke_and_fill_square
* gles_clippedcubic2
* gles_complexclip2_path_bw
* gles_complexclip2_rrect_bw
* gles_complexclip3_complex
* gles_complexclip3_simple
* gles_crbug_691386
* gles_cubicclosepath
* gles_cubicpath
* gles_degeneratesegments
* gles_filltypespersp
* gles_innershapes_bw
* gles_inverse_paths
* gles_mixedtextblobs
* gles_onebadarc
* gles_quadclosepath
* gles_quadpath
* gles_rrect_clip_bw
* gles_scale-pixels
* gles_scaledstrokes
* gles_squarehair
* gles_strokes_zoomed
* gles_windowrectangles
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5907 >
2020-07-14 23:26:15 +00:00
Rob Clark
afadaaef39
freedreno/a6xx: bail instead of crash for compile fails
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5907 >
2020-07-14 23:26:15 +00:00
Rob Clark
788792fc46
freedreno/ir3: add missing VS driver params
...
Some of these only used by turnip so far, this is just for clarity.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5907 >
2020-07-14 23:26:15 +00:00
Mike Blumenkrantz
5e9cd64f70
zink: enable tgsi texcoord pipe cap
...
this requires some modifications to the ntv slot remapping, as we definitely
don't want to reserve another 25% of the available slots for the (deprecated)
texcoord varyings
now we remap VARYING_SLOT_TEX[n] to the last available slots, which lets us avoid
needing to do permanent reservation, and we check to make sure that we haven't
seen the corresponding texcoord varying any time we emit a non-texcoord varying in
that slot
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5551 >
2020-07-14 20:48:17 +00:00
Karol Herbst
05362b075f
nouveau: expose HMM
...
v2: moved caps
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Pierre Moreau <dev@pmoreau.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5906 >
2020-07-14 19:59:12 +00:00
Karol Herbst
212f1ab40e
nvc0: support PIPE_CAP_RESOURCE_FROM_USER_MEMORY_COMPUTE_ONLY
...
v2: rework by adding a new buffer status
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5906 >
2020-07-14 19:59:12 +00:00