Hash :
c39f4a5c
Author :
Date :
2025-06-05T15:35:06
Vulkan: Update border color assignment for stencil
In texture border clamp, if the border color is assigned together
stencil mode (both using glTexParameter()), its red component is used
to set up a border color to be used in each backend:
* (Set up in AdjustBorderColor())
In the Vulkan backend, this is used when updating SamplerDesc, which
is then used later to set up the custom border color:
* (VkSamplerCustomBorderColorCreateInfoEXT)
According to the spec, in case of undefined format, integer border
color, and stencil image, the implementation is required to use either
the first or the second component of the custom color, although it is
recommended to use the first. However, at the moment, only the first
component is being populated, while using the second component is also
valid.
* Added feature: usesSecondComponentForStencilBorderColor
* Added bit to SamplerDesc: mUsesSecondComponentForStencil
* It is set based on the feature flag above and the texture format.
* When setting the custom border color info, the second component will
be used based on the above flag.
* Added test suites to test this on ES31 and ES32:
TextureBorderClampTestES3*.CustomBorderColorWithStencil*
* Updated capture params for glTexParameterIuivEXT().
* Suppressed the ES32 version for the following:
* P4
* Linux/NVIDIA (due to out-of-date driver)
Bug: b/390710636
Change-Id: Ie50c19e8ea66da40dc8b8db49d7e622a582637a5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6626416
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Yuxin Hu <yuxinhu@google.com>