KhronosGroup / KhronosGroup/Vulkan-ValidationLayers

False positives if local workgroup size is set via specialization constant

Open
#10,057 1 comment 1 reaction 1 assignee Claimed by @spencer-lunarg View on GitHub
BestPractices
Dominant language
C++
Stars
1k
Forks
504
Avg merge
11h 35m
Merged PRs (30d)
224

Description

**Environment:**
- OS: windows 10
- GPU and driver version: nvidia gtx950 576.02
- SDK or header version if building from repo: 1.4.313.0
- Options enabled (synchronization, best practices, etc.): synchronization, best practices amd & arm

**Describe the Issue**

False positives if local workgroup size is set via specialization constant. In fact the dimensions are not equal to 1, 1, 1.

**Expected behavior**

--

**Valid Usage ID**

```sh
Validation Performance Warning: [ BestPractices-AMD-LocalWorkgroup-Multiple64 ] | MessageID = 0x85f09c61
vkCreateComputePipelines(): pCreateInfos[0] [AMD] compute shader with work group dimensions (1, 1, 1), workgroup size (1), is not a multiple of 64. Make the workgroup size a multiple of 64 to obtain best performance across all AMD GPU generations.

Validation Performance Warning: [ BestPractices-Arm-vkCreateComputePipelines-compute-thread-group-alignment ] | MessageID = 0x79ec8938
vkCreateComputePipelines(): pCreateInfos[0] [Arm] compute shader with work group dimensions (1, 1, 1) is not aligned to 4 threads. On Arm Mali architectures, not aligning work group sizes to 4 may leave threads idle on the shader core.

Validation Performance Warning: [ BestPractices-Arm-vkCreateComputePipelines-compute-spatial-locality ] | MessageID = 0x6d8fa932
vkCreateComputePipelines(): pCreateInfos[0] [Arm] compute shader has work group dimensions (1, 1, 1), which suggests a 1D dispatch, but the shader is accessing 2D or 3D images. The shader may be exhibiting poor spatial locality with respect to one or more shader resources.
```

**Additional context**

--

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.