Andreas Baierl [Thu, 19 Nov 2020 15:38:11 +0000 (16:38 +0100)]
lima: Fix glFrontFace handling
Bit 12 of render->aux1 is GL_CCW/GL_CW. For GL_CCW (default of glFrontFace) we have
to set that bit active.
This is not what the blob does and what the original reverse engineering documentation
says. The blob sets this value inverted and does some bogus negation of the fragment
shaders gl_FrontFacing variable instead.
Anyway, doing it this way does not cause regressions but fixes
dEQP-GLES2.functional.shaders.builtin_variable.frontfacing and 4 piglit tests.
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/7690>
Dave Airlie [Fri, 24 Sep 2021 02:26:25 +0000 (12:26 +1000)]
lavapipe: move to new shared features/properties
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12953>
Dave Airlie [Fri, 17 Sep 2021 00:30:09 +0000 (10:30 +1000)]
lavapipe: enable vulkan 1.2 support.
The remaining extensions are optional features, just turn on vk 1.2
with them reporting as off.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12953>
Dave Airlie [Wed, 22 Sep 2021 06:33:08 +0000 (16:33 +1000)]
gallivm/nir: fix subgroup invocation read.
Again if you get passed an invoc but the exec mask has the
active lane somewhere other than at 0, then if we have an
invoc we should find the active lane and extract the value
from invoc rather than using the idx.
This fixes a bunch of VK 1.2 subgroup tests once 1.2 is enabled:
dEQP-VK.subgroups.ballot_broadcast.compute.subgroupbroadcast_nonconst*
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12953>
Dave Airlie [Thu, 16 Sep 2021 06:24:29 +0000 (16:24 +1000)]
lavapipe: move to 1.2 features/properties structs.
This just adds all the wrappers in the right places hopefully
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12953>
Mike Blumenkrantz [Tue, 6 Jul 2021 19:43:54 +0000 (15:43 -0400)]
lavapipe: add support for KHR_shader_float_controls
These pass all the CTS tests, though not sure how useful they are.
[airlied: these may need some work in the future depending on app expectations]
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12953>
Mike Blumenkrantz [Mon, 27 Sep 2021 01:25:34 +0000 (21:25 -0400)]
features: mark off bindless texture for zink
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12855>
Mike Blumenkrantz [Tue, 14 Sep 2021 13:51:01 +0000 (09:51 -0400)]
zink: export PIPE_CAP_BINDLESS_TEXTURE
this is the 6th descriptor set being bound, so don't even advertise it
if 6 sets can't be bound
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12855>
Mike Blumenkrantz [Tue, 14 Sep 2021 13:42:31 +0000 (09:42 -0400)]
zink: implement bindless textures
this works by tracking 1024-member arrays of images and textures using idalloc
for indexing. each idalloc id is an index into the array that is returned as a handle,
and this handle is used to index into the array in shaders.
in the driver, VK_EXT_descriptor_indexing features are used to enable updates on the live
bindless descriptor set and leave unused members of the arrays unbound, which works as
long as no member is updated while it is in use. to avoid this, idalloc ids must cycle through
a batch once the image/texture handle is destroyed before being returned to the available pool
in shaders, bindless ops come in one of two types:
- i/o variables
- bindless instructions
for i/o, the image/texture variables have to be rewritten back to the integer
handles which represent them so that the successive shader stage utilizing them
can perform the indexing
for instructions, the src representing the image/texture has to be rewritten as a deref
into the bindless image/texture array
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12855>
Mike Blumenkrantz [Thu, 31 Dec 2020 14:21:39 +0000 (09:21 -0500)]
zink: hook up VK_EXT_descriptor_indexing
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12855>
Mike Blumenkrantz [Tue, 14 Sep 2021 13:36:48 +0000 (09:36 -0400)]
zink: handle bindless images and samplers in ntv
these are going to come through as direct variable derefs, so it's simple
to handle the functionality by reusing the same codepath to generate image
types
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12855>
Mike Blumenkrantz [Tue, 14 Sep 2021 13:33:44 +0000 (09:33 -0400)]
zink: refactor some shader image code to make it reusable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12855>
Mike Blumenkrantz [Tue, 14 Sep 2021 13:33:04 +0000 (09:33 -0400)]
zink: don't add resource to pending barrier set if no barrier will be generated
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12855>
Mike Blumenkrantz [Fri, 10 Sep 2021 20:29:22 +0000 (16:29 -0400)]
zink: split out bvci creation from object creation
make this reusable like the others
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12855>
Mike Blumenkrantz [Fri, 17 Sep 2021 15:54:09 +0000 (11:54 -0400)]
zink: force lazy descriptor set rebinds if pipeline compatibility changes
if the pipeline layout changes, it's technically illegal to not rebind the descriptor
set even if it hasn't changed
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12931>
Mike Blumenkrantz [Fri, 17 Sep 2021 18:58:05 +0000 (14:58 -0400)]
zink: remove duplicated struct member set
this should only happen in zink_descriptors_update_lazy_masked
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12931>
Marek Olšák [Mon, 20 Sep 2021 11:38:24 +0000 (07:38 -0400)]
ac/surface: correct a comment about DCC image stores
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13013>
Marek Olšák [Thu, 16 Sep 2021 00:38:43 +0000 (20:38 -0400)]
ac/surface: use DCC compatible with image stores for < 4K resolutions
We don't have to use the special DCC settings for lower resolutions.
This will cause corruption if X and an windowed app use different Mesa
versions. The fix is to restart the X server. I expect to get false bug
reports due to this.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13013>
Marek Olšák [Thu, 23 Sep 2021 11:17:58 +0000 (07:17 -0400)]
radeonsi: remove the unused cs parameter from remaining packet functions
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13015>
Marek Olšák [Thu, 23 Sep 2021 11:17:58 +0000 (07:17 -0400)]
radeonsi: remove the unused cs parameter from radeon_set_uconfig_reg
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13015>
Marek Olšák [Thu, 23 Sep 2021 11:17:58 +0000 (07:17 -0400)]
radeonsi: remove the unused cs parameter from radeon_set_sh_reg
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13015>
Marek Olšák [Thu, 23 Sep 2021 11:17:58 +0000 (07:17 -0400)]
radeonsi: remove the unused cs parameter from radeon_set_(config|context)_reg
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13015>
Marek Olšák [Thu, 23 Sep 2021 11:17:58 +0000 (07:17 -0400)]
radeonsi: remove the unused cs parameter from radeon_emit_array
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13015>
Marek Olšák [Thu, 23 Sep 2021 11:17:58 +0000 (07:17 -0400)]
radeonsi: remove the unused cs parameter from radeon_emit
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13015>
Mike Blumenkrantz [Mon, 20 Sep 2021 13:07:32 +0000 (09:07 -0400)]
docs: mark off GL_EXT_multisampled_render_to_texture for zink
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12934>
Mike Blumenkrantz [Wed, 15 Sep 2021 19:12:09 +0000 (15:12 -0400)]
zink: implement GL_EXT_multisampled_render_to_texture
this requires allocating and using a lazily-allocated msaa surface as a transient
attachment for the base render operation, resolving it
...except vulkan has no "replicate" renderpass attachment mechanism, so for now we're
just gonna allocate a transient surface and hang on to it. sorry tilers!
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12934>
Mike Blumenkrantz [Fri, 24 Sep 2021 19:53:44 +0000 (15:53 -0400)]
zink: stop setting nr_samples for shader image surface creation
that's not what this should be used for
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12934>
Mike Blumenkrantz [Fri, 17 Sep 2021 13:12:39 +0000 (09:12 -0400)]
zink: move fb attachment init to new function
this is going to get more complicated
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12934>
Mike Blumenkrantz [Fri, 17 Sep 2021 13:11:35 +0000 (09:11 -0400)]
zink: remove fbfetch layout thingy from zs renderpass init
zs doesn't do fbfetch
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12934>
Mike Blumenkrantz [Fri, 17 Sep 2021 12:31:55 +0000 (08:31 -0400)]
zink: reorder draw state updates
starting a renderpass can trigger recursion and other draws, so do all
state updates/binds after the renderpass has begun
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12934>
Mike Blumenkrantz [Thu, 16 Sep 2021 00:27:09 +0000 (20:27 -0400)]
zink: improve handling of buffer rebinds using tc info
tc rebind info can't distinguish between buffers bound multiple times
in a given bind point (e.g., for multiple vertex buffers), so ensure all
rebinds are processed and the global rebind isn't triggered if multiple rebinds
are processed for a given buffer
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12934>
Mike Blumenkrantz [Wed, 15 Sep 2021 19:10:07 +0000 (15:10 -0400)]
zink: add ZINK_BIND_TRANSIENT
this is used to create lazily allocated images for use as transient
renderpass attachments
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12934>
Mike Blumenkrantz [Wed, 15 Sep 2021 19:09:48 +0000 (15:09 -0400)]
zink: add ZINK_HEAP_DEVICE_LOCAL_LAZY
this is for lazily allocated resources
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12934>
Mike Blumenkrantz [Wed, 15 Sep 2021 15:41:58 +0000 (11:41 -0400)]
zink: repack zink_render_pass_state
saves a couple wasted bits
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12934>
Lionel Landwerlin [Fri, 24 Sep 2021 14:26:23 +0000 (17:26 +0300)]
spirv: don't fail on CapabilitySubgroupDispatch if supported
Since only Anv uses the value, I'm only enabling this on anv.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes:
518693c3eca195 ("spirv: Handle the SubgroupSize execution mode")
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13034>
Mike Blumenkrantz [Fri, 24 Sep 2021 19:29:46 +0000 (15:29 -0400)]
zink: split vk debug logging into separate functions
being able to breakpoint these easily is crucial to debugging, and it sucks to
always have to go back and check the line numbers, so now there's easily-rememberable
functions for it
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13042>
Hoe Hao Cheng [Thu, 23 Sep 2021 19:02:46 +0000 (03:02 +0800)]
zink/codegen: do not enable extensions based on vulkan version
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13004>
Emma Anholt [Fri, 24 Sep 2021 00:26:49 +0000 (17:26 -0700)]
turnip: Swizzle in 0, 1 for D24S8 STENCIL_ASPECT sampling.
This seems to be what is expected by the CTS, but I haven't found a
citation.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13009>
Mike Blumenkrantz [Fri, 24 Sep 2021 14:56:08 +0000 (10:56 -0400)]
zink: enable timeline ext features
this is required by spec even though nobody cares
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13033>
Rhys Perry [Wed, 18 Aug 2021 18:08:54 +0000 (19:08 +0100)]
nir/opt_if: add opt_if_rewrite_uniform_uses
Turns:
if (a == (b=readfirstlane(a)))
use(a)
into:
if (a == (b=readfirstlane(a)))
use(b)
Improves divergence analysis and lets us scalarize use(a). Improves
Cyberpunk 2077 performance.
fossil-db (Sienna Cichlid, Cyberpunk 2077):
Totals from 57 (10.56% of 540) affected shaders:
VGPRs: 4904 -> 4040 (-17.62%)
CodeSize: 624360 -> 626828 (+0.40%); split: -0.06%, +0.46%
MaxWaves: 656 -> 824 (+25.61%)
Instrs: 119770 -> 119447 (-0.27%); split: -0.49%, +0.22%
Latency: 1950256 -> 1633110 (-16.26%); split: -16.26%, +0.00%
InvThroughput: 364852 -> 292089 (-19.94%)
VClause: 1512 -> 1008 (-33.33%)
SClause: 2693 -> 3196 (+18.68%)
Copies: 10050 -> 9955 (-0.95%); split: -3.34%, +2.40%
Branches: 3476 -> 3547 (+2.04%)
PreSGPRs: 4003 -> 5076 (+26.80%)
PreVGPRs: 4709 -> 3810 (-19.09%)
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/12472>
Rhys Perry [Thu, 19 Aug 2021 13:33:02 +0000 (14:33 +0100)]
nir: add nir_src_components_read()
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/12472>
Timur Kristóf [Tue, 14 Sep 2021 17:08:33 +0000 (19:08 +0200)]
radv: Reduce NGG culling small draw threshold to 128.
Many modern games use draw calls with only a few vertices.
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/12859>
Timur Kristóf [Tue, 14 Sep 2021 17:06:10 +0000 (19:06 +0200)]
radv: Select PC oversubscription rate based on number of PS params.
Decide the oversubscription rate similarly to how RadeonSI does it:
Oversubscribe a smaller amount of PC (parameter cache) when there are
fewer params.
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/12859>
Emma Anholt [Thu, 23 Sep 2021 22:13:46 +0000 (15:13 -0700)]
turnip: Set the VK_DRIVER_ID to our new enum.
This hasn't been exposed yet, but would be with vulkan 1.2 or
VK_KHR_driver_properties
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13007>
Emma Anholt [Thu, 23 Sep 2021 22:12:44 +0000 (15:12 -0700)]
vulkan: Update the XML and headers to 1.2.193
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13007>
Timur Kristóf [Fri, 24 Sep 2021 15:37:45 +0000 (17:37 +0200)]
ac/nir/nggc: Don't reuse uniform values from divergent control flow.
With NGG culling, the shaders are split into two parts:
the top part that computes just the position output,
and the bottom part which produces the other outputs.
To reduce redundancy between the two, I added some code
to reuse uniform variables between them. However, there is
an edge case I didn't think about: because of vertex repacking,
it is possible for the bottom part to process a different vertex.
Therefore it can take a different divergent code path
(though it must still take the same uniform code path).
Due to this, when a uniform value comes from divergent control
flow, this may be undefined in the bottom part.
This commit stops reusing uniform variables from
divergent control flow, to fix issues that arise from this.
Fossil DB stats on Sienna Cichlid with NGGC on:
Totals from 1723 (1.34% of 128647) affected shaders:
VGPRs: 89312 -> 89184 (-0.14%); split: -0.15%, +0.01%
SpillSGPRs: 4575 -> 120 (-97.38%)
CodeSize:
10846424 ->
10873836 (+0.25%); split: -0.68%, +0.93%
MaxWaves: 34582 -> 34602 (+0.06%); split: +0.06%, -0.01%
Instrs: 2124471 -> 2128835 (+0.21%); split: -0.51%, +0.72%
Latency: 7274569 -> 7293899 (+0.27%); split: -0.22%, +0.48%
InvThroughput: 1637130 -> 1635490 (-0.10%); split: -0.17%, +0.07%
VClause: 25141 -> 25414 (+1.09%); split: -0.02%, +1.10%
SClause: 56367 -> 59503 (+5.56%); split: -1.36%, +6.93%
Copies: 230704 -> 219313 (-4.94%); split: -5.49%, +0.55%
Branches: 72781 -> 72681 (-0.14%); split: -0.21%, +0.07%
PreSGPRs: 118766 -> 100176 (-15.65%); split: -15.70%, +0.05%
PreVGPRs: 76876 -> 76833 (-0.06%)
Fixes:
0bb543bb60f93bea5b1c0ed6382ced49e659273e
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13001>
Timur Kristóf [Fri, 24 Sep 2021 15:23:17 +0000 (17:23 +0200)]
ac/nir/nggc: Refactor save_reusable_variables.
This makes the code more elegant and also fixes the mistake of
skipping the blocks that come before loops.
Fossil DB changes on Sienna Cichlid with NGGC on:
Totals from 1026 (0.80% of 128647) affected shaders:
SpillSGPRs: 3817 -> 4035 (+5.71%)
CodeSize: 5582856 -> 5538732 (-0.79%); split: -0.89%, +0.10%
Instrs: 1106907 -> 1100180 (-0.61%); split: -0.68%, +0.07%
Latency:
10084948 ->
10052197 (-0.32%); split: -0.37%, +0.05%
InvThroughput: 1567012 -> 1564949 (-0.13%); split: -0.16%, +0.03%
SClause: 39789 -> 39075 (-1.79%); split: -2.33%, +0.54%
Copies: 95184 -> 96456 (+1.34%); split: -0.19%, +1.53%
Branches: 44087 -> 44093 (+0.01%); split: -0.01%, +0.02%
PreSGPRs: 47584 -> 51009 (+7.20%); split: -0.61%, +7.80%
Fixes:
0bb543bb60f93bea5b1c0ed6382ced49e659273e
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13001>
Samuel Pitoiset [Fri, 24 Sep 2021 12:17:49 +0000 (14:17 +0200)]
radv/llvm: stop using vs_common_out.export_prim_id
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/13028>
Samuel Pitoiset [Fri, 24 Sep 2021 12:10:39 +0000 (14:10 +0200)]
radv,aco: stop using vs_common_out.export_clip_dists
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/13028>
Samuel Pitoiset [Fri, 24 Sep 2021 11:55:10 +0000 (13:55 +0200)]
radv: add export_clip_dists for VS and TES to radv_shader_info
To be able to remove radv_vs_out_key entirely.
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/13028>
Timur Kristóf [Fri, 24 Sep 2021 13:54:03 +0000 (15:54 +0200)]
radv: Fix gs_vgpr_comp_cnt for NGG culling in vertex shaders.
Previously these shaders always took the path to gs_vgpr_comp_cnt=3,
but now they are 0 when they don't use primitive id.
Fixes:
7ad69e2f7ee10c0e7afc302b9324e7a320424dcb
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/13031>
Caio Marcelo de Oliveira Filho [Fri, 13 Aug 2021 19:22:52 +0000 (12:22 -0700)]
nir/lower_io_to_vector: Allow Task/Mesh to load from outputs
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12951>
Samuel Pitoiset [Fri, 24 Sep 2021 10:06:44 +0000 (12:06 +0200)]
radv/llvm: stop using vs_common_out.as_ngg_passthrough
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/13025>
Samuel Pitoiset [Fri, 24 Sep 2021 10:04:36 +0000 (12:04 +0200)]
radv: remove useless as_ngg_passthrough init when lowering NGG in NIR
Nothing reads the value after that, except LLVM but we don't lower it
in NIR (yet).
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/13025>
Lionel Landwerlin [Fri, 24 Sep 2021 07:55:05 +0000 (10:55 +0300)]
clc: use the defined version for the parser
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13018>
Lionel Landwerlin [Fri, 24 Sep 2021 08:11:22 +0000 (11:11 +0300)]
microsoft/clc: small compile fix on Linux
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13018>
Samuel Pitoiset [Fri, 24 Sep 2021 09:17:40 +0000 (11:17 +0200)]
radv: stop using the shader keys for as_ls/as_es/as_ngg when possible
radv_shader_info should be initialized correctly at this point.
There is still few occurences earlier in the pipeline but they aren't
easy to remove right now.
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/13023>
Alyssa Rosenzweig [Thu, 23 Sep 2021 20:53:47 +0000 (16:53 -0400)]
panfrost: Fix incorrect test condition
Oh, the irony. I linked to this file in a software design class as an
example of how unit testing works under the hood, since it's not using
any particular testing framework. In doing so I realized the test is
totally broken. It doesn't matter -- the tests passed before, pass now,
and the code being tested is correct. But let's still fix the
embarassing logic error for future Panfrost hackers.
Fixes:
d42e53c77a2 ("panfrost: Unit test clear colour packing")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13006>
Rhys Perry [Thu, 22 Jul 2021 10:13:31 +0000 (11:13 +0100)]
aco/tests: add idep_amdgfxregs_h
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Fixes:
9bf30c4a5cb ("aco/tests: add tests for form_hard_clauses()")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12017>
Samuel Pitoiset [Fri, 24 Sep 2021 09:19:58 +0000 (11:19 +0200)]
radv: remove unused radv_tcs_variant_key:primitive_mode
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/13022>
Alejandro Piñeiro [Mon, 13 Sep 2021 23:15:58 +0000 (01:15 +0200)]
broadcom/compiler: remove qpu_acc helper
It is really small, and used just twice, so we just call qpu_magic.
We also update how it is used:
* QFILE_NULL is an undef so we can just load anything. Previously we
were using accumulator 0, but there isn't any real reason to use
an accumulator for this. Using reg 0.
* QFILE_LOAD_IMM: it seems that we don't use at all right now, so
let's add an assert
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13008>
Alejandro Piñeiro [Wed, 22 Sep 2021 23:13:13 +0000 (01:13 +0200)]
broadcom/compiler: remove commented out vir_LOAD_IMM methods
It has been commented several years now. Let's remove it to reduce the
noise.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13008>
Samuel Pitoiset [Thu, 23 Sep 2021 10:40:57 +0000 (12:40 +0200)]
radv: stop loading invocation ID for NGG vertex shaders
This is unnecessary and was copied from RadeonSI which needs it for
edge flags. RADV should never to read the invocation ID for VS.
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/12997>
Georg Lehmann [Thu, 23 Sep 2021 20:31:26 +0000 (22:31 +0200)]
radv: Remove dead min waves code.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13005>
Dave Airlie [Fri, 24 Sep 2021 02:53:03 +0000 (12:53 +1000)]
lavapipe/ci: drop some fails I fixed recently
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13011>
Yevhenii Kolesnikov [Thu, 13 May 2021 18:39:09 +0000 (21:39 +0300)]
anv: Switch to new debug message helpers
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10318>
Yevhenii Kolesnikov [Tue, 21 Sep 2021 22:56:38 +0000 (01:56 +0300)]
vulkan: Add convenience debug message helpers
Forwards the message to both VK_EXT_debug_utils and
VK_EXT_debug_report provided callbacks.
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10318>
Yevhenii Kolesnikov [Thu, 23 Sep 2021 17:23:33 +0000 (20:23 +0300)]
vulkan: Add vk_asprintf and vk_vasprintf helpers
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10318>
Yevhenii Kolesnikov [Tue, 21 Sep 2021 22:50:23 +0000 (01:50 +0300)]
vulkan/enum_to_str: Add generator for VkObjectType to Vulkan Handle
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10318>
Yevhenii Kolesnikov [Fri, 2 Apr 2021 15:07:22 +0000 (18:07 +0300)]
vulkan: Implement VK_EXT_debug_utils
This implements all the necessary features of VK_EXT_debug_utils in
common code.
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10318>
Dave Airlie [Thu, 23 Sep 2021 06:07:46 +0000 (16:07 +1000)]
gallium/format: move two vertex formats into the proper place.
These two can be vertex formats with vulkan so lavapipe can
expose them.
Fixes
dEQP-VK.pipeline.vertex_input.single_attribute.uvec4.as_a2r10g10b10_uint_pack32_rate_vertex
Fixes:
e002f5a086c7 ("gallium: change pipe_vertex_element::src_format to uint8_t")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12987>
Emma Anholt [Tue, 21 Sep 2021 22:07:46 +0000 (15:07 -0700)]
radv: Use the shared now-in-core feature/prop extension helper functions.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12967>
Emma Anholt [Tue, 21 Sep 2021 22:04:38 +0000 (15:04 -0700)]
anv: Use the shared now-in-core feature/prop extension helper functions.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12967>
Emma Anholt [Tue, 21 Sep 2021 22:04:10 +0000 (15:04 -0700)]
turnip: Use the shared now-in-core feature/prop extension helper functions.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12967>
Emma Anholt [Tue, 21 Sep 2021 23:42:40 +0000 (16:42 -0700)]
vulkan: Support PHYSICAL_DEVICE_1_n_ features/properties in the helpers.
Since we have a filled out struct available, just memcpy it over so the
driver doesn't have to fill it out again.
Suggested by Jason, this is code that isn't copy-and-paste from anv.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12967>
Emma Anholt [Tue, 21 Sep 2021 22:03:21 +0000 (15:03 -0700)]
vulkan: Add helpers for filling exts for core features and properties.
This is boilerplate that drivers have to replicate, so make a nice helper.
The feature/property macro lists are are copy and pasted from anv, though
the helper functions has been split between 1.1 and 1.2 (and thus the macros
refactored).
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12967>
Yevhenii Kolesnikov [Tue, 6 Apr 2021 12:32:55 +0000 (15:32 +0300)]
lavapipe: Use a common vk_queue structure
Switch to using common structure.
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13000>
Yevhenii Kolesnikov [Tue, 6 Apr 2021 12:30:32 +0000 (15:30 +0300)]
v3dv: Use a common vk_queue structure
Switch to using common structure.
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13000>
Yevhenii Kolesnikov [Tue, 6 Apr 2021 12:28:28 +0000 (15:28 +0300)]
turnip: Use a common vk_queue structure
Switch to using common structure.
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13000>
Yevhenii Kolesnikov [Tue, 6 Apr 2021 12:26:12 +0000 (15:26 +0300)]
radv: Use a common vk_queue structure
Switch to using common structure.
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13000>
Yevhenii Kolesnikov [Fri, 2 Apr 2021 15:01:01 +0000 (18:01 +0300)]
anv: Use a common vk_queue structure
Switch to using common structure.
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13000>
Yevhenii Kolesnikov [Fri, 2 Apr 2021 14:55:14 +0000 (17:55 +0300)]
vulkan: Add a common vk_queue structure
This can be used e.g. for storing debug labels for the common
implementation of VK_EXT_debug_utils.
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13000>
Yevhenii Kolesnikov [Tue, 6 Apr 2021 12:19:12 +0000 (15:19 +0300)]
lavapipe: Use a common vk_command_buffer structure
Switch to using common structure.
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13000>
Yevhenii Kolesnikov [Tue, 6 Apr 2021 12:13:14 +0000 (15:13 +0300)]
v3dv: Use a common vk_command_buffer structure
Switch to using common structure.
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13000>
Yevhenii Kolesnikov [Tue, 6 Apr 2021 12:09:20 +0000 (15:09 +0300)]
turnip: Use a common vk_command_buffer structure
Switch to using common structure.
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13000>
Yevhenii Kolesnikov [Tue, 6 Apr 2021 12:00:53 +0000 (15:00 +0300)]
radv: Use a common vk_command_buffer structure
Switch to using common structure.
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13000>
Yevhenii Kolesnikov [Fri, 2 Apr 2021 14:57:54 +0000 (17:57 +0300)]
anv: Use a common vk_command_buffer structure
Switch to using common structure.
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13000>
Yevhenii Kolesnikov [Fri, 2 Apr 2021 14:52:34 +0000 (17:52 +0300)]
vulkan: Add a common vk_command_buffer structure
This can be used e.g. for storing debug labels for the common
implementation of VK_EXT_debug_utils.
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13000>
Timur Kristóf [Thu, 23 Sep 2021 13:33:02 +0000 (15:33 +0200)]
radv/llvm: Don't read edge flags anymore.
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/12998>
Timur Kristóf [Fri, 17 Sep 2021 19:36:21 +0000 (21:36 +0200)]
ac/nir: Emit edge flag instructions conditionally.
They are not needed by RADV but will be needed by RadeonSI.
Fossil DB results on Sienna Cichlid (with NGGC on):
Totals from 56917 (44.24% of 128647) affected shaders:
VGPRs: 1982664 -> 1975936 (-0.34%); split: -0.43%, +0.09%
CodeSize:
152790880 ->
149510316 (-2.15%); split: -2.15%, +0.00%
MaxWaves: 1617984 -> 1621900 (+0.24%)
Instrs:
29272825 ->
28907038 (-1.25%); split: -1.26%, +0.01%
Latency:
128744182 ->
127565678 (-0.92%); split: -1.14%, +0.22%
InvThroughput:
20125915 ->
19805168 (-1.59%); split: -1.63%, +0.03%
VClause: 521312 -> 519804 (-0.29%); split: -0.77%, +0.48%
SClause: 688861 -> 688897 (+0.01%); split: -0.04%, +0.05%
Copies: 3205421 -> 3177799 (-0.86%); split: -1.68%, +0.82%
Branches: 1181457 -> 1183147 (+0.14%); split: -0.03%, +0.17%
PreVGPRs: 1626681 -> 1595406 (-1.92%)
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/12998>
Timur Kristóf [Fri, 17 Sep 2021 19:35:25 +0000 (21:35 +0200)]
radv: Disable HW generated edge flags for NGG shaders.
Vulkan doesn't support user edge flags, and also doesn't have
any decomposed primitives where drawing internal edges should
be disallowed. Hence, we don't need this.
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/12998>
Jesse Natalie [Mon, 19 Apr 2021 12:38:42 +0000 (05:38 -0700)]
microsoft/clc: Add a test for specializing via SPIRV-Tools
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10322>
Jesse Natalie [Mon, 19 Apr 2021 14:14:24 +0000 (07:14 -0700)]
microsoft/clc: Add API to independently specialize SPIR-V
We need the ability to specialize unlinked SPIR-V, so use SPIR-V tools
to specialize prior to linking.
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10322>
Jesse Natalie [Mon, 19 Apr 2021 14:10:59 +0000 (07:10 -0700)]
microsoft/clc: Support passing specialization consts to spirv_to_nir
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10322>
Jesse Natalie [Mon, 19 Apr 2021 14:09:58 +0000 (07:09 -0700)]
microsoft/clc: Parse SPIR-V specialization consts into metadata
We need to be able to validate at the API that set specialization consts
have a valid ID and the value is the correct size.
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10322>
Jesse Natalie [Mon, 19 Apr 2021 13:58:56 +0000 (06:58 -0700)]
microsoft/clc: Support SPIR intermediates in the compilation APIs
We can now export SPIR (mainly just for testing) or import SPIR and
convert to SPIR-V.
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10322>
Jesse Natalie [Mon, 19 Apr 2021 13:54:13 +0000 (06:54 -0700)]
microsoft/clc: Split clc_object and rename entrypoints
clc_object was overloaded, containing SPIR-V binary and metadata,
and it would only sometimes contain metadata (after linking). Split
it into a more generic clc_binary class which holds some type of data
(the kind depends on where it came from), and clc_metadata which can
be independently parsed on compiled or linked data.
Rename a couple entrypoints to be more explicit about what they're
actually transforming (c_to_spirv, link_spirv, spirv_to_dxil).
Add a logger to SPIR-V binary parsing so it can report errors on app-
provided SPIR-V.
Re-order helper function parameters to be more consistent (out params last).
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10322>
Jesse Natalie [Mon, 19 Apr 2021 13:31:05 +0000 (06:31 -0700)]
microsoft/clc: Stop heap-allocating tiny fixed-size transparent structs
The caller can allocate these however they want. They don't need
independent allocations. Removes some unnecessary failure handling.
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10322>
Jesse Natalie [Mon, 19 Apr 2021 13:00:50 +0000 (06:00 -0700)]
microsoft/clc: Clean up clc_context
1. Rename it to libclc to match what it is
2. Make it opaque externally
3. Remove it from non-essential entrypoints (compile/link)
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10322>
Jesse Natalie [Sat, 17 Apr 2021 14:03:17 +0000 (07:03 -0700)]
microsoft/clc: Rename compiler DLL to clon12compiler
I no longer think there's value in trying to share code on disk here between
CL and GL at runtime, especially since we're now just building GL without LLVM
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10322>