summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_state_fs.c
AgeCommit message (Collapse)AuthorFilesLines
2024-01-22llvmpipe: Stop refcounting sample functionsKonstantin Seurer1-3/+1
This would just make on-demand compilation more complicated. Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27182>
2023-11-20gallivm/nir: Load all inputs into indirect inputs arrayLucas Fryzek1-0/+1
The code in `emit_load_var` that will attempt to read indirect inputs expects the entire array of inputs to be there. Additionally the code that populates `bld->inputs_array` will populate the array using the count of `inputs_read`, without ensuring the inputs it copies are the ones read. This change populates `bld->inputs_array` with the entire contents of bld->inputs so indirect reads will always match up. Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26153>
2023-09-26llvmpipe/fs: fix regression in sample mask handling from tgsi removal.Dave Airlie1-1/+1
This got the bits the wrong way, dEQP-VK.rasterization.frag_side_effects.color_at_beginning.sample_mask_after Fixes: a63c2daf7ad7 ("llvmpipe/fs: start using nir info in some places.") Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25396>
2023-09-25llvmpipe/fs: start converting interp/input paths to nir.Dave Airlie1-38/+50
This input_usage_mask is going to take a bit more thinking Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24436>
2023-09-25llvmpipe/nir: call gather info to update inputs read properlyDave Airlie1-0/+1
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24436>
2023-08-31llvmpipe/fs: rewrite output finding using nir.Dave Airlie1-68/+76
Reviewed-by: Brian Paul <brianp@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24817>
2023-08-31llvmpipe/fs: drop the simple shader logicDave Airlie1-13/+4
It's been turned off since 2013. Reviewed-by: Brian Paul <brianp@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24817>
2023-08-31llvmpipe/fs: start using nir info in some places.Dave Airlie1-42/+39
Reviewed-by: Brian Paul <brianp@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24817>
2023-08-31llvmpipe/fs: switch to using tgsi->nir instead of handling tgsiDave Airlie1-54/+17
This just swaps, lots of cleanup after this. Reviewed-by: Brian Paul <brianp@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24817>
2023-08-22llvmpipe/fs: drop cbuf 0 since it's lowered now.Dave Airlie1-6/+1
Reviewed-by: Emma Anholt <emma@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24804>
2023-08-10llvmpipe: fix early depth + alpha2coverage + occlusion query interactionMike Blumenkrantz1-1/+7
in this scenario, sample counting must happen before a2c, as a2c may eliminate coverage if alpha is zero, leading to a sample count of zero dEQP-VK.fragment_operations.early_fragment.sample_count_early_fragment_tests_depth_alpha_to_coverage_samples_4_maintenance5 cc: mesa-stable Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24589>
2023-08-03llvmpipe: fix fragdata/lastfragdata heuristic a bit more.Dave Airlie1-2/+1
This heuristic broke when zmike lowered fragcolor using NIR, This fixes a regression in: dEQP-GLES31.functional.shaders.framebuffer_fetch.basic.last_frag_data Fixes: db1371cce1d4 ("llvmpipe: fix handling of unused color attachments") Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24435>
2023-07-12llvmpipe/linear: add support for rgba color buffers.Dave Airlie1-1/+3
This adds support to the linear rast for rgba outputs. Reviewed-by: Brian Paul <brianp@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24066>
2023-07-12llvmpipe/linear/tgsi: calculate num_texs properly for nir.Dave Airlie1-0/+1
This is a bit hacky, but it does the right thing and counts the number of textures instructions so the linear path can work for multiple textures. Reviewed-by: Brian Paul <brianp@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24066>
2023-06-30llvmpipe: flush/reference fs ubos on bindMike Blumenkrantz1-0/+1
Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22828>
2023-06-30llvmpipe: Pre compile sample functionsKonstantin Seurer1-0/+4
With vulkan, we can not know details about texture and sampler resources so we pre compile all possible combinations. Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22828>
2023-06-27treewide: Replace the usage of ubyte/ushort with uint8_t/uint16_tYonggang Luo1-4/+4
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Acked-by: David Heidelberg <david.heidelberg@collabora.com> Acked-by: Marek Olšák <marek.olsak@amd.com> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23577>
2023-06-27treewide: Replace the usage of TRUE/FALSE with true/falseYonggang Luo1-37/+37
this is a separate patch as it's won't affect the code style Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Acked-by: David Heidelberg <david.heidelberg@collabora.com> Acked-by: Marek Olšák <marek.olsak@amd.com> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23577>
2023-06-27treewide: style fixes after replace usage of boolean to boolYonggang Luo1-8/+8
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Acked-by: David Heidelberg <david.heidelberg@collabora.com> Acked-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23577>
2023-06-27treewide: replace usage of boolean to boolYonggang Luo1-19/+19
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Acked-by: David Heidelberg <david.heidelberg@collabora.com> Acked-by: Marek Olšák <marek.olsak@amd.com> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23577>
2023-06-06llvmpipe: bind task/mesh resources and dirty bitsDave Airlie1-0/+18
This binds the task/mesh states to be updated on dirty changes Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23066>
2023-06-06llvmpipe: resize arrays to handle mesh shaders.Dave Airlie1-1/+1
This just bumps some limits. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23066>
2023-05-23llvmpipe: convert a bunch of shader_type ifs to switches.Dave Airlie1-19/+41
This makes it easier to add mesh shader support later Reviewed-by: Brian Paul <brianp@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23065>
2023-05-17llvmpipe: move to common sampler/image binding codeDave Airlie1-3/+4
This leaves the cache stuff in place, but we should consider trying to consolidate that. Reviewed-by: Brian Paul <brianp@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22788>
2023-05-17gallivm: refactor common resources out of contextsDave Airlie1-32/+42
Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22788>
2023-04-05llvmpipe: rename some vars related to occlusion query and ps invocationsBrian Paul1-2/+2
More consistent naming. Signed-off-by: Brian Paul <brianp@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22281>
2023-03-30llvmpipe: fix handling of unused color attachmentsMike Blumenkrantz1-2/+9
if an attachment doesn't have blending or color output from the shader, nothing should touch the attachment this is consistent with vulkan spec and needed for upcoming cts coverage cc: mesa-stable Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22135>
2023-01-26llvmpipe: Ensure floating point SSE state is reset regardless of the write mask.Jose Fonseca1-5/+5
The code emitted by lp_build_fpstate_set to reset the FP state could be jumped over when the write mask was zero, leading to denormals not being flushed to zero. Spotted by Roland Scheidegger. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20901>
2022-12-02llvmpipe: Use get_first_non_void_channel more oftenKonstantin Seurer1-12/+2
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18634>
2022-10-27llvmpipe: asst. clean-ups in lp_state_fs.cBrian Paul1-46/+41
Move var decls to first use. Add const qualifiers, comments, etc. Signed-off-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19330>
2022-10-05gallivm/llvmpipe: add opaque pointers support to samplerDave Airlie1-0/+2
This adds explicit context types wiring through the sampler code Reviewed-by: Mihai Preda <mhpreda@gmail.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18947>
2022-10-03gallivm/llvmpipe: hand sample position type in for loading.Dave Airlie1-0/+3
Reviewed-by: Mihai Preda <mhpreda@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18932>
2022-09-30llvmpipe/fs: convert outputs handling to explicit apiDave Airlie1-10/+11
Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Mihai Preda <mhpreda@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18876>
2022-09-30llvmpipe/fs: cleanup some remaining mask handling and reuse typesDave Airlie1-16/+17
Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Mihai Preda <mhpreda@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18876>
2022-09-30llvmpipe/fs: handle explicit types around blending and c/zs bufs calcsDave Airlie1-52/+80
Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Mihai Preda <mhpreda@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18876>
2022-09-30llvmpipe/fs: use explicit api in viewport code.Dave Airlie1-2/+3
Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Mihai Preda <mhpreda@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18876>
2022-09-30llvmpipe/fs: pass mask type to alpha to coverage handlerDave Airlie1-3/+5
Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Mihai Preda <mhpreda@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18876>
2022-09-30llvmpipe/fs: add sample position type to the interp interfaceDave Airlie1-1/+3
Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Mihai Preda <mhpreda@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18876>
2022-09-30llvmpipe/fs: pass explicit mask_type into interp code.Dave Airlie1-2/+5
This is so it is known for explicit pointer support Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Mihai Preda <mhpreda@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18876>
2022-09-30llvmpipe/fs: add mask_type for mask_store accesses.Dave Airlie1-15/+17
This adds and passes around the type for mask stores. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Mihai Preda <mhpreda@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18876>
2022-09-29llvmpipe/fs: fix invocations access for opaque ptrs.Dave Airlie1-1/+2
Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Mihai Preda <mhpreda@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18837>
2022-09-29llvmpipe/fs: convert thread data ptr to opaque ptr friendly apisDave Airlie1-6/+12
this converts the thread data code. The cache code still isn't fixed but needs future API changes to sampling code. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Mihai Preda <mhpreda@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18837>
2022-09-29llvmpipe/fs: start passing explicit context pointer type.Dave Airlie1-13/+21
In order to support opaque pointers in the future, we need to be more explicit with the pointer types here. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Mihai Preda <mhpreda@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18837>
2022-09-26llvmpipe: bind sampler views/images properly.Dave Airlie1-4/+4
There is some code that relies on TGSI here, and it has limits. For now always just bind resources > 31. Fixes dEQP-VK.pipeline.pipeline_library.descriptor_limits* Cc: mesa-stable Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18812>
2022-09-26llvmpipe: memset empty images in the keyDave Airlie1-0/+4
This fixes a bunch of valgrind warnings in dEQP-VK.pipeline.pipeline_library.descriptor_limits.fragment_shader.storage_images_63 Cc: mesa-stable Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18812>
2022-09-21llvmpipe: asst. formatting, clean-ups in lp_state_fs.cBrian Paul1-187/+216
Wrap lines to 78 chars. Move var decls to where they're first used. Etc. Signed-off-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18213>
2022-08-26gallivm: don't indirect image/sampler destroy.Dave Airlie1-2/+2
These are pointless indirections, just call direct the destroy functions. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17946>
2022-08-04llvmpipe/gallivm/draw: introduce a buffer type.Dave Airlie1-5/+0
In order to do vulkan properly we need to move towards proper descriptor based operations for the shader. This is a bit of a precursor, this consolidates the ubo/ssbo stuff into a buffer type and uses that in the backend. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17783>
2022-07-28llvmpipe/fs: handle unrestricted depth values.Dave Airlie1-20/+30
It moves the explicit clamping of incoming Z from vertex stages after interp, to the depth clamp function. It adds support to the depth clamp function to restrict incoming Z values to 0..1 range. It fixes the depth test conversions to allow unrestricted depth values. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17612>
2022-07-27llvmpipe: replace 'unsigned' with enum typesBrian Paul1-1/+1
Signed-off-by: Brian Paul <brianp@vmware.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>