mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-21 02:39:11 +00:00
Remove deprecated BindGroupLayout options.
Bug: dawn:527 Change-Id: I169dd0b80b006a326f5d8f121a49de6d6ac7b768 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32024 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Reviewed-by: Stephen White <senorblanco@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
5fad85bbd9
commit
441f10a4db
@@ -81,23 +81,6 @@ namespace dawn_native {
|
||||
viewDimension = entry.viewDimension;
|
||||
}
|
||||
|
||||
// Fixup multisampled=true to use MultisampledTexture instead.
|
||||
// TODO(dawn:527): Remove once the deprecation of multisampled is done.
|
||||
wgpu::BindingType type = entry.type;
|
||||
if (entry.multisampled) {
|
||||
if (type == wgpu::BindingType::MultisampledTexture) {
|
||||
return DAWN_VALIDATION_ERROR(
|
||||
"Cannot use multisampled = true and MultisampledTexture at the same time.");
|
||||
} else if (type == wgpu::BindingType::SampledTexture) {
|
||||
device->EmitDeprecationWarning(
|
||||
"BGLEntry::multisampled is deprecated, use "
|
||||
"wgpu::BindingType::MultisampledTexture instead.");
|
||||
type = wgpu::BindingType::MultisampledTexture;
|
||||
} else {
|
||||
return DAWN_VALIDATION_ERROR("Binding type cannot be multisampled");
|
||||
}
|
||||
}
|
||||
|
||||
if (bindingsSet.count(bindingNumber) != 0) {
|
||||
return DAWN_VALIDATION_ERROR("some binding index was specified more than once");
|
||||
}
|
||||
@@ -105,7 +88,7 @@ namespace dawn_native {
|
||||
bool canBeDynamic = false;
|
||||
wgpu::ShaderStage allowedStages = kAllStages;
|
||||
|
||||
switch (type) {
|
||||
switch (entry.type) {
|
||||
case wgpu::BindingType::StorageBuffer:
|
||||
allowedStages &= ~wgpu::ShaderStage::Vertex;
|
||||
DAWN_FALLTHROUGH;
|
||||
@@ -276,16 +259,6 @@ namespace dawn_native {
|
||||
std::vector<BindGroupLayoutEntry> sortedBindings(
|
||||
descriptor->entries, descriptor->entries + descriptor->entryCount);
|
||||
|
||||
// Fixup multisampled=true to use MultisampledTexture instead.
|
||||
// TODO(dawn:527): Remove once multisampled=true deprecation is finished.
|
||||
for (BindGroupLayoutEntry& entry : sortedBindings) {
|
||||
if (entry.multisampled) {
|
||||
ASSERT(entry.type == wgpu::BindingType::SampledTexture);
|
||||
entry.multisampled = false;
|
||||
entry.type = wgpu::BindingType::MultisampledTexture;
|
||||
}
|
||||
}
|
||||
|
||||
std::sort(sortedBindings.begin(), sortedBindings.end(), SortBindingsCompare);
|
||||
|
||||
for (BindingIndex i{0}; i < mBindingInfo.size(); ++i) {
|
||||
|
||||
@@ -433,22 +433,10 @@ namespace dawn_native {
|
||||
case wgpu::BindingType::SampledTexture:
|
||||
case wgpu::BindingType::MultisampledTexture: {
|
||||
if (layoutInfo.textureComponentType != shaderInfo.textureComponentType) {
|
||||
// TODO(dawn:527): Remove once the deprecation timeline is complete.
|
||||
if (layoutInfo.textureComponentType ==
|
||||
wgpu::TextureComponentType::Float &&
|
||||
shaderInfo.textureComponentType ==
|
||||
wgpu::TextureComponentType::DepthComparison) {
|
||||
device->EmitDeprecationWarning(
|
||||
"Using depth texture in the shader with "
|
||||
"TextureComponentType::Float is deprecated use "
|
||||
"TextureComponentType::DepthComparison in the bind group "
|
||||
"layout instead.");
|
||||
} else {
|
||||
return DAWN_VALIDATION_ERROR(
|
||||
"The textureComponentType of the bind group layout entry is "
|
||||
"different from " +
|
||||
GetShaderDeclarationString(group, bindingNumber));
|
||||
}
|
||||
return DAWN_VALIDATION_ERROR(
|
||||
"The textureComponentType of the bind group layout entry is "
|
||||
"different from " +
|
||||
GetShaderDeclarationString(group, bindingNumber));
|
||||
}
|
||||
|
||||
if (layoutInfo.viewDimension != shaderInfo.viewDimension) {
|
||||
|
||||
Reference in New Issue
Block a user