mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-14 15:46:28 +00:00
Rename several parameters to match WebGPU IDL
This patch renames the following parameters to match the latest WebGPU IDL: - BindGroupDescriptor.numBindings -> bindingCount - BindGroupLayoutDescriptor.numBindings -> bindingCount - BindGroupDescriptor.numBindings -> bindingCount - queue.submit(numCommands, ..) -> commandCount - RenderPipelineDescriptor.numColorStates -> colorStateCount - TextureDescriptor: arraySize -> arrayLayerCount levelCount -> mipLevelCount - TextureViewDescriptor: levelCount -> mipLevelCount layerCount -> arrayLayerCount BUG=dawn:80 Change-Id: I615842dd5754d1ae1ddff31e25403bb3161f0201 Reviewed-on: https://dawn-review.googlesource.com/c/4881 Commit-Queue: Jiawei Shao <jiawei.shao@intel.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
11d32c8095
commit
2030166137
@@ -25,10 +25,10 @@ namespace dawn_native { namespace opengl {
|
||||
namespace {
|
||||
|
||||
GLenum TargetForDimensionAndArrayLayers(dawn::TextureDimension dimension,
|
||||
uint32_t arrayLayer) {
|
||||
uint32_t arrayLayerCount) {
|
||||
switch (dimension) {
|
||||
case dawn::TextureDimension::e2D:
|
||||
return (arrayLayer > 1) ? GL_TEXTURE_2D_ARRAY : GL_TEXTURE_2D;
|
||||
return (arrayLayerCount > 1) ? GL_TEXTURE_2D_ARRAY : GL_TEXTURE_2D;
|
||||
default:
|
||||
UNREACHABLE();
|
||||
return GL_TEXTURE_2D;
|
||||
@@ -154,8 +154,8 @@ namespace dawn_native { namespace opengl {
|
||||
const Texture* textureGL = ToBackend(texture);
|
||||
TextureFormatInfo textureViewFormat = GetGLFormatInfo(descriptor->format);
|
||||
glTextureView(mHandle, mTarget, textureGL->GetHandle(), textureViewFormat.internalFormat,
|
||||
descriptor->baseMipLevel, descriptor->levelCount, descriptor->baseArrayLayer,
|
||||
descriptor->layerCount);
|
||||
descriptor->baseMipLevel, descriptor->mipLevelCount,
|
||||
descriptor->baseArrayLayer, descriptor->arrayLayerCount);
|
||||
}
|
||||
|
||||
TextureView::~TextureView() {
|
||||
|
||||
Reference in New Issue
Block a user