Skip to content

Commit f9f4c75

Browse files
committed
Rename isTextureFormatUsableAsStorageFormat to isTextureFormatUsableAsStorageTexture
This matches GPUTest.skipIfTextureFormatNotUsableAsStorageTexture
1 parent 2a8d4a8 commit f9f4c75

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

src/webgpu/api/validation/createBindGroupLayout.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import {
2222
} from '../../capability_info.js';
2323
import {
2424
isTextureFormatUsableAsReadWriteStorageTexture,
25-
isTextureFormatUsableAsStorageFormat,
25+
isTextureFormatUsableAsStorageTexture,
2626
kAllTextureFormats,
2727
} from '../../format_info.js';
2828

@@ -512,7 +512,7 @@ g.test('storage_texture,formats')
512512
t.skipIfTextureFormatNotSupported(format);
513513

514514
const success =
515-
isTextureFormatUsableAsStorageFormat(t.device, format) &&
515+
isTextureFormatUsableAsStorageTexture(t.device, format) &&
516516
!(
517517
access === 'read-write' && !isTextureFormatUsableAsReadWriteStorageTexture(t.device, format)
518518
);

src/webgpu/api/validation/createTexture.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
getBlockInfoForTextureFormat,
1717
isTextureFormatMultisampled,
1818
isTextureFormatColorRenderable,
19-
isTextureFormatUsableAsStorageFormat,
19+
isTextureFormatUsableAsStorageTexture,
2020
isTextureFormatPossiblyUsableAsColorRenderAttachment,
2121
isTextureFormatPossiblyStorageReadable,
2222
isColorTextureFormat,
@@ -373,7 +373,7 @@ g.test('sampleCount,valid_sampleCount_with_other_parameter_varies')
373373

374374
const satisfyWithStorageUsageRequirement =
375375
(usage & GPUConst.TextureUsage.STORAGE_BINDING) === 0 ||
376-
isTextureFormatUsableAsStorageFormat(t.device, format);
376+
isTextureFormatUsableAsStorageTexture(t.device, format);
377377

378378
const success =
379379
(sampleCount === 1 && satisfyWithStorageUsageRequirement) ||
@@ -1029,7 +1029,7 @@ g.test('texture_usage')
10291029
// Note that we unconditionally test copy usages for all formats and
10301030
// expect failure if copying from or to is not supported.
10311031
if (usage & GPUTextureUsage.STORAGE_BINDING) {
1032-
if (!isTextureFormatUsableAsStorageFormat(t.device, format)) success = false;
1032+
if (!isTextureFormatUsableAsStorageTexture(t.device, format)) success = false;
10331033
}
10341034
if (usage & GPUTextureUsage.RENDER_ATTACHMENT) {
10351035
if (appliedDimension === '1d') success = false;

src/webgpu/format_info.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1680,7 +1680,7 @@ type TextureFormatInfo_TypeCheck = {
16801680
* * isTextureFormatResolvable
16811681
* * isTextureFormatBlendable
16821682
* * isTextureFormatMultisampled
1683-
* * isTextureFormatUsableAsStorageFormat
1683+
* * isTextureFormatUsableAsStorageTexture
16841684
* * isTextureFormatUsableAsReadWriteStorageTexture
16851685
* * isTextureFormatUsableAsStorageFormatInCreateShaderModule
16861686
*
@@ -2426,7 +2426,7 @@ export const kCompatModeUnsupportedStorageTextureFormats: readonly GPUTextureFor
24262426
* can be used in general. If you want to know if the format can used when compiling
24272427
* a shader @see {@link isTextureFormatUsableAsStorageFormatInCreateShaderModule}
24282428
*/
2429-
export function isTextureFormatUsableAsStorageFormat(
2429+
export function isTextureFormatUsableAsStorageTexture(
24302430
device: GPUDevice,
24312431
format: GPUTextureFormat
24322432
): boolean {
@@ -2473,7 +2473,7 @@ export function isTextureFormatUsableAsReadWriteStorageTexture(
24732473
format: GPUTextureFormat
24742474
): boolean {
24752475
return (
2476-
isTextureFormatUsableAsStorageFormat(device, format) &&
2476+
isTextureFormatUsableAsStorageTexture(device, format) &&
24772477
!!kTextureFormatInfo[format].color?.readWriteStorage
24782478
);
24792479
}

src/webgpu/gpu_test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import {
2929
EncodableTextureFormat,
3030
isCompressedTextureFormat,
3131
getRequiredFeatureForTextureFormat,
32-
isTextureFormatUsableAsStorageFormat,
32+
isTextureFormatUsableAsStorageTexture,
3333
isTextureFormatUsableAsRenderAttachment,
3434
isTextureFormatMultisampled,
3535
is32Float,
@@ -567,7 +567,7 @@ export class GPUTestBase extends Fixture<GPUTestSubcaseBatchState> {
567567

568568
skipIfTextureFormatNotUsableAsStorageTexture(...formats: (GPUTextureFormat | undefined)[]) {
569569
for (const format of formats) {
570-
if (format && !isTextureFormatUsableAsStorageFormat(this.device, format)) {
570+
if (format && !isTextureFormatUsableAsStorageTexture(this.device, format)) {
571571
this.skip(`Texture with ${format} is not usable as a storage texture`);
572572
}
573573
}

0 commit comments

Comments
 (0)