Run ./tools/format
Change-Id: I4a9f375f5c383d02917c2ade4c83c3d4fc458165 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110102 Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: Dan Sinclair <dsinclair@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
parent
543dd18d3c
commit
0d2aedf097
|
@ -70,8 +70,7 @@ class DAWN_WIRE_EXPORT WireClient : public CommandHandler {
|
||||||
|
|
||||||
const volatile char* HandleCommands(const volatile char* commands, size_t size) override;
|
const volatile char* HandleCommands(const volatile char* commands, size_t size) override;
|
||||||
|
|
||||||
ReservedTexture ReserveTexture(WGPUDevice device,
|
ReservedTexture ReserveTexture(WGPUDevice device, const WGPUTextureDescriptor* descriptor);
|
||||||
const WGPUTextureDescriptor* descriptor);
|
|
||||||
ReservedSwapChain ReserveSwapChain(WGPUDevice device);
|
ReservedSwapChain ReserveSwapChain(WGPUDevice device);
|
||||||
ReservedDevice ReserveDevice();
|
ReservedDevice ReserveDevice();
|
||||||
ReservedInstance ReserveInstance();
|
ReservedInstance ReserveInstance();
|
||||||
|
|
|
@ -25,7 +25,7 @@ namespace dawn::native {
|
||||||
class CommandEncoder;
|
class CommandEncoder;
|
||||||
struct BeginComputePassCmd;
|
struct BeginComputePassCmd;
|
||||||
struct BeginRenderPassCmd;
|
struct BeginRenderPassCmd;
|
||||||
}
|
} // namespace dawn::native
|
||||||
|
|
||||||
namespace dawn::native::metal {
|
namespace dawn::native::metal {
|
||||||
|
|
||||||
|
|
|
@ -1090,8 +1090,7 @@ MaybeError TextureView::Initialize(const TextureViewDescriptor* descriptor) {
|
||||||
if (@available(macOS 10.12, iOS 10.0, *)) {
|
if (@available(macOS 10.12, iOS 10.0, *)) {
|
||||||
if (textureFormat == MTLPixelFormatDepth32Float_Stencil8) {
|
if (textureFormat == MTLPixelFormatDepth32Float_Stencil8) {
|
||||||
viewFormat = MTLPixelFormatX32_Stencil8;
|
viewFormat = MTLPixelFormatX32_Stencil8;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -471,25 +471,25 @@ class DepthStencilSamplingTest : public DawnTestWithParams<DepthStencilSamplingT
|
||||||
void DoSamplingExtraStencilComponentsRenderTest(TestAspectAndSamplerType aspectAndSamplerType,
|
void DoSamplingExtraStencilComponentsRenderTest(TestAspectAndSamplerType aspectAndSamplerType,
|
||||||
wgpu::TextureFormat format,
|
wgpu::TextureFormat format,
|
||||||
std::vector<uint8_t> textureValues) {
|
std::vector<uint8_t> textureValues) {
|
||||||
DoSamplingTestImpl(aspectAndSamplerType,
|
DoSamplingTestImpl(
|
||||||
CreateSamplingRenderPipeline({TestAspectAndSamplerType::StencilAsUint},
|
aspectAndSamplerType,
|
||||||
{0, 1, 2, 3}),
|
CreateSamplingRenderPipeline({TestAspectAndSamplerType::StencilAsUint}, {0, 1, 2, 3}),
|
||||||
format, textureValues, 4, [&](uint32_t expected, wgpu::Buffer buffer) {
|
format, textureValues, 4, [&](uint32_t expected, wgpu::Buffer buffer) {
|
||||||
EXPECT_BUFFER(buffer, 0, 4 * sizeof(uint32_t),
|
EXPECT_BUFFER(buffer, 0, 4 * sizeof(uint32_t),
|
||||||
new ExtraStencilComponentsExpectation(expected));
|
new ExtraStencilComponentsExpectation(expected));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void DoSamplingExtraStencilComponentsComputeTest(TestAspectAndSamplerType aspectAndSamplerType,
|
void DoSamplingExtraStencilComponentsComputeTest(TestAspectAndSamplerType aspectAndSamplerType,
|
||||||
wgpu::TextureFormat format,
|
wgpu::TextureFormat format,
|
||||||
std::vector<uint8_t> textureValues) {
|
std::vector<uint8_t> textureValues) {
|
||||||
DoSamplingTestImpl(aspectAndSamplerType,
|
DoSamplingTestImpl(
|
||||||
CreateSamplingComputePipeline({TestAspectAndSamplerType::StencilAsUint},
|
aspectAndSamplerType,
|
||||||
{0, 1, 2, 3}),
|
CreateSamplingComputePipeline({TestAspectAndSamplerType::StencilAsUint}, {0, 1, 2, 3}),
|
||||||
format, textureValues, 4, [&](uint32_t expected, wgpu::Buffer buffer) {
|
format, textureValues, 4, [&](uint32_t expected, wgpu::Buffer buffer) {
|
||||||
EXPECT_BUFFER(buffer, 0, 4 * sizeof(uint32_t),
|
EXPECT_BUFFER(buffer, 0, 4 * sizeof(uint32_t),
|
||||||
new ExtraStencilComponentsExpectation(expected));
|
new ExtraStencilComponentsExpectation(expected));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool CompareFunctionPasses(float compareRef,
|
static bool CompareFunctionPasses(float compareRef,
|
||||||
|
|
|
@ -219,7 +219,6 @@ TEST_F(TextureInternalUsageValidationTest, InternalUsagesAreNotReflected) {
|
||||||
ASSERT_EQ(texture.GetUsage(), wgpu::TextureUsage::CopySrc);
|
ASSERT_EQ(texture.GetUsage(), wgpu::TextureUsage::CopySrc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Test the validation of internal usages against command encoders with and without
|
// Test the validation of internal usages against command encoders with and without
|
||||||
// useInternalUsages.
|
// useInternalUsages.
|
||||||
TEST_F(TextureInternalUsageValidationTest, CommandValidation) {
|
TEST_F(TextureInternalUsageValidationTest, CommandValidation) {
|
||||||
|
|
|
@ -35,5 +35,4 @@ EntryPoint::EntryPoint(EntryPoint&) = default;
|
||||||
EntryPoint::EntryPoint(EntryPoint&&) = default;
|
EntryPoint::EntryPoint(EntryPoint&&) = default;
|
||||||
EntryPoint::~EntryPoint() = default;
|
EntryPoint::~EntryPoint() = default;
|
||||||
|
|
||||||
|
|
||||||
} // namespace tint::inspector
|
} // namespace tint::inspector
|
||||||
|
|
|
@ -74,10 +74,10 @@ f16::type f16::Quantize(f16::type value) {
|
||||||
|
|
||||||
uint32_t u32 = utils::Bitcast<uint32_t>(value);
|
uint32_t u32 = utils::Bitcast<uint32_t>(value);
|
||||||
if ((u32 & ~kF32SignMask) == 0) {
|
if ((u32 & ~kF32SignMask) == 0) {
|
||||||
return value; // +/- zero
|
return value; // +/- zero
|
||||||
}
|
}
|
||||||
if ((u32 & kF32ExponentMask) == kF32ExponentMask) { // exponent all 1's
|
if ((u32 & kF32ExponentMask) == kF32ExponentMask) { // exponent all 1's
|
||||||
return value; // inf or nan
|
return value; // inf or nan
|
||||||
}
|
}
|
||||||
|
|
||||||
// We are now going to quantize a f32 number into subnormal f16 and store the result value back
|
// We are now going to quantize a f32 number into subnormal f16 and store the result value back
|
||||||
|
|
|
@ -329,7 +329,7 @@ fn main() {
|
||||||
EXPECT_EQ(expect, str(got));
|
EXPECT_EQ(expect, str(got));
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(crbug.com/tint/1758): Requires support for workgroup pointer parameters, which is
|
// TODO(crbug.com/tint/1758): Requires support for workgroup pointer parameters, which is
|
||||||
// unsupported until WGSL 1.1
|
// unsupported until WGSL 1.1
|
||||||
TEST_F(ModuleScopeVarToEntryPointParamTest, DISABLED_FoldAddressOfDeref) {
|
TEST_F(ModuleScopeVarToEntryPointParamTest, DISABLED_FoldAddressOfDeref) {
|
||||||
auto* src = R"(
|
auto* src = R"(
|
||||||
|
@ -370,7 +370,7 @@ fn main() {
|
||||||
EXPECT_EQ(expect, str(got));
|
EXPECT_EQ(expect, str(got));
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(crbug.com/tint/1758): Requires support for workgroup pointer parameters, which is
|
// TODO(crbug.com/tint/1758): Requires support for workgroup pointer parameters, which is
|
||||||
// unsupported until WGSL 1.1
|
// unsupported until WGSL 1.1
|
||||||
TEST_F(ModuleScopeVarToEntryPointParamTest, DISABLED_FoldAddressOfDeref_OutOfOrder) {
|
TEST_F(ModuleScopeVarToEntryPointParamTest, DISABLED_FoldAddressOfDeref_OutOfOrder) {
|
||||||
auto* src = R"(
|
auto* src = R"(
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
#define TINT_DISABLE_WARNING_OLD_STYLE_CAST _Pragma("clang diagnostic ignored \"-Wold-style-cast\"")
|
#define TINT_DISABLE_WARNING_OLD_STYLE_CAST _Pragma("clang diagnostic ignored \"-Wold-style-cast\"")
|
||||||
#define TINT_DISABLE_WARNING_SIGN_CONVERSION \
|
#define TINT_DISABLE_WARNING_SIGN_CONVERSION \
|
||||||
_Pragma("clang diagnostic ignored \"-Wsign-conversion\"")
|
_Pragma("clang diagnostic ignored \"-Wsign-conversion\"")
|
||||||
#define TINT_DISABLE_WARNING_UNREACHABLE_CODE /* currently no-op */
|
#define TINT_DISABLE_WARNING_UNREACHABLE_CODE /* currently no-op */
|
||||||
#define TINT_DISABLE_WARNING_WEAK_VTABLES _Pragma("clang diagnostic ignored \"-Wweak-vtables\"")
|
#define TINT_DISABLE_WARNING_WEAK_VTABLES _Pragma("clang diagnostic ignored \"-Wweak-vtables\"")
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
|
|
Loading…
Reference in New Issue