Skip to content

Commit

Permalink
Remove deprecated .sampleType
Browse files Browse the repository at this point in the history
  • Loading branch information
kainino0x committed Feb 16, 2024
1 parent 429c1c7 commit a3ed6a0
Showing 1 changed file with 0 additions and 49 deletions.
49 changes: 0 additions & 49 deletions src/webgpu/format_info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ const kFormatUniversalDefaults = {
/** The base format for srgb formats. Specified on both srgb and equivalent non-srgb formats. */
baseFormat: undefined,

/** @deprecated */
sampleType: undefined,
/** @deprecated */
copySrc: undefined,
/** @deprecated */
Expand Down Expand Up @@ -98,7 +96,6 @@ const kRegularTextureFormatInfo = formatTableWithDefaults({
/*prettier-ignore*/ get renderTargetComponentAlignment() { return this.colorRender.alignment; },
/*prettier-ignore*/ get renderTargetPixelByteCost() { return this.colorRender.byteCost; },
multisample: true,
/*prettier-ignore*/ get sampleType() { return this.color.type; },
/*prettier-ignore*/ get bytesPerBlock() { return this.color.bytes; },
},
r8snorm: {
Expand All @@ -111,7 +108,6 @@ const kRegularTextureFormatInfo = formatTableWithDefaults({
bytes: 1,
},
multisample: false,
/*prettier-ignore*/ get sampleType() { return this.color.type; },
/*prettier-ignore*/ get bytesPerBlock() { return this.color.bytes; },
},
r8uint: {
Expand All @@ -128,7 +124,6 @@ const kRegularTextureFormatInfo = formatTableWithDefaults({
/*prettier-ignore*/ get renderTargetComponentAlignment() { return this.colorRender.alignment; },
/*prettier-ignore*/ get renderTargetPixelByteCost() { return this.colorRender.byteCost; },
multisample: true,
/*prettier-ignore*/ get sampleType() { return this.color.type; },
/*prettier-ignore*/ get bytesPerBlock() { return this.color.bytes; },
},
r8sint: {
Expand All @@ -145,7 +140,6 @@ const kRegularTextureFormatInfo = formatTableWithDefaults({
/*prettier-ignore*/ get renderTargetComponentAlignment() { return this.colorRender.alignment; },
/*prettier-ignore*/ get renderTargetPixelByteCost() { return this.colorRender.byteCost; },
multisample: true,
/*prettier-ignore*/ get sampleType() { return this.color.type; },
/*prettier-ignore*/ get bytesPerBlock() { return this.color.bytes; },
},

Expand All @@ -163,7 +157,6 @@ const kRegularTextureFormatInfo = formatTableWithDefaults({
/*prettier-ignore*/ get renderTargetComponentAlignment() { return this.colorRender.alignment; },
/*prettier-ignore*/ get renderTargetPixelByteCost() { return this.colorRender.byteCost; },
multisample: true,
/*prettier-ignore*/ get sampleType() { return this.color.type; },
/*prettier-ignore*/ get bytesPerBlock() { return this.color.bytes; },
},
rg8snorm: {
Expand All @@ -176,7 +169,6 @@ const kRegularTextureFormatInfo = formatTableWithDefaults({
bytes: 2,
},
multisample: false,
/*prettier-ignore*/ get sampleType() { return this.color.type; },
/*prettier-ignore*/ get bytesPerBlock() { return this.color.bytes; },
},
rg8uint: {
Expand All @@ -193,7 +185,6 @@ const kRegularTextureFormatInfo = formatTableWithDefaults({
/*prettier-ignore*/ get renderTargetComponentAlignment() { return this.colorRender.alignment; },
/*prettier-ignore*/ get renderTargetPixelByteCost() { return this.colorRender.byteCost; },
multisample: true,
/*prettier-ignore*/ get sampleType() { return this.color.type; },
/*prettier-ignore*/ get bytesPerBlock() { return this.color.bytes; },
},
rg8sint: {
Expand All @@ -210,7 +201,6 @@ const kRegularTextureFormatInfo = formatTableWithDefaults({
/*prettier-ignore*/ get renderTargetComponentAlignment() { return this.colorRender.alignment; },
/*prettier-ignore*/ get renderTargetPixelByteCost() { return this.colorRender.byteCost; },
multisample: true,
/*prettier-ignore*/ get sampleType() { return this.color.type; },
/*prettier-ignore*/ get bytesPerBlock() { return this.color.bytes; },
},

Expand All @@ -229,7 +219,6 @@ const kRegularTextureFormatInfo = formatTableWithDefaults({
/*prettier-ignore*/ get renderTargetPixelByteCost() { return this.colorRender.byteCost; },
multisample: true,
baseFormat: 'rgba8unorm',
/*prettier-ignore*/ get sampleType() { return this.color.type; },
/*prettier-ignore*/ get bytesPerBlock() { return this.color.bytes; },
},
'rgba8unorm-srgb': {
Expand All @@ -247,7 +236,6 @@ const kRegularTextureFormatInfo = formatTableWithDefaults({
/*prettier-ignore*/ get renderTargetPixelByteCost() { return this.colorRender.byteCost; },
multisample: true,
baseFormat: 'rgba8unorm',
/*prettier-ignore*/ get sampleType() { return this.color.type; },
/*prettier-ignore*/ get bytesPerBlock() { return this.color.bytes; },
},
rgba8snorm: {
Expand All @@ -260,7 +248,6 @@ const kRegularTextureFormatInfo = formatTableWithDefaults({
bytes: 4,
},
multisample: false,
/*prettier-ignore*/ get sampleType() { return this.color.type; },
/*prettier-ignore*/ get bytesPerBlock() { return this.color.bytes; },
},
rgba8uint: {
Expand All @@ -277,7 +264,6 @@ const kRegularTextureFormatInfo = formatTableWithDefaults({
/*prettier-ignore*/ get renderTargetComponentAlignment() { return this.colorRender.alignment; },
/*prettier-ignore*/ get renderTargetPixelByteCost() { return this.colorRender.byteCost; },
multisample: true,
/*prettier-ignore*/ get sampleType() { return this.color.type; },
/*prettier-ignore*/ get bytesPerBlock() { return this.color.bytes; },
},
rgba8sint: {
Expand All @@ -294,7 +280,6 @@ const kRegularTextureFormatInfo = formatTableWithDefaults({
/*prettier-ignore*/ get renderTargetComponentAlignment() { return this.colorRender.alignment; },
/*prettier-ignore*/ get renderTargetPixelByteCost() { return this.colorRender.byteCost; },
multisample: true,
/*prettier-ignore*/ get sampleType() { return this.color.type; },
/*prettier-ignore*/ get bytesPerBlock() { return this.color.bytes; },
},
bgra8unorm: {
Expand All @@ -312,7 +297,6 @@ const kRegularTextureFormatInfo = formatTableWithDefaults({
/*prettier-ignore*/ get renderTargetPixelByteCost() { return this.colorRender.byteCost; },
multisample: true,
baseFormat: 'bgra8unorm',
/*prettier-ignore*/ get sampleType() { return this.color.type; },
/*prettier-ignore*/ get bytesPerBlock() { return this.color.bytes; },
},
'bgra8unorm-srgb': {
Expand All @@ -330,7 +314,6 @@ const kRegularTextureFormatInfo = formatTableWithDefaults({
/*prettier-ignore*/ get renderTargetPixelByteCost() { return this.colorRender.byteCost; },
multisample: true,
baseFormat: 'bgra8unorm',
/*prettier-ignore*/ get sampleType() { return this.color.type; },
/*prettier-ignore*/ get bytesPerBlock() { return this.color.bytes; },
},

Expand All @@ -350,7 +333,6 @@ const kRegularTextureFormatInfo = formatTableWithDefaults({
/*prettier-ignore*/ get renderTargetComponentAlignment() { return this.colorRender.alignment; },
/*prettier-ignore*/ get renderTargetPixelByteCost() { return this.colorRender.byteCost; },
multisample: true,
/*prettier-ignore*/ get sampleType() { return this.color.type; },
/*prettier-ignore*/ get bytesPerBlock() { return this.color.bytes; },
},
r16sint: {
Expand All @@ -367,7 +349,6 @@ const kRegularTextureFormatInfo = formatTableWithDefaults({
/*prettier-ignore*/ get renderTargetComponentAlignment() { return this.colorRender.alignment; },
/*prettier-ignore*/ get renderTargetPixelByteCost() { return this.colorRender.byteCost; },
multisample: true,
/*prettier-ignore*/ get sampleType() { return this.color.type; },
/*prettier-ignore*/ get bytesPerBlock() { return this.color.bytes; },
},
r16float: {
Expand All @@ -384,7 +365,6 @@ const kRegularTextureFormatInfo = formatTableWithDefaults({
/*prettier-ignore*/ get renderTargetComponentAlignment() { return this.colorRender.alignment; },
/*prettier-ignore*/ get renderTargetPixelByteCost() { return this.colorRender.byteCost; },
multisample: true,
/*prettier-ignore*/ get sampleType() { return this.color.type; },
/*prettier-ignore*/ get bytesPerBlock() { return this.color.bytes; },
},

Expand All @@ -402,7 +382,6 @@ const kRegularTextureFormatInfo = formatTableWithDefaults({
/*prettier-ignore*/ get renderTargetComponentAlignment() { return this.colorRender.alignment; },
/*prettier-ignore*/ get renderTargetPixelByteCost() { return this.colorRender.byteCost; },
multisample: true,
/*prettier-ignore*/ get sampleType() { return this.color.type; },
/*prettier-ignore*/ get bytesPerBlock() { return this.color.bytes; },
},
rg16sint: {
Expand All @@ -419,7 +398,6 @@ const kRegularTextureFormatInfo = formatTableWithDefaults({
/*prettier-ignore*/ get renderTargetComponentAlignment() { return this.colorRender.alignment; },
/*prettier-ignore*/ get renderTargetPixelByteCost() { return this.colorRender.byteCost; },
multisample: true,
/*prettier-ignore*/ get sampleType() { return this.color.type; },
/*prettier-ignore*/ get bytesPerBlock() { return this.color.bytes; },
},
rg16float: {
Expand All @@ -436,7 +414,6 @@ const kRegularTextureFormatInfo = formatTableWithDefaults({
/*prettier-ignore*/ get renderTargetComponentAlignment() { return this.colorRender.alignment; },
/*prettier-ignore*/ get renderTargetPixelByteCost() { return this.colorRender.byteCost; },
multisample: true,
/*prettier-ignore*/ get sampleType() { return this.color.type; },
/*prettier-ignore*/ get bytesPerBlock() { return this.color.bytes; },
},

Expand All @@ -454,7 +431,6 @@ const kRegularTextureFormatInfo = formatTableWithDefaults({
/*prettier-ignore*/ get renderTargetComponentAlignment() { return this.colorRender.alignment; },
/*prettier-ignore*/ get renderTargetPixelByteCost() { return this.colorRender.byteCost; },
multisample: true,
/*prettier-ignore*/ get sampleType() { return this.color.type; },
/*prettier-ignore*/ get bytesPerBlock() { return this.color.bytes; },
},
rgba16sint: {
Expand All @@ -471,7 +447,6 @@ const kRegularTextureFormatInfo = formatTableWithDefaults({
/*prettier-ignore*/ get renderTargetComponentAlignment() { return this.colorRender.alignment; },
/*prettier-ignore*/ get renderTargetPixelByteCost() { return this.colorRender.byteCost; },
multisample: true,
/*prettier-ignore*/ get sampleType() { return this.color.type; },
/*prettier-ignore*/ get bytesPerBlock() { return this.color.bytes; },
},
rgba16float: {
Expand All @@ -488,7 +463,6 @@ const kRegularTextureFormatInfo = formatTableWithDefaults({
/*prettier-ignore*/ get renderTargetComponentAlignment() { return this.colorRender.alignment; },
/*prettier-ignore*/ get renderTargetPixelByteCost() { return this.colorRender.byteCost; },
multisample: true,
/*prettier-ignore*/ get sampleType() { return this.color.type; },
/*prettier-ignore*/ get bytesPerBlock() { return this.color.bytes; },
},

Expand All @@ -508,7 +482,6 @@ const kRegularTextureFormatInfo = formatTableWithDefaults({
/*prettier-ignore*/ get renderTargetComponentAlignment() { return this.colorRender.alignment; },
/*prettier-ignore*/ get renderTargetPixelByteCost() { return this.colorRender.byteCost; },
multisample: false,
/*prettier-ignore*/ get sampleType() { return this.color.type; },
/*prettier-ignore*/ get bytesPerBlock() { return this.color.bytes; },
},
r32sint: {
Expand All @@ -525,7 +498,6 @@ const kRegularTextureFormatInfo = formatTableWithDefaults({
/*prettier-ignore*/ get renderTargetComponentAlignment() { return this.colorRender.alignment; },
/*prettier-ignore*/ get renderTargetPixelByteCost() { return this.colorRender.byteCost; },
multisample: false,
/*prettier-ignore*/ get sampleType() { return this.color.type; },
/*prettier-ignore*/ get bytesPerBlock() { return this.color.bytes; },
},
r32float: {
Expand All @@ -542,7 +514,6 @@ const kRegularTextureFormatInfo = formatTableWithDefaults({
/*prettier-ignore*/ get renderTargetComponentAlignment() { return this.colorRender.alignment; },
/*prettier-ignore*/ get renderTargetPixelByteCost() { return this.colorRender.byteCost; },
multisample: true,
/*prettier-ignore*/ get sampleType() { return this.color.type; },
/*prettier-ignore*/ get bytesPerBlock() { return this.color.bytes; },
},

Expand All @@ -560,7 +531,6 @@ const kRegularTextureFormatInfo = formatTableWithDefaults({
/*prettier-ignore*/ get renderTargetComponentAlignment() { return this.colorRender.alignment; },
/*prettier-ignore*/ get renderTargetPixelByteCost() { return this.colorRender.byteCost; },
multisample: false,
/*prettier-ignore*/ get sampleType() { return this.color.type; },
/*prettier-ignore*/ get bytesPerBlock() { return this.color.bytes; },
},
rg32sint: {
Expand All @@ -577,7 +547,6 @@ const kRegularTextureFormatInfo = formatTableWithDefaults({
/*prettier-ignore*/ get renderTargetComponentAlignment() { return this.colorRender.alignment; },
/*prettier-ignore*/ get renderTargetPixelByteCost() { return this.colorRender.byteCost; },
multisample: false,
/*prettier-ignore*/ get sampleType() { return this.color.type; },
/*prettier-ignore*/ get bytesPerBlock() { return this.color.bytes; },
},
rg32float: {
Expand All @@ -594,7 +563,6 @@ const kRegularTextureFormatInfo = formatTableWithDefaults({
/*prettier-ignore*/ get renderTargetComponentAlignment() { return this.colorRender.alignment; },
/*prettier-ignore*/ get renderTargetPixelByteCost() { return this.colorRender.byteCost; },
multisample: false,
/*prettier-ignore*/ get sampleType() { return this.color.type; },
/*prettier-ignore*/ get bytesPerBlock() { return this.color.bytes; },
},

Expand All @@ -612,7 +580,6 @@ const kRegularTextureFormatInfo = formatTableWithDefaults({
/*prettier-ignore*/ get renderTargetComponentAlignment() { return this.colorRender.alignment; },
/*prettier-ignore*/ get renderTargetPixelByteCost() { return this.colorRender.byteCost; },
multisample: false,
/*prettier-ignore*/ get sampleType() { return this.color.type; },
/*prettier-ignore*/ get bytesPerBlock() { return this.color.bytes; },
},
rgba32sint: {
Expand All @@ -629,7 +596,6 @@ const kRegularTextureFormatInfo = formatTableWithDefaults({
/*prettier-ignore*/ get renderTargetComponentAlignment() { return this.colorRender.alignment; },
/*prettier-ignore*/ get renderTargetPixelByteCost() { return this.colorRender.byteCost; },
multisample: false,
/*prettier-ignore*/ get sampleType() { return this.color.type; },
/*prettier-ignore*/ get bytesPerBlock() { return this.color.bytes; },
},
rgba32float: {
Expand All @@ -646,7 +612,6 @@ const kRegularTextureFormatInfo = formatTableWithDefaults({
/*prettier-ignore*/ get renderTargetComponentAlignment() { return this.colorRender.alignment; },
/*prettier-ignore*/ get renderTargetPixelByteCost() { return this.colorRender.byteCost; },
multisample: false,
/*prettier-ignore*/ get sampleType() { return this.color.type; },
/*prettier-ignore*/ get bytesPerBlock() { return this.color.bytes; },
},

Expand All @@ -666,7 +631,6 @@ const kRegularTextureFormatInfo = formatTableWithDefaults({
/*prettier-ignore*/ get renderTargetComponentAlignment() { return this.colorRender.alignment; },
/*prettier-ignore*/ get renderTargetPixelByteCost() { return this.colorRender.byteCost; },
multisample: true,
/*prettier-ignore*/ get sampleType() { return this.color.type; },
/*prettier-ignore*/ get bytesPerBlock() { return this.color.bytes; },
},
rgb10a2unorm: {
Expand All @@ -683,7 +647,6 @@ const kRegularTextureFormatInfo = formatTableWithDefaults({
/*prettier-ignore*/ get renderTargetComponentAlignment() { return this.colorRender.alignment; },
/*prettier-ignore*/ get renderTargetPixelByteCost() { return this.colorRender.byteCost; },
multisample: true,
/*prettier-ignore*/ get sampleType() { return this.color.type; },
/*prettier-ignore*/ get bytesPerBlock() { return this.color.bytes; },
},
rg11b10ufloat: {
Expand All @@ -696,7 +659,6 @@ const kRegularTextureFormatInfo = formatTableWithDefaults({
bytes: 4,
},
multisample: false,
/*prettier-ignore*/ get sampleType() { return this.color.type; },
/*prettier-ignore*/ get bytesPerBlock() { return this.color.bytes; },
renderTargetPixelByteCost: 8,
renderTargetComponentAlignment: 4,
Expand All @@ -714,7 +676,6 @@ const kRegularTextureFormatInfo = formatTableWithDefaults({
bytes: 4,
},
multisample: false,
/*prettier-ignore*/ get sampleType() { return this.color.type; },
/*prettier-ignore*/ get bytesPerBlock() { return this.color.bytes; },
},
},
Expand All @@ -735,7 +696,6 @@ const kSizedDepthStencilFormatInfo = formatTableWithDefaults({
readWriteStorage: false,
bytes: 1,
},
sampleType: 'uint',
copyDst: true,
bytesPerBlock: 1,
},
Expand All @@ -748,7 +708,6 @@ const kSizedDepthStencilFormatInfo = formatTableWithDefaults({
readWriteStorage: false,
bytes: 2,
},
sampleType: 'depth',
copyDst: true,
bytesPerBlock: 2,
},
Expand All @@ -761,7 +720,6 @@ const kSizedDepthStencilFormatInfo = formatTableWithDefaults({
readWriteStorage: false,
bytes: 4,
},
sampleType: 'depth',
copyDst: false,
bytesPerBlock: 4,
},
Expand All @@ -781,7 +739,6 @@ const kUnsizedDepthStencilFormatInfo = formatTableWithDefaults({
},
copySrc: false,
copyDst: false,
sampleType: 'depth',
renderable: true,
},
'depth24plus-stencil8': {
Expand All @@ -803,7 +760,6 @@ const kUnsizedDepthStencilFormatInfo = formatTableWithDefaults({
},
copySrc: false,
copyDst: false,
sampleType: 'depth',
renderable: true,
},
'depth32float-stencil8': {
Expand All @@ -826,7 +782,6 @@ const kUnsizedDepthStencilFormatInfo = formatTableWithDefaults({
feature: 'depth32float-stencil8',
copySrc: false,
copyDst: false,
sampleType: 'depth',
renderable: true,
},
},
Expand All @@ -838,7 +793,6 @@ const kBCTextureFormatInfo = formatTableWithDefaults({
blockHeight: 4,
multisample: false,
feature: 'texture-compression-bc',
sampleType: 'float',
copySrc: true,
copyDst: true,
},
Expand Down Expand Up @@ -1020,7 +974,6 @@ const kETC2TextureFormatInfo = formatTableWithDefaults({
blockHeight: 4,
multisample: false,
feature: 'texture-compression-etc2',
sampleType: 'float',
copySrc: true,
copyDst: true,
},
Expand Down Expand Up @@ -1152,7 +1105,6 @@ const kASTCTextureFormatInfo = formatTableWithDefaults({
defaults: {
multisample: false,
feature: 'texture-compression-astc',
sampleType: 'float',
copySrc: true,
copyDst: true,
},
Expand Down Expand Up @@ -1664,7 +1616,6 @@ type TextureFormatInfo_TypeCheck = {
baseFormat: GPUTextureFormat | undefined;
feature: GPUFeatureName | undefined;

sampleType: GPUTextureSampleType;
copySrc: boolean;
copyDst: boolean;
bytesPerBlock: number | undefined;
Expand Down

0 comments on commit a3ed6a0

Please sign in to comment.