import '../../../../globals.js';
// Copyright 2023-2024, University of Colorado Boulder
/**
 * TODO: doc
 *
 * @author Jonathan Olson <jonathan.olson@colorado.edu>
 */
import { alpenglow, BindingType } from '../../imports.js';
export default class StorageTextureBindingType extends BindingType {
    constructor(access, format, viewDimension = '2d') {
        super();
        this.access = access;
        this.format = format;
        this.viewDimension = viewDimension;
    }
    toDebugString() {
        return `StorageTextureBindingType[${this.access}, ${this.format}, ${this.viewDimension}]`;
    }
    combined(other) {
        if (other instanceof StorageTextureBindingType &&
            this.access === other.access &&
            this.format === other.format &&
            this.viewDimension === other.viewDimension) {
            return this;
        }
        else {
            return null;
        }
    }
    mutateBindGroupLayoutEntry(entry) {
        entry.storageTexture = {
            access: this.access,
            format: this.format,
            viewDimension: this.viewDimension
        };
    }
}
alpenglow.register('StorageTextureBindingType', StorageTextureBindingType);
//# sourceMappingURL=StorageTextureBindingType.js.map