-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Closed
Copy link
Labels
HLSLHLSL Language SupportHLSL Language Supportclang:codegenIR generation bugs: mangling, exceptions, etc.IR generation bugs: mangling, exceptions, etc.
Description
The target type generated for RWBuffer<int4>
does not have its isSigned
field set to 1
and the resource is treated as unsigned. This probably applies for all typed buffers with integer vector element types.
RWBuffer<int4> Buf : register(u0);
[numthreads(4,1,1)]
void main() {
Buf[0].x = 42;
}
Clang:
%"class.hlsl::RWBuffer" = type { target("dx.TypedBuffer", <4 x i32>, 1, 0, 0) }
@Buf = internal global %"class.hlsl::RWBuffer" poison, align 4
; Resource Bindings:
;
; Name Type Format Dim ID HLSL Bind Count
; ------------------------------ ---------- ------- ----------- ------- -------------- ---------
; UAV u32 buf U0 u0 1
DXC:
; Resource Bindings:
;
; Name Type Format Dim ID HLSL Bind Count
; ------------------------------ ---------- ------- ----------- ------- -------------- ------
; Buf UAV i32 buf U0 u0 1
Metadata
Metadata
Assignees
Labels
HLSLHLSL Language SupportHLSL Language Supportclang:codegenIR generation bugs: mangling, exceptions, etc.IR generation bugs: mangling, exceptions, etc.
Type
Projects
Status
Closed