summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe
AgeCommit message (Collapse)AuthorFilesLines
2020-11-04llvmpipe: respect the sample mask in non-multisample flagDave Airlie2-0/+7
This partly revert 50987644 llvmpipe: don't use sample mask with 0 samples since Vulkan wants this behaviour. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7435>
2020-11-03llvmpipe: add clear_buffer callback. (v2)Dave Airlie1-0/+37
This fixes CL CTS thread dimensions test v2: optimise for 1 and 4. (ajax) Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7416>
2020-11-02llvmpipe: add resource get param support.Dave Airlie1-0/+39
This implements this resource get param callback and uses it to return image information for lavapipe. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6639>
2020-10-20llvmpipe: enable CL imagesKarol Herbst1-1/+1
Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7069>
2020-10-20llvmpipe: fix sampler/image binding for clover.Dave Airlie1-5/+13
Clover uses these APIs a bit different, avoid crashes Reviewed-by: Francisco Jerez <currojerez@riseup.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7069>
2020-10-02llvmpipe/cs: add in shader shared size.Dave Airlie1-1/+2
(can remove lavapipe setting this later). Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6954>
2020-09-30llvmpipe: use an alternate env var to enable clover.Dave Airlie3-4/+4
This can be used outside debug contexts. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6928>
2020-09-24Revert "nir: replace lower_ffma and fuse_ffma with has_ffma"Kenneth Graunke1-0/+3
This reverts commit 939ddf3f67de2ed1700c093e60cf95c1b72ff20b. Intel has a separate pass for fusing FFMAs selectively. We split these flags in commit 1b72c31e1f1947123d8c236b56e230f030f60cf9 and the reasoning still stands. The patch being reverted was just a cleanup, so there should be no issue with reverting it. Acked-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6849>
2020-09-24nir: replace lower_ffma and fuse_ffma with has_ffmaMarek Olšák1-3/+0
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6756>
2020-09-24nir: split lower_ffma into lower_ffma16/32/64Marek Olšák1-1/+3
AMD wants different behavior for each bit size Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6756>
2020-09-22gallium: rename PIPE_TRANSFER_* -> PIPE_MAP_*Marek Olšák5-19/+19
Acked-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5749>
2020-09-16llvmpipe: set lower_uniform_to_ubo compiler flagGert Wollny1-0/+1
Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6316>
2020-09-09llvmpipe: include gallivm perf flags in shader cache.Dave Airlie1-0/+2
Otherwise if you set perf flags, then don't set them, they won't take affect. Fixes: 6c0c61cb48e8 ("llvmpipe: add infrastructure for disk cache support") Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6630>
2020-08-31llvmpipe/fs: multisample depth/stencil bad ir generatedDave Airlie1-0/+6
Need to update the z value after updating the pos at pixel center, and later reupdate it again, so we can avoid some LLVM IR values not being dominant issues. Fixes: dEQP-VK.renderpass.suballocation.multisample.s8_uint.samples_4 Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6381>
2020-08-31llvmpipe: add array/3d clearing supportDave Airlie1-0/+8
Fixes: dEQP-VK.pipeline.multisample.sampled_image.64x64_4.*.samples_4 Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6381>
2020-08-31llvmpipe: blend has effects even if no colorbuffers.Dave Airlie1-3/+1
ARB_framebuffer_no_attachments + multisampling means blend can have an effect even outside of colorbufs Fixes: dEQP-VK.pipeline.multisample.alpha_to_coverage_no_color_attachment.samples_4.alpha_opaque Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6381>
2020-08-31gallivm/nir: lower frexp/ldexpDave Airlie1-0/+1
Fixes: dEQP-VK.glsl.builtin.precision.frexp* dEQP-VK.glsl.builtin.precision.ldexp* Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6381>
2020-08-31llvmpipe: add reference counting to fragment shaders.Dave Airlie5-41/+165
Currently llvmpipe calls finish on the context when a shader variant has to be destroyed just in case the variant is currently in use by the setup engine. Fix this by reference counting the shaders, and reference counting the shader variants. Whenever a shader is used in the rasteriser backend, it is added to a reference list and removed when the rasterizer is finished with it. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6341>
2020-08-19llvmpipe/nir: lower some more packing at nir level.Dave Airlie1-0/+3
Fixes: dEQP-VK.glsl.builtin.function.pack_unpack.* Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6339>
2020-08-19llvmpipe: lower mul 2x32_64Dave Airlie1-0/+1
Fixes: dEQP-VK.glsl.builtin.function.integer.umulextended* dEQP-VK.glsl.builtin.function.integer.imulextended* Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6339>
2020-08-19llvmpipe: lower cs local index from idDave Airlie1-0/+1
Fixes: dEQP-VK.glsl.atomic_operations.*_shared Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6339>
2020-08-19llvmpipe: lower uadd_carry/usub_borrow.Dave Airlie1-0/+2
Fixes: dEQP-VK.glsl.builtin.function.integer.uaddcarry.* dEQP-VK.glsl.builtin.function.integer.usubborrow.* Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6339>
2020-08-19llvmpipe/cs: update compute counters not fragment shader.Dave Airlie1-2/+2
This was updating the wrong counters. Reviewed-by: Eric Engestrom <eric@engestrom.ch> Fixes: a6f6ca37c82bb6810971 ("llvmpipe: add initial shader create/bind/destroy variants framework.") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6339>
2020-08-17llvmpipe: enable GL 4.5Dave Airlie1-1/+1
This passes conformance on both the master and 4.6.0 (with patches) branches. I'll be submitting results shortly from the 20.2.x branch this lands in. Cc: "20.2" <mesa-stable@lists.freedesktop.org> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6044>
2020-08-17llvmpipe/blit: for 32-bit unorm depth blits just copy 32-bitDave Airlie1-0/+9
Don't have the shader do a 32-bit unorn to float conversion, the values don't remain accurate then. Fixes: GTF-GL45.gtf30.GL3Tests.framebuffer_blit.framebuffer_blit_functionality_multisampled_to_singlesampled_blit for 32-bit unorm depth buffers. Cc: "20.2" <mesa-stable@lists.freedesktop.org> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6044>
2020-08-17llvmpipe: add support for memory allocation APIsDave Airlie2-24/+119
This adds llvmpipe driver support for the vulkan split memory/resource API and the the don't overallocate flag. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6082>
2020-08-16util: Move fetch_rgba to a separate function table.Eric Anholt1-3/+1
Only llvmpipe and translate_generic use it, and only in fallbacks, so if you're not building that then let's not bloat our binaries with it. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6305>
2020-08-16util: Make all 3 fetch_rgba functions occupy the same function slot.Eric Anholt1-1/+1
A single format either had the float, the sint, or the uint version. Making the dst be void * lets us store them in the same slot and not have logic in the callers to call the right one. -6kb on gallium drivers Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6305>
2020-08-12util: Split the pack/unpack functions out of the format desc.Eric Anholt1-1/+3
This gives the compiler a chance to GC pack/unpack functions separate from the format descriptions. For drivers that use everything, this is +10-20kb, while for libvulkan_intel it's -1.3MB. Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1048434 Acked-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5826>
2020-07-23Revert "llvmpipe: Use the default behavior of ALLOW_MAPPED_BUFFERS."Dave Airlie1-0/+1
This reverts commit 6ec49066498097c2647d030ebe1b99a00bc38734. This broke: GTF-GL45.gtf21.GL3Tests.texture_lod_bias.* not sure why but revert for now. Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6042>
2020-07-23llvmpipe/ms: fix sign extension bug in rasterizer.Dave Airlie1-1/+1
/glcts --deqp-surface-width=1024 --deqp-surface-height=64 --deqp-case=KHR-GL45.texture_view.view_sampling --deqp-surface-type=fbo was failing but only for width 1024. The test was filling a 4x4 ms texture, but leaving the viewport set to 1024x64. This was resulting in this code incorrectly sign extending a value, and passing it into the mask generator and getting the wrong values. Explicit cast avoids the sign extension and fixes the above test. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6006>
2020-07-23llvmpipe: enable robust buffer access + GL 4.3, GLES 3.2 and robust buffer ↵Dave Airlie1-1/+2
access behaviour Turning on robust buffer access enables GLES 3.2, also finished GL 4.3 support. The post depth coverage fail is expected, it's a test bug This also introduce a fail in the invalid flag test that I can't reproduce out of CI. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5971>
2020-07-23llvmpipe: add device reset query context hook.Dave Airlie2-0/+9
Add the device reset query hook needed for robustness Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5971>
2020-07-23llvmpipe/draw: handle constant buffer limits and robustness (v1.1)Dave Airlie4-8/+18
TGSI expect vec4 of constants for it's current code paths, and when doing indirect accesses it does the comparison on vec4 indexes, however NIR does the indexing on packed float indexes. This also align the compute path with the other shaders, and should improve robustness (at least under Vulkan) Fixes: KHR-NoContext.gl43.robust_buffer_access_behavior.uniform_buffer v1.1: rename variable to something more meaningful (Roland) Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5971>
2020-07-23llvmpipe: enable EXT_texture_shadow_lodDave Airlie1-0/+1
The driver passes all the CTS tests for this. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5971>
2020-07-22llvmpipe: Use the default behavior of ALLOW_MAPPED_BUFFERS.Eric Anholt1-1/+0
Since this is a software rasterizer, we really don't care whether the buffers are "mapped" since it's just malloc. This will drop a bit of pointless CPU overhead to throw errors. Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3298>
2020-07-22llvmpipe: Remove a bunch of default handling of pipe caps.Eric Anholt1-74/+0
u_screen will return 0 for all of these, which means that this is one less driver to see in git grep when I'm checking who uses a cap. Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3298>
2020-07-20llvmpipe: add framebuffer fetching support (v1.1)Dave Airlie2-89/+243
v1.1: Merge two if blocks (Roland) Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5914>
2020-07-19llvmpipe/cs: respect render conditionDave Airlie1-0/+4
Running complete CTS turned up a missing cond render. Fixes KHR-GL45.compute_shader.conditional-dispatching Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5944>
2020-07-17llvmpipe: fix position offset interpolationDave Airlie1-4/+4
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-17llvmpipe: fix stencil only formats.Dave Airlie1-0/+3
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-10llvmpipe/cs: fix image/sampler binding for computeDave Airlie1-3/+7
The compute shader dirtying is a bit wrong here, since we don't have a second stage like for fragment shaders, so dirty the compute shader whenever a sampler or image changes, (ssbo/contexts don't needs this). Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5835>
2020-07-10llvmpipe: flush resources on sampler view bindingDave Airlie1-0/+4
The resource may have been written to as images previously. KHR-GL45.shader_image_load_store.advanced-sync-imageAccess2 Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5835>
2020-07-10llvmpipe: denote NEW fs when images change.Dave Airlie2-2/+1
The fragment shader needs to be regenerated here, so flag the same as for sampler views. This causes correct flushing: KHR-GL46.shader_image_load_store.non-layered_binding Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5835>
2020-07-08llvmpipe: add ARB_post_depth_coverage support.Dave Airlie2-3/+30
This doesn't pass thie piglits because currently they are broken for case where GL upgrades 2 samples to 4 Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5767>
2020-07-07llvmpipe: Generalize "could llvmpipe fetch this format" check in unit testing.Eric Anholt1-11/+7
This set of checks matched the "access" list in u_format_table.py that controls initializing this this function pointer, so just use the function pointer. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5728>
2020-07-06llvmpipe: enable GL 4.2Dave Airlie1-1/+1
mostly just docs patch, features were all complete already Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5724>
2020-07-06llvmpipe: bump to GL support to GL 4.1Dave Airlie1-1/+1
Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5724>
2020-07-06llvmpipe: bump texture/scene limits to enable GL 4.1Dave Airlie2-4/+4
Do we need to make this more dynamic? or have some options for vmware embedded? Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5724>
2020-07-02llvmpipe: handle indirect images properlyDave Airlie1-3/+20
Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3778>