KhronosGroup / KhronosGroup/OpenXR-CTS
case “SourceAlphaBlending”, Error to get the color.
- Dominant language
- C++
- Stars
- 79
- Forks
- 30
- PR merge metrics
- No merged PRs in 30d
Description
When I test TEST_CASE("SourceAlphaBlending", "[composition][interactive][no_auto]"), the Runtime used Monado, and the resulting graphic results were as follows:

I found that the colors of the three rectangles are not exactly the same. It is easy to see that the blue color of the middle rectangle is bluer.
And in my runtime, the pipeline's color blend config is:
```c++
VkBlendFactor blend_factor = premultiplied_alpha ? VK_BLEND_FACTOR_ONE : VK_BLEND_FACTOR_SRC_ALPHA;
// final_color.rgb = (new_color.rgb * srcColorBlendFactor) [colorBlendOp] (old_color.rgb * dstColorBlendFactor)
// final_color.alpha = (new_color.a * srcAlphaBlendFactor) [alphaBlendOp] (old_color.a * dstAlphaBlendFactor)
&(VkPipelineColorBlendAttachmentState){
.blendEnable = VK_TRUE,
.colorWriteMask = VK_COLOR_COMPONENT_R_BIT | VK_COLOR_COMPONENT_G_BIT | VK_COLOR_COMPONENT_B_BIT | VK_COLOR_COMPONENT_A_BIT,
.srcColorBlendFactor = blend_factor,
.dstColorBlendFactor = VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA,
.colorBlendOp = VK_BLEND_OP_ADD,
.srcAlphaBlendFactor = VK_BLEND_FACTOR_SRC_ALPHA,
.dstAlphaBlendFactor = VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA,
.alphaBlendOp = VK_BLEND_OP_ADD,
}
```
Is this correct? Hope to get your reply very much, thank you!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with TEST_CASE("SourceAlphaBlending", "[composition][interactive][no_auto]") and reproduce the reported three-rectangle color difference using Monado. Compare the observed result with the Vulkan color blend configuration shown in the issue. Done means determining whether the mismatch is caused by the test or runtime and recording the required resolution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100