Adding a TODO for updating textureLoad on storage images

Change-Id: I1d724a1743caa94ba040aca804dfac6abbb2d6e5
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28360
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Tomek Ponitka <tommek@google.com>
This commit is contained in:
Tomek Ponitka 2020-09-10 14:15:37 +00:00 committed by Commit Bot service account
parent b6adc5bd42
commit ed0527a016
2 changed files with 4 additions and 0 deletions

View File

@ -588,6 +588,8 @@ bool TypeDeterminer::DetermineIntrinsic(const std::string& name,
return true; return true;
} }
if (ast::intrinsic::IsTextureOperationIntrinsic(name)) { if (ast::intrinsic::IsTextureOperationIntrinsic(name)) {
// TODO: Remove the LOD param from textureLoad on storage textures when
// https://github.com/gpuweb/gpuweb/pull/1032 gets merged.
uint32_t num_of_params = uint32_t num_of_params =
(name == "textureLoad" || name == "textureSample") ? 3 : 4; (name == "textureLoad" || name == "textureSample") ? 3 : 4;
if (expr->params().size() != num_of_params) { if (expr->params().size() != num_of_params) {

View File

@ -1529,6 +1529,8 @@ uint32_t Builder::GenerateTextureIntrinsic(const std::string& name,
->UnwrapAliasPtrAlias() ->UnwrapAliasPtrAlias()
->AsTexture(); ->AsTexture();
// TODO: Remove the LOD param from textureLoad on storage textures when
// https://github.com/gpuweb/gpuweb/pull/1032 gets merged.
if (name == "textureLoad") { if (name == "textureLoad") {
auto spirv_params = {std::move(wgsl_params[0]), auto spirv_params = {std::move(wgsl_params[0]),
std::move(wgsl_params[1]), std::move(wgsl_params[1]),