Skip to content

[SPIR-V] dot2add constant folding tests producing wrong output for Vulkan target #7695

@kmpeng

Description

@kmpeng

https://godbolt.org/z/TjGd63Tf9

These 2 constant folding tests:

// RUN: %dxc -spirv -fspv-target-env=vulkan1.3 -T cs_6_5 -enable-16bit-types %s

RWStructuredBuffer<float> Out : register(u3);

[numthreads(1,1,1)]
void main() {
  Out[14] = dot2add(half2(65504, 1), half2(1, 65504), float(0));
  Out[15] = dot2add(half2(1, -65504), half2(-65504, 1), float(-10000000));
}

produce inf and -inf as outputs, when the expected results are 131008 and -1.0131e+07. The same operations, when performed using buffer values, give the correct outputs.

Metadata

Metadata

Assignees

Labels

bugBug, regression, crashspirvWork related to SPIR-V

Type

No type

Projects

Status

New

Status

Triaged

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions