Skip to content

Commit

Permalink
Merge branch 'main' into fix-reject-expr
Browse files Browse the repository at this point in the history
  • Loading branch information
kainino0x authored Jul 15, 2024
2 parents 894ad5e + c623e2b commit db3acfb
Show file tree
Hide file tree
Showing 19 changed files with 1,911 additions and 143 deletions.
2 changes: 1 addition & 1 deletion src/resources/cache/hashes.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
2 changes: 1 addition & 1 deletion src/webgpu/api/validation/buffer/mapping.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,7 @@ g.test('getMappedRange,disjointRanges')
t.testGetMappedRangeCall(success, buffer, offset2, size2);
});

g.test('getMappedRange,disjoinRanges_many')
g.test('getMappedRange,disjointRanges_many')
.desc('Test getting a lot of small ranges, and that the disjoint check checks them all.')
.fn(async t => {
const kStride = 256;
Expand Down
19 changes: 19 additions & 0 deletions src/webgpu/format_info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1773,6 +1773,18 @@ export function isCompressedTextureFormat(format: GPUTextureFormat) {
return format in kCompressedTextureFormatInfo;
}

export function isDepthTextureFormat(format: GPUTextureFormat) {
return !!kTextureFormatInfo[format].depth;
}

export function isStencilTextureFormat(format: GPUTextureFormat) {
return !!kTextureFormatInfo[format].stencil;
}

export function isDepthOrStencilTextureFormat(format: GPUTextureFormat) {
return isDepthTextureFormat(format) || isStencilTextureFormat(format);
}

export const kCompatModeUnsupportedStorageTextureFormats: readonly GPUTextureFormat[] = [
'rg32float',
'rg32sint',
Expand All @@ -1796,6 +1808,13 @@ export function isRegularTextureFormat(format: GPUTextureFormat) {
return format in kRegularTextureFormatInfo;
}

/**
* Returns true of format is both compressed and a float format, for example 'bc6h-rgb-ufloat'.
*/
export function isCompressedFloatTextureFormat(format: GPUTextureFormat) {
return isCompressedTextureFormat(format) && format.includes('float');
}

export const kFeaturesForFormats = getFeaturesForFormats(kAllTextureFormats);

/**
Expand Down
8 changes: 7 additions & 1 deletion src/webgpu/listing_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@
"webgpu:api,validation,buffer,destroy:while_mapped:*": { "subcaseMS": 1.150 },
"webgpu:api,validation,buffer,mapping:gc_behavior,mapAsync:*": { "subcaseMS": 32.200 },
"webgpu:api,validation,buffer,mapping:gc_behavior,mappedAtCreation:*": { "subcaseMS": 76.200 },
"webgpu:api,validation,buffer,mapping:getMappedRange,disjoinRanges_many:*": { "subcaseMS": 73.700 },
"webgpu:api,validation,buffer,mapping:getMappedRange,disjointRanges_many:*": { "subcaseMS": 73.700 },
"webgpu:api,validation,buffer,mapping:getMappedRange,disjointRanges:*": { "subcaseMS": 2.257 },
"webgpu:api,validation,buffer,mapping:getMappedRange,offsetAndSizeAlignment,mapped:*": { "subcaseMS": 3.119 },
"webgpu:api,validation,buffer,mapping:getMappedRange,offsetAndSizeAlignment,mappedAtCreation:*": { "subcaseMS": 5.611 },
Expand Down Expand Up @@ -1552,6 +1552,7 @@
"webgpu:shader,execution,expression,call,builtin,textureLoad:sampled_1d:*": { "subcaseMS": 83.312 },
"webgpu:shader,execution,expression,call,builtin,textureLoad:sampled_2d:*": { "subcaseMS": 96.737 },
"webgpu:shader,execution,expression,call,builtin,textureLoad:sampled_3d:*": { "subcaseMS": 158.534 },
"webgpu:shader,execution,expression,call,builtin,textureLoad:storage_texel_formats:*": { "subcaseMS": 471.569 },
"webgpu:shader,execution,expression,call,builtin,textureNumLayers:arrayed:*": { "subcaseMS": 8.102 },
"webgpu:shader,execution,expression,call,builtin,textureNumLayers:sampled:*": { "subcaseMS": 2.101 },
"webgpu:shader,execution,expression,call,builtin,textureNumLayers:storage:*": { "subcaseMS": 8.000 },
Expand Down Expand Up @@ -1594,12 +1595,14 @@
"webgpu:shader,execution,expression,call,builtin,textureSampleLevel:sampled_3d_coords:*": { "subcaseMS": 118.901 },
"webgpu:shader,execution,expression,call,builtin,textureSampleLevel:sampled_array_2d_coords:*": { "subcaseMS": 822.400 },
"webgpu:shader,execution,expression,call,builtin,textureSampleLevel:sampled_array_3d_coords:*": { "subcaseMS": 817.200 },
"webgpu:shader,execution,expression,call,builtin,textureStore:bgra8unorm_swizzle:*": { "subcaseMS": 30.325 },
"webgpu:shader,execution,expression,call,builtin,textureStore:out_of_bounds:*": { "subcaseMS": 942.418 },
"webgpu:shader,execution,expression,call,builtin,textureStore:out_of_bounds_array:*": { "subcaseMS": 609.565 },
"webgpu:shader,execution,expression,call,builtin,textureStore:store_1d_coords:*": { "subcaseMS": 19.907 },
"webgpu:shader,execution,expression,call,builtin,textureStore:store_2d_coords:*": { "subcaseMS": 28.809 },
"webgpu:shader,execution,expression,call,builtin,textureStore:store_3d_coords:*": { "subcaseMS": 37.206 },
"webgpu:shader,execution,expression,call,builtin,textureStore:store_array_2d_coords:*": { "subcaseMS": 98.804 },
"webgpu:shader,execution,expression,call,builtin,textureStore:texel_formats:*": { "subcaseMS": 86.179 },
"webgpu:shader,execution,expression,call,builtin,transpose:abstract_float:*": { "subcaseMS": 64537.678 },
"webgpu:shader,execution,expression,call,builtin,transpose:f16:*": { "subcaseMS": 33.311 },
"webgpu:shader,execution,expression,call,builtin,transpose:f32:*": { "subcaseMS": 75.887 },
Expand Down Expand Up @@ -1678,6 +1681,9 @@
"webgpu:shader,execution,expression,unary,f16_conversion:i32:*": { "subcaseMS": 24.557 },
"webgpu:shader,execution,expression,unary,f16_conversion:u32:*": { "subcaseMS": 84.500 },
"webgpu:shader,execution,expression,unary,f32_arithmetic:negation:*": { "subcaseMS": 16.400 },
"webgpu:shader,execution,expression,unary,f32_conversion:abstract_float:*": { "subcaseMS": 688.718 },
"webgpu:shader,execution,expression,unary,f32_conversion:abstract_float_mat:*": { "subcaseMS": 1409.951 },
"webgpu:shader,execution,expression,unary,f32_conversion:abstract_int:*": { "subcaseMS": 506.131 },
"webgpu:shader,execution,expression,unary,f32_conversion:bool:*": { "subcaseMS": 7.182 },
"webgpu:shader,execution,expression,unary,f32_conversion:f16:*": { "subcaseMS": 107.463 },
"webgpu:shader,execution,expression,unary,f32_conversion:f16_mat:*": { "subcaseMS": 60.170 },
Expand Down
Loading

0 comments on commit db3acfb

Please sign in to comment.