Fix linter warnings, stdout test spew

Change-Id: I2fed4cf2a052686e2121066588686f05907a169f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/33200
Commit-Queue: Ben Clayton <bclayton@google.com>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
Ben Clayton 2020-11-18 14:31:00 +00:00 committed by Commit Bot service account
parent 5eae9bfaf5
commit 46d9c7745e
2 changed files with 10 additions and 15 deletions

View File

@ -851,11 +851,6 @@ TEST_P(SpvParserTest_RegisterHandleUsage_SampledImage, FunctionParam) {
Usage su = p->GetHandleUsage(10);
Usage iu = p->GetHandleUsage(20);
std::cout << p->GetHandleUsage(10) << std::endl;
std::cout << p->GetHandleUsage(20) << std::endl;
std::cout << p->GetHandleUsage(110) << std::endl;
std::cout << p->GetHandleUsage(120) << std::endl;
EXPECT_THAT(su.to_str(), Eq(GetParam().expected_sampler_usage));
EXPECT_THAT(iu.to_str(), Eq(GetParam().expected_image_usage));
}
@ -923,9 +918,7 @@ INSTANTIATE_TEST_SUITE_P(
// OpImageQueryLod
SampledImageCase{
"%result = OpImageQueryLod %v2float %sampled_image %coords",
"Usage(Sampler( ))", "Usage(Texture( is_sampled ))"}
));
"Usage(Sampler( ))", "Usage(Texture( is_sampled ))"}));
// Test RegisterHandleUsage, raw image cases.
// For these we test the use of an image value directly, and not combined
@ -1052,9 +1045,7 @@ INSTANTIATE_TEST_SUITE_P(
RawImageCase{"f_texture_2d_ms",
"%result = OpImageQuerySamples "
"%uint %im",
"Usage(Texture( is_sampled ms ))"}
));
"Usage(Texture( is_sampled ms ))"}));
} // namespace
} // namespace spirv

View File

@ -39,8 +39,12 @@ namespace spirv {
/// AddSampledTexture and AddDepthTexture usages
class Usage {
public:
/// Constructor
Usage();
/// Copy constructor
/// @param other the Usage to clone
Usage(const Usage& other);
/// Destructor
~Usage();
/// @returns true if this usage is internally consistent
@ -94,16 +98,16 @@ class Usage {
void AddTexture();
/// Records usage as a read-only storage texture.
void AddStorageReadTexture();
// Records usage as a write-only storage texture.
/// Records usage as a write-only storage texture.
void AddStorageWriteTexture();
// Records usage as a sampled texture.
/// Records usage as a sampled texture.
void AddSampledTexture();
// Records usage as a multisampled texture.
/// Records usage as a multisampled texture.
void AddMultisampledTexture();
/// Records usage as a depth texture.
void AddDepthTexture();
/// Returns this usage object as a string.
/// @returns this usage object as a string.
std::string to_str() const;
private: