mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 21:47:47 +00:00
type::StorageTexture: Remove set_type()
The subtype of a storage texture is statically determinisic from the ImageFormat, and does not need to be late-set by the TypeDeterminer. Add StorageTexture::SubtypeFor() helper for returning the subtype for a given ImageFormat, and add the subtype as another immutable constructor parameter. Bug: tint:390 Change-Id: Ibe732293e3142064b60f4e666a7eb39ae8db50e7 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/40064 Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: David Neto <dneto@google.com>
This commit is contained in:
committed by
Commit Bot service account
parent
b17aea159c
commit
48b384168c
@@ -177,9 +177,8 @@ ast::Variable* TextureOverloadCase::buildTextureVariable(
|
||||
nullptr, decos);
|
||||
|
||||
case ast::intrinsic::test::TextureKind::kStorage: {
|
||||
auto* st =
|
||||
b->create<type::StorageTexture>(texture_dimension, image_format);
|
||||
st->set_type(datatype);
|
||||
auto* st = b->create<type::StorageTexture>(texture_dimension,
|
||||
image_format, datatype);
|
||||
|
||||
auto* ac = b->create<type::AccessControl>(access_control, st);
|
||||
return b->Global("texture", ast::StorageClass::kUniformConstant, ac,
|
||||
|
||||
Reference in New Issue
Block a user