mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-20 18:29:23 +00:00
Use a descriptor for PipelineLayout (#206)
Adds support for structures inside descriptors.
This commit is contained in:
@@ -408,6 +408,34 @@ TEST_F(WireTests, StructureOfValuesArgument) {
|
||||
FlushClient();
|
||||
}
|
||||
|
||||
// Test that the wire is able to send structures that contain objects
|
||||
TEST_F(WireTests, StructureOfObjectArrayArgument) {
|
||||
nxtBindGroupLayoutBuilder bglBuilder = nxtDeviceCreateBindGroupLayoutBuilder(device);
|
||||
nxtBindGroupLayout bgl = nxtBindGroupLayoutBuilderGetResult(bglBuilder);
|
||||
|
||||
nxtBindGroupLayoutBuilder apiBglBuilder = api.GetNewBindGroupLayoutBuilder();
|
||||
EXPECT_CALL(api, DeviceCreateBindGroupLayoutBuilder(apiDevice))
|
||||
.WillOnce(Return(apiBglBuilder));
|
||||
nxtBindGroupLayout apiBgl = api.GetNewBindGroupLayout();
|
||||
EXPECT_CALL(api, BindGroupLayoutBuilderGetResult(apiBglBuilder))
|
||||
.WillOnce(Return(apiBgl));
|
||||
|
||||
nxtPipelineLayoutDescriptor descriptor;
|
||||
descriptor.nextInChain = nullptr;
|
||||
descriptor.numBindGroupLayouts = 1;
|
||||
descriptor.bindGroupLayouts = &bgl;
|
||||
|
||||
nxtDeviceCreatePipelineLayout(device, &descriptor);
|
||||
EXPECT_CALL(api, DeviceCreatePipelineLayout(apiDevice, MatchesLambda([apiBgl](const nxtPipelineLayoutDescriptor* desc) -> bool {
|
||||
return desc->nextInChain == nullptr &&
|
||||
desc->numBindGroupLayouts == 1 &&
|
||||
desc->bindGroupLayouts[0] == apiBgl;
|
||||
})))
|
||||
.WillOnce(Return(nullptr));
|
||||
|
||||
FlushClient();
|
||||
}
|
||||
|
||||
// Test that the server doesn't forward calls to error objects or with error objects
|
||||
// Also test that when GetResult is called on an error builder, the error callback is fired
|
||||
TEST_F(WireTests, CallsSkippedAfterBuilderError) {
|
||||
|
||||
@@ -24,7 +24,7 @@ class RenderPipelineValidationTest : public ValidationTest {
|
||||
|
||||
renderpass = CreateSimpleRenderPass();
|
||||
|
||||
pipelineLayout = device.CreatePipelineLayoutBuilder().GetResult();
|
||||
nxt::PipelineLayout pl = utils::MakeBasicPipelineLayout(device, nullptr);
|
||||
|
||||
inputState = device.CreateInputStateBuilder().GetResult();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user