From 049aac1b80143753b4b3449e529024bafe2250be Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 12 Jul 2022 22:45:05 -0700 Subject: Support `class` types. (#2321) * Support `class` types. * Ignore class-keyword test * Fix codereview comments and warnings. Co-authored-by: Yong He --- tools/gfx-unit-test/gfx-test-texture-util.cpp | 7 +++++++ tools/gfx-unit-test/ray-tracing-tests.cpp | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/gfx-unit-test/gfx-test-texture-util.cpp b/tools/gfx-unit-test/gfx-test-texture-util.cpp index bf9a54dc0..ff1ef39d0 100644 --- a/tools/gfx-unit-test/gfx-test-texture-util.cpp +++ b/tools/gfx-unit-test/gfx-test-texture-util.cpp @@ -7,8 +7,15 @@ #include #include +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable: 4996) +#endif #define STB_IMAGE_WRITE_IMPLEMENTATION #include "external/stb/stb_image_write.h" +#ifdef _MSC_VER +#pragma warning(pop) +#endif #define GFX_ENABLE_RENDERDOC_INTEGRATION 0 diff --git a/tools/gfx-unit-test/ray-tracing-tests.cpp b/tools/gfx-unit-test/ray-tracing-tests.cpp index ee593dc2d..3bbcc6547 100644 --- a/tools/gfx-unit-test/ray-tracing-tests.cpp +++ b/tools/gfx-unit-test/ray-tracing-tests.cpp @@ -385,7 +385,7 @@ namespace gfx_test GFX_CHECK_CALL_ABORT(device->readTextureResource( resultTexture, ResourceState::CopySource, resultBlob.writeRef(), &rowPitch, &pixelSize)); - writeImage("C:/Users/lucchen/Documents/test.hdr", resultBlob, width, height, rowPitch, pixelSize); + writeImage("test.hdr", resultBlob, width, height, (uint32_t)rowPitch, (uint32_t)pixelSize); auto buffer = removePadding(resultBlob, width, height, rowPitch, pixelSize); auto actualData = (float*)buffer.getBuffer(); -- cgit v1.2.3