mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-18 09:25:25 +00:00
Complete the sampler object to match WebGPU
WebGPUSampler is much more complete than Dawn's Sampler. This patch implement the missing part. BUG=dawn:47 Change-Id: Ief45cb9710493e9d79ddab60fe3be5a123b76ebd Reviewed-on: https://dawn-review.googlesource.com/c/3540 Commit-Queue: Shaobo Yan <shaobo.yan@intel.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
ea56333c1e
commit
93158ebede
@@ -16,6 +16,7 @@
|
||||
#include "mock/mock_dawn.h"
|
||||
|
||||
#include "common/Assert.h"
|
||||
#include "common/Constants.h"
|
||||
#include "dawn_wire/Wire.h"
|
||||
#include "utils/TerribleCommandBuffer.h"
|
||||
|
||||
@@ -496,6 +497,10 @@ TEST_F(WireTests, StructureOfValuesArgument) {
|
||||
descriptor.addressModeU = DAWN_ADDRESS_MODE_CLAMP_TO_EDGE;
|
||||
descriptor.addressModeV = DAWN_ADDRESS_MODE_REPEAT;
|
||||
descriptor.addressModeW = DAWN_ADDRESS_MODE_MIRRORED_REPEAT;
|
||||
descriptor.lodMinClamp = kLodMin;
|
||||
descriptor.lodMaxClamp = kLodMax;
|
||||
descriptor.compareFunction = DAWN_COMPARE_FUNCTION_NEVER;
|
||||
descriptor.borderColor = DAWN_BORDER_COLOR_TRANSPARENT_BLACK;
|
||||
|
||||
dawnDeviceCreateSampler(device, &descriptor);
|
||||
EXPECT_CALL(api, DeviceCreateSampler(apiDevice, MatchesLambda([](const dawnSamplerDescriptor* desc) -> bool {
|
||||
@@ -505,7 +510,11 @@ TEST_F(WireTests, StructureOfValuesArgument) {
|
||||
desc->mipmapFilter == DAWN_FILTER_MODE_LINEAR &&
|
||||
desc->addressModeU == DAWN_ADDRESS_MODE_CLAMP_TO_EDGE &&
|
||||
desc->addressModeV == DAWN_ADDRESS_MODE_REPEAT &&
|
||||
desc->addressModeW == DAWN_ADDRESS_MODE_MIRRORED_REPEAT;
|
||||
desc->addressModeW == DAWN_ADDRESS_MODE_MIRRORED_REPEAT &&
|
||||
desc->compareFunction == DAWN_COMPARE_FUNCTION_NEVER &&
|
||||
desc->borderColor == DAWN_BORDER_COLOR_TRANSPARENT_BLACK &&
|
||||
desc->lodMinClamp == kLodMin &&
|
||||
desc->lodMaxClamp == kLodMax;
|
||||
})))
|
||||
.WillOnce(Return(nullptr));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user