Skip to content

[HLSL] Preserve coherence qualifiers on resource flat-conversions#8583

Open
llvm-beanz wants to merge 1 commit into
microsoft:mainfrom
llvm-beanz:fix-flat-cast
Open

[HLSL] Preserve coherence qualifiers on resource flat-conversions#8583
llvm-beanz wants to merge 1 commit into
microsoft:mainfrom
llvm-beanz:fix-flat-cast

Conversation

@llvm-beanz

@llvm-beanz llvm-beanz commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

PerformHLSLConversion forced the ICK_Flat_Conversion cast target to the structural/unqualified type, discarding the 'globallycoherent' (and 'reordercoherent') AttributedType. As a result, the converted expression's
type no longer reflected the coherence of its destination, forcing consumers
to reconstruct that information from declarations.

Re-apply the coherence AttributedType to the flat-conversion result when the
target is a resource type, so the converted expression's type carries the
coherence of its destination (e.g. a ResourceDescriptorHeap[] access used to
initialize a 'globallycoherent' resource).

Assisted by Claude Opus 4.8

PerformHLSLConversion forced the ICK_Flat_Conversion cast target to the
structural/unqualified type, discarding the 'globallycoherent' (and
'reordercoherent') AttributedType. As a result, the converted
expression's
type no longer reflected the coherence of its destination, forcing
consumers
to reconstruct that information from declarations.

Re-apply the coherence AttributedType to the flat-conversion result
when the
target is a resource type, so the converted expression's type carries
the
coherence of its destination (e.g. a ResourceDescriptorHeap[] access
used to
initialize a 'globallycoherent' resource).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

1 participant