mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-13 23:26:24 +00:00
Split AttachmentStateDescriptor, in order to match web idl
AttachmentStateDescriptor was removed in web idl. Its format info for color attachment and depth/stencil attachment were split and added into BlendStateDescriptor (renamed to ColorStateDescriptor) and DepthStencilStateDescriptor (became optional) respectively. This change makes dawn project match the revision in web idl. BUG=dawn:106, dawn:102 Change-Id: If57b060db7b4b5d1124b4a79a3b92a3880047722 Reviewed-on: https://dawn-review.googlesource.com/c/4561 Commit-Queue: Yunchao He <yunchao.he@intel.com> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
4dec7371a2
commit
108bcbd5c9
@@ -215,9 +215,9 @@ void init() {
|
||||
descriptor.cVertexStage.module = vsModule;
|
||||
descriptor.cFragmentStage.module = fsModule;
|
||||
descriptor.inputState = inputState;
|
||||
descriptor.cAttachmentsState.hasDepthStencilAttachment = true;
|
||||
descriptor.cDepthStencilAttachment.format = dawn::TextureFormat::D32FloatS8Uint;
|
||||
descriptor.cColorAttachments[0]->format = GetPreferredSwapChainTextureFormat();
|
||||
descriptor.depthStencilState = &descriptor.cDepthStencilState;
|
||||
descriptor.cDepthStencilState.format = dawn::TextureFormat::D32FloatS8Uint;
|
||||
descriptor.cColorStates[0].format = GetPreferredSwapChainTextureFormat();
|
||||
descriptor.cDepthStencilState.depthWriteEnabled = true;
|
||||
descriptor.cDepthStencilState.depthCompare = dawn::CompareFunction::Less;
|
||||
|
||||
@@ -228,9 +228,9 @@ void init() {
|
||||
pDescriptor.cVertexStage.module = vsModule;
|
||||
pDescriptor.cFragmentStage.module = fsModule;
|
||||
pDescriptor.inputState = inputState;
|
||||
pDescriptor.cAttachmentsState.hasDepthStencilAttachment = true;
|
||||
pDescriptor.cDepthStencilAttachment.format = dawn::TextureFormat::D32FloatS8Uint;
|
||||
pDescriptor.cColorAttachments[0]->format = GetPreferredSwapChainTextureFormat();
|
||||
pDescriptor.depthStencilState = &pDescriptor.cDepthStencilState;
|
||||
pDescriptor.cDepthStencilState.format = dawn::TextureFormat::D32FloatS8Uint;
|
||||
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;
|
||||
@@ -242,9 +242,9 @@ void init() {
|
||||
rfDescriptor.cVertexStage.module = vsModule;
|
||||
rfDescriptor.cFragmentStage.module = fsReflectionModule;
|
||||
rfDescriptor.inputState = inputState;
|
||||
rfDescriptor.cAttachmentsState.hasDepthStencilAttachment = true;
|
||||
rfDescriptor.cDepthStencilAttachment.format = dawn::TextureFormat::D32FloatS8Uint;
|
||||
rfDescriptor.cColorAttachments[0]->format = GetPreferredSwapChainTextureFormat();
|
||||
rfDescriptor.depthStencilState = &rfDescriptor.cDepthStencilState;
|
||||
rfDescriptor.cDepthStencilState.format = dawn::TextureFormat::D32FloatS8Uint;
|
||||
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