Added cube array samplers. (#3979)

This commit is contained in:
Branimir Karadžić
2026-09-14 00:54:40 +00:00
committed by GitHub
parent dd38b306c8
commit bd85653546
9 changed files with 71 additions and 13 deletions
+14 -1
View File
@@ -5135,6 +5135,19 @@ WGPU_IMPORT
arrayLayerCount = 1;
}
uint32_t baseArrayLayer = _baseArrayLayer;
if (WGPUTextureViewDimension_Cube == tvd
|| WGPUTextureViewDimension_CubeArray == tvd)
{
baseArrayLayer *= 6;
if (WGPU_ARRAY_LAYER_COUNT_UNDEFINED != arrayLayerCount)
{
arrayLayerCount *= 6;
}
}
WGPUTextureViewDescriptor textureViewDesc =
{
.nextInChain = NULL,
@@ -5143,7 +5156,7 @@ WGPU_IMPORT
.dimension = tvd,
.baseMipLevel = _baseMipLevel,
.mipLevelCount = UINT8_MAX == _mipLevelCount ? WGPU_MIP_LEVEL_COUNT_UNDEFINED : _mipLevelCount,
.baseArrayLayer = _baseArrayLayer,
.baseArrayLayer = baseArrayLayer,
.arrayLayerCount = arrayLayerCount,
.aspect = _stencil
? WGPUTextureAspect_StencilOnly