KhronosGroup / KhronosGroup/Vulkan-Portability

MoltenVK Vulkan 1.0: Texture LOD selection for 2D with height 1

Open
#63 0 comments 0 reactions 0 assignees View on GitHub
CTS
Dominant language
No language data
Stars
45
Forks
7
PR merge metrics
No merged PRs in 30d

Description

**Failing CTS tests:**
```
dEQP-VK.pipeline.monolithic.sampler.max_sampler_lod_bias.sampler_bias
dEQP-VK.pipeline.monolithic.sampler.max_sampler_lod_bias.shader_bias
```

**Investigation results:** Required MoltenVK fix for `sampler_bias` variant https://github.com/KhronosGroup/MoltenVK/issues/2163 and suspicion that Metal may be incorrectly selecting the texture LOD for sampling when texture is 2D with height 1.

**Reasoning:**
Test creates a 2D texture with dimensions (max_width, 1, 1) for sampling and a 2D texture with dimentions (1, 1, 1) as render target. Explanation will focus on `shader_bias` since that's the one correctly working from MoltenVK's end. Without changes to the test, the sampled mip level will be the last one. However, if we increase the render target texture dimensions to be the same as the sampled texture, the test passes. Modifying the render target dimensions to other values in between for width and height, we see that the sampled mip will vary.

**Proposed solution:** I would like to test a few more things before discarding the issue as a Metal bug. I will revisit this later once all CTS failures are triaged.

cc/ @billhollings

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the failing CTS tests dEQP-VK.pipeline.monolithic.sampler.max_sampler_lod_bias.sampler_bias and shader_bias. Review the investigation around 2D textures with height 1, render-target dimensions, and the referenced MoltenVK issue 2163, then reproduce the varying sampled mip levels. Done means determining whether the behavior is a Metal bug or identifying a concrete fix.

Written by the indexing model from the issue text.

Assessment

Domain
computer-graphics, testing-qa
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.