mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-12 14:46:08 +00:00
GLSL: swizzle out the dimension on cube arrays.
Note: ES doesn't support cube arrays, so this fixes the tests but does not cause them to pass. Bug: tint:1461 Change-Id: Ia2b1ffacab83dae58ac1b50eb04457da270d73e2 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/82363 Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: Stephen White <senorblanco@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
committed by
Tint LUCI CQ
parent
6c2115ee91
commit
b4c338ff37
@@ -1303,9 +1303,10 @@ bool GeneratorImpl::EmitTextureCall(std::ostream& out,
|
||||
}
|
||||
}
|
||||
out << ")";
|
||||
// textureSize() on sampler2dArray returns the array size in the
|
||||
// textureSize() on array samplers returns the array size in the
|
||||
// final component, so strip it out.
|
||||
if (texture_type->dim() == ast::TextureDimension::k2dArray) {
|
||||
if (texture_type->dim() == ast::TextureDimension::k2dArray ||
|
||||
texture_type->dim() == ast::TextureDimension::kCubeArray) {
|
||||
out << ".xy";
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user