mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 13:38:00 +00:00
Remove indirection for colorStates
This is to match the work in progress webgpu.h header. BUG=dawn:22 Change-Id: Ia1077fef95e6bda541cddbd2f6ce40b79138e960 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9383 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
b8dbada76d
commit
c81a717379
@@ -119,7 +119,7 @@ void init() {
|
||||
descriptor.layout = utils::MakeBasicPipelineLayout(device, &bgl);
|
||||
descriptor.vertexStage.module = vsModule;
|
||||
descriptor.cFragmentStage.module = fsModule;
|
||||
descriptor.cColorStates[0]->format = GetPreferredSwapChainTextureFormat();
|
||||
descriptor.cColorStates[0].format = GetPreferredSwapChainTextureFormat();
|
||||
|
||||
pipeline = device.CreateRenderPipeline(&descriptor);
|
||||
|
||||
|
||||
@@ -85,8 +85,7 @@ void init() {
|
||||
colorStateDescriptor.writeMask = DAWN_COLOR_WRITE_MASK_ALL;
|
||||
|
||||
descriptor.colorStateCount = 1;
|
||||
DawnColorStateDescriptor* colorStatesPtr[] = {&colorStateDescriptor};
|
||||
descriptor.colorStates = colorStatesPtr;
|
||||
descriptor.colorStates = &colorStateDescriptor;
|
||||
|
||||
DawnPipelineLayoutDescriptor pl;
|
||||
pl.nextInChain = nullptr;
|
||||
|
||||
@@ -141,7 +141,7 @@ void initRender() {
|
||||
descriptor.cVertexInput.cAttributes[2].format = dawn::VertexFormat::Float2;
|
||||
descriptor.depthStencilState = &descriptor.cDepthStencilState;
|
||||
descriptor.cDepthStencilState.format = dawn::TextureFormat::Depth24PlusStencil8;
|
||||
descriptor.cColorStates[0]->format = GetPreferredSwapChainTextureFormat();
|
||||
descriptor.cColorStates[0].format = GetPreferredSwapChainTextureFormat();
|
||||
|
||||
renderPipeline = device.CreateRenderPipeline(&descriptor);
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ void init() {
|
||||
descriptor.cVertexInput.cAttributes[0].format = dawn::VertexFormat::Float4;
|
||||
descriptor.depthStencilState = &descriptor.cDepthStencilState;
|
||||
descriptor.cDepthStencilState.format = dawn::TextureFormat::Depth24PlusStencil8;
|
||||
descriptor.cColorStates[0]->format = GetPreferredSwapChainTextureFormat();
|
||||
descriptor.cColorStates[0].format = GetPreferredSwapChainTextureFormat();
|
||||
|
||||
pipeline = device.CreateRenderPipeline(&descriptor);
|
||||
|
||||
|
||||
@@ -210,7 +210,7 @@ void init() {
|
||||
descriptor.vertexInput = &vertexInput;
|
||||
descriptor.depthStencilState = &descriptor.cDepthStencilState;
|
||||
descriptor.cDepthStencilState.format = dawn::TextureFormat::Depth24PlusStencil8;
|
||||
descriptor.cColorStates[0]->format = GetPreferredSwapChainTextureFormat();
|
||||
descriptor.cColorStates[0].format = GetPreferredSwapChainTextureFormat();
|
||||
descriptor.cDepthStencilState.depthWriteEnabled = true;
|
||||
descriptor.cDepthStencilState.depthCompare = dawn::CompareFunction::Less;
|
||||
|
||||
@@ -223,7 +223,7 @@ void init() {
|
||||
pDescriptor.vertexInput = &vertexInput;
|
||||
pDescriptor.depthStencilState = &pDescriptor.cDepthStencilState;
|
||||
pDescriptor.cDepthStencilState.format = dawn::TextureFormat::Depth24PlusStencil8;
|
||||
pDescriptor.cColorStates[0]->format = GetPreferredSwapChainTextureFormat();
|
||||
pDescriptor.cColorStates[0].format = GetPreferredSwapChainTextureFormat();
|
||||
pDescriptor.cDepthStencilState.stencilFront.passOp = dawn::StencilOperation::Replace;
|
||||
pDescriptor.cDepthStencilState.stencilBack.passOp = dawn::StencilOperation::Replace;
|
||||
pDescriptor.cDepthStencilState.depthCompare = dawn::CompareFunction::Less;
|
||||
@@ -237,7 +237,7 @@ void init() {
|
||||
rfDescriptor.vertexInput = &vertexInput;
|
||||
rfDescriptor.depthStencilState = &rfDescriptor.cDepthStencilState;
|
||||
rfDescriptor.cDepthStencilState.format = dawn::TextureFormat::Depth24PlusStencil8;
|
||||
rfDescriptor.cColorStates[0]->format = GetPreferredSwapChainTextureFormat();
|
||||
rfDescriptor.cColorStates[0].format = GetPreferredSwapChainTextureFormat();
|
||||
rfDescriptor.cDepthStencilState.stencilFront.compare = dawn::CompareFunction::Equal;
|
||||
rfDescriptor.cDepthStencilState.stencilBack.compare = dawn::CompareFunction::Equal;
|
||||
rfDescriptor.cDepthStencilState.stencilFront.passOp = dawn::StencilOperation::Replace;
|
||||
|
||||
Reference in New Issue
Block a user