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 TextureBindingType extends BindingType {
    constructor(sampleType, viewDimension = '2d', multisampled = false) {
        super();
        this.sampleType = sampleType;
        this.viewDimension = viewDimension;
        this.multisampled = multisampled;
    }
    toDebugString() {
        return `TextureBindingType[${this.sampleType}, ${this.viewDimension}, ${this.multisampled}]`;
    }
    combined(other) {
        if (other instanceof TextureBindingType &&
            this.sampleType === other.sampleType &&
            this.viewDimension === other.viewDimension &&
            this.multisampled === other.multisampled) {
            return this;
        }
        else {
            return null;
        }
    }
    mutateBindGroupLayoutEntry(entry) {
        entry.texture = {
            sampleType: this.sampleType,
            viewDimension: this.viewDimension,
            multisampled: this.multisampled
        };
    }
}
alpenglow.register('TextureBindingType', TextureBindingType);
//# sourceMappingURL=TextureBindingType.js.map