Make Texture format names match WebGPU

BUG=dawn:128

Change-Id: I73cc77082d02941d91fab8ee578e529db979fed1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8164
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Corentin Wallez
2019-06-19 09:26:07 +00:00
committed by Commit Bot service account
parent 92cdeaaf81
commit 77fa31c5c6
44 changed files with 216 additions and 217 deletions

View File

@@ -88,7 +88,7 @@ namespace utils {
blend.srcFactor = dawn::BlendFactor::One;
blend.dstFactor = dawn::BlendFactor::Zero;
dawn::ColorStateDescriptor colorStateDescriptor;
colorStateDescriptor.format = dawn::TextureFormat::R8G8B8A8Unorm;
colorStateDescriptor.format = dawn::TextureFormat::RGBA8Unorm;
colorStateDescriptor.alphaBlend = blend;
colorStateDescriptor.colorBlend = blend;
colorStateDescriptor.writeMask = dawn::ColorWriteMask::All;
@@ -106,7 +106,7 @@ namespace utils {
stencilFace.depthFailOp = dawn::StencilOperation::Keep;
stencilFace.passOp = dawn::StencilOperation::Keep;
cDepthStencilState.format = dawn::TextureFormat::D32FloatS8Uint;
cDepthStencilState.format = dawn::TextureFormat::Depth24PlusStencil8;
cDepthStencilState.depthWriteEnabled = false;
cDepthStencilState.depthCompare = dawn::CompareFunction::Always;
cDepthStencilState.stencilBack = stencilFace;

View File

@@ -195,7 +195,7 @@ namespace utils {
: width(0),
height(0),
color(nullptr),
colorFormat(dawn::TextureFormat::R8G8B8A8Unorm),
colorFormat(dawn::TextureFormat::RGBA8Unorm),
renderPassInfo({}) {
}
@@ -215,7 +215,7 @@ namespace utils {
uint32_t height) {
DAWN_ASSERT(width > 0 && height > 0);
dawn::TextureFormat kColorFormat = dawn::TextureFormat::R8G8B8A8Unorm;
dawn::TextureFormat kColorFormat = dawn::TextureFormat::RGBA8Unorm;
dawn::TextureDescriptor descriptor;
descriptor.dimension = dawn::TextureDimension::e2D;

View File

@@ -46,7 +46,7 @@ namespace utils {
DawnTextureUsageBit usage,
uint32_t width,
uint32_t height) {
if (format != DAWN_TEXTURE_FORMAT_B8_G8_R8_A8_UNORM) {
if (format != DAWN_TEXTURE_FORMAT_BGRA8_UNORM) {
return "unsupported format";
}
ASSERT(width > 0);
@@ -122,7 +122,7 @@ namespace utils {
}
DawnTextureFormat GetPreferredSwapChainTextureFormat() override {
return DAWN_TEXTURE_FORMAT_B8_G8_R8_A8_UNORM;
return DAWN_TEXTURE_FORMAT_BGRA8_UNORM;
}
private:

View File

@@ -33,7 +33,7 @@ namespace utils {
return reinterpret_cast<uint64_t>(&mSwapchainImpl);
}
DawnTextureFormat GetPreferredSwapChainTextureFormat() override {
return DAWN_TEXTURE_FORMAT_R8_G8_B8_A8_UNORM;
return DAWN_TEXTURE_FORMAT_RGBA8_UNORM;
}
private: