mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-18 17:35:30 +00:00
Rename setBlendColor->setBlendConstant
Matches most recent spec changes. setBlendColor has been marked as deprecated. Bug: chromium:1199057 Change-Id: I4584ce789bd7d14401244509d5ada62a46236a5d Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47901 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Brandon Jones <bajones@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
22b923cc91
commit
413dcf8a40
@@ -203,31 +203,31 @@ TEST_F(SetScissorTest, ScissorLargerThanFramebuffer) {
|
||||
TestScissorCall(false, 0, std::numeric_limits<uint32_t>::max(), kWidth, kHeight);
|
||||
}
|
||||
|
||||
class SetBlendColorTest : public ValidationTest {};
|
||||
class SetBlendConstantTest : public ValidationTest {};
|
||||
|
||||
// Test to check basic use of SetBlendColor
|
||||
TEST_F(SetBlendColorTest, Success) {
|
||||
// Test to check basic use of SetBlendConstantTest
|
||||
TEST_F(SetBlendConstantTest, Success) {
|
||||
DummyRenderPass renderPass(device);
|
||||
|
||||
wgpu::CommandEncoder encoder = device.CreateCommandEncoder();
|
||||
{
|
||||
wgpu::RenderPassEncoder pass = encoder.BeginRenderPass(&renderPass);
|
||||
constexpr wgpu::Color kTransparentBlack{0.0f, 0.0f, 0.0f, 0.0f};
|
||||
pass.SetBlendColor(&kTransparentBlack);
|
||||
pass.SetBlendConstant(&kTransparentBlack);
|
||||
pass.EndPass();
|
||||
}
|
||||
encoder.Finish();
|
||||
}
|
||||
|
||||
// Test that SetBlendColor allows any value, large, small or negative
|
||||
TEST_F(SetBlendColorTest, AnyValueAllowed) {
|
||||
// Test that SetBlendConstant allows any value, large, small or negative
|
||||
TEST_F(SetBlendConstantTest, AnyValueAllowed) {
|
||||
DummyRenderPass renderPass(device);
|
||||
|
||||
wgpu::CommandEncoder encoder = device.CreateCommandEncoder();
|
||||
{
|
||||
wgpu::RenderPassEncoder pass = encoder.BeginRenderPass(&renderPass);
|
||||
constexpr wgpu::Color kAnyColorValue{-1.0f, 42.0f, -0.0f, 0.0f};
|
||||
pass.SetBlendColor(&kAnyColorValue);
|
||||
pass.SetBlendConstant(&kAnyColorValue);
|
||||
pass.EndPass();
|
||||
}
|
||||
encoder.Finish();
|
||||
|
||||
Reference in New Issue
Block a user