-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the error caused by the lag in the WebGPU API #17980
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
👍 Package size ⤵ -48 bytes, old: 5441149, new: 5441101Interface Check Report! WARNING this pull request has changed these public interfaces:
@@ -66663,9 +66663,9 @@
* Indicates the value to clear {@link GPURenderPassDepthStencilAttachment#view}'s stencil component
* to prior to executing the render pass. Ignored if {@link GPURenderPassDepthStencilAttachment#stencilLoadOp}
* is not {@link GPULoadOp#"clear"}.
* The value will be converted to the type of the stencil aspect of `view` by taking the same
- * number of LSBs as the number of bits in the stencil aspect of one texel block of `view`.
+ * number of LSBs as the number of bits in the stencil aspect of one texel block|texel of `view`.
*/
stencilClearValue?: __types_webGPU__GPUStencilValue;
/**
* Indicates the load operation to perform on {@link GPURenderPassDepthStencilAttachment#view}'s
@@ -66842,18 +66842,25 @@
module: GPUShaderModule;
/**
* The name of the function in {@link GPUProgrammableStage#module} that this stage will use to
* perform its work.
+ * NOTE: Since the {@link GPUProgrammableStage#entryPoint} dictionary member is
+ * not required, methods which consume a {@link GPUProgrammableStage} must use the
+ * "[$get the entry point$]" algorithm to determine which entry point
+ * it refers to.
*/
entryPoint?: string;
/**
* Specifies the values of pipeline-overridable constants in the shader module
* {@link GPUProgrammableStage#module}.
* Each such pipeline-overridable constant is uniquely identified by a single
- * pipeline-overridable constant identifier string (representing the numeric ID of the
- * constant, if one is specified, and otherwise the constant's identifier name).
- * WGSL names (identifiers) in source maps follow the rules defined in WGSL identifier comparison.
- * The key of each key-value pair must equal the identifier string of one such constant.
+ * pipeline-overridable constant identifier string, representing the pipeline
+ * constant ID of the constant if its declaration specifies one, and otherwise the
+ * constant's identifier name.
+ * The key of each key-value pair must equal the
+ * pipeline-overridable constant identifier string|identifier string
+ * of one such constant, with the comparison performed
+ * according to the rules for WGSL identifier comparison.
* When the pipeline is executed, that constant will have the specified value.
* Values are specified as <dfn typedef for="">GPUPipelineConstantValue</dfn>, which is a {@link double}.
* They are converted [$to WGSL type$] of the pipeline-overridable constant (`bool`/`i32`/`u32`/`f32`/`f16`).
* If conversion fails, a validation error is generated.
@@ -66945,9 +66952,9 @@
*/
layout: GPUPipelineLayout | __types_webGPU__GPUAutoLayoutMode;
}
export type __types_webGPU__GPUVertexStepMode = "vertex" | "instance";
- export type __types_webGPU__GPUVertexFormat = "uint8x2" | "uint8x4" | "sint8x2" | "sint8x4" | "unorm8x2" | "unorm8x4" | "snorm8x2" | "snorm8x4" | "uint16x2" | "uint16x4" | "sint16x2" | "sint16x4" | "unorm16x2" | "unorm16x4" | "snorm16x2" | "snorm16x4" | "float16x2" | "float16x4" | "float32" | "float32x2" | "float32x3" | "float32x4" | "uint32" | "uint32x2" | "uint32x3" | "uint32x4" | "sint32" | "sint32x2" | "sint32x3" | "sint32x4" | "unorm10-10-10-2";
+ export type __types_webGPU__GPUVertexFormat = "uint8" | "uint8x2" | "uint8x4" | "sint8" | "sint8x2" | "sint8x4" | "unorm8" | "unorm8x2" | "unorm8x4" | "snorm8" | "snorm8x2" | "snorm8x4" | "uint16" | "uint16x2" | "uint16x4" | "sint16" | "sint16x2" | "sint16x4" | "unorm16" | "unorm16x2" | "unorm16x4" | "snorm16" | "snorm16x2" | "snorm16x4" | "float16" | "float16x2" | "float16x4" | "float32" | "float32x2" | "float32x3" | "float32x4" | "uint32" | "uint32x2" | "uint32x3" | "uint32x4" | "sint32" | "sint32x2" | "sint32x3" | "sint32x4" | "unorm10-10-10-2" | "unorm8x4-bgra";
export type __types_webGPU__GPUIndex32 = number;
export interface __types_webGPU__GPUVertexAttribute {
/**
* The {@link GPUVertexFormat} of the attribute.
@@ -66979,10 +66986,10 @@
attributes: Iterable<__types_webGPU__GPUVertexAttribute>;
}
export interface __types_webGPU__GPUVertexState extends __types_webGPU__GPUProgrammableStage {
/**
- * A list of {@link GPUVertexBufferLayout}s defining the layout of the vertex attribute data in the
- * vertex buffers used by this pipeline.
+ * A list of {@link GPUVertexBufferLayout}s, each defining the layout of vertex attribute data in a
+ * vertex buffer used by this pipeline.
*/
buffers?: Iterable<__types_webGPU__GPUVertexBufferLayout | null>;
}
export type __types_webGPU__GPUFrontFace = "ccw" | "cw";
@@ -67024,10 +67031,10 @@
export type __types_webGPU__GPUCompareFunction = "never" | "less" | "equal" | "less-equal" | "greater" | "not-equal" | "greater-equal" | "always";
export type __types_webGPU__GPUStencilOperation = "keep" | "zero" | "replace" | "invert" | "increment-clamp" | "decrement-clamp" | "increment-wrap" | "decrement-wrap";
export interface __types_webGPU__GPUStencilFaceState {
/**
- * The {@link GPUCompareFunction} used when testing fragments against
- * {@link GPURenderPassDescriptor#depthStencilAttachment} stencil values.
+ * The {@link GPUCompareFunction} used when testing the {@link RenderState#[[stencilReference]]} value
+ * against the fragment's {@link GPURenderPassDescriptor#depthStencilAttachment} stencil values.
*/
compare?: __types_webGPU__GPUCompareFunction;
/**
* The {@link GPUStencilOperation} performed if the fragment stencil comparison test described by
@@ -67080,17 +67087,17 @@
* bits are written to when performing stencil operations.
*/
stencilWriteMask?: __types_webGPU__GPUStencilValue;
/**
- * Constant depth bias added to each fragment. See [$biased fragment depth$] for details.
+ * Constant depth bias added to each triangle fragment. See [$biased fragment depth$] for details.
*/
depthBias?: __types_webGPU__GPUDepthBias;
/**
- * Depth bias that scales with the fragment’s slope. See [$biased fragment depth$] for details.
+ * Depth bias that scales with the triangle fragment’s slope. See [$biased fragment depth$] for details.
*/
depthBiasSlopeScale?: number;
/**
- * The maximum depth bias of a fragment. See [$biased fragment depth$] for details.
+ * The maximum depth bias of a triangle fragment. See [$biased fragment depth$] for details.
*/
depthBiasClamp?: number;
}
export type __types_webGPU__GPUSampleMask = number;
@@ -67112,9 +67119,9 @@
*/
alphaToCoverageEnabled?: boolean;
}
export type __types_webGPU__GPUBlendOperation = "add" | "subtract" | "reverse-subtract" | "min" | "max";
- export type __types_webGPU__GPUBlendFactor = "zero" | "one" | "src" | "one-minus-src" | "src-alpha" | "one-minus-src-alpha" | "dst" | "one-minus-dst" | "dst-alpha" | "one-minus-dst-alpha" | "src-alpha-saturated" | "constant" | "one-minus-constant";
+ export type __types_webGPU__GPUBlendFactor = "zero" | "one" | "src" | "one-minus-src" | "src-alpha" | "one-minus-src-alpha" | "dst" | "one-minus-dst" | "dst-alpha" | "one-minus-dst-alpha" | "src-alpha-saturated" | "constant" | "one-minus-constant" | "src1" | "one-minus-src1" | "src1-alpha" | "one-minus-src1-alpha";
export interface __types_webGPU__GPUBlendComponent {
/**
* Defines the {@link GPUBlendOperation} used to calculate the values written to the target
* attachment components.
@@ -67303,9 +67310,12 @@
sampler: _cocos_gfx_webgpu_webgpu_sampler__WebGPUSampler;
setLayout: gfx.DescriptorSetLayout;
descSet: gfx.DescriptorSet;
}
- export type __types_webGPU__PredefinedGPUColorSpace = "display-p3" | "srgb";
+ export type __types_webGPU__GPUCanvasToneMappingMode = "standard" | "extended";
+ export interface __types_webGPU__GPUCanvasToneMapping {
+ mode?: __types_webGPU__GPUCanvasToneMappingMode;
+ }
export type __types_webGPU__GPUCanvasAlphaMode = "opaque" | "premultiplied";
export interface __types_webGPU__GPUCanvasConfiguration {
/**
* The {@link GPUDevice} that textures returned by {@link GPUCanvasContext#getCurrentTexture} will be
@@ -67333,10 +67343,15 @@
/**
* The color space that values written into textures returned by
* {@link GPUCanvasContext#getCurrentTexture} should be displayed with.
*/
- colorSpace?: __types_webGPU__PredefinedGPUColorSpace;
+ colorSpace?: PredefinedColorSpace;
/**
+ * The tone mapping determines how the content of textures returned by
+ * {@link GPUCanvasContext#getCurrentTexture} are to be displayed.
+ */
+ toneMapping?: __types_webGPU__GPUCanvasToneMapping;
+ /**
* Determines the effect that alpha values will have on the content of textures returned by
* {@link GPUCanvasContext#getCurrentTexture} when read, displayed, or used as an image source.
*/
alphaMode?: __types_webGPU__GPUCanvasAlphaMode;
|
star-e
approved these changes
Nov 28, 2024
qiuguohua
pushed a commit
to qiuguohua/cocos-engine
that referenced
this pull request
Nov 28, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.