-
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
gpu profiler. #16319
gpu profiler. #16319
Conversation
Interface Check Report! WARNING this pull request has changed these public interfaces:
@@ -8738,8 +8738,19 @@
MOVE = 3,
RAYTRACE = 4,
PRESENT = 5
}
+ export enum PipelineStatisticFlagBit {
+ NONE = 0,
+ IA_VERTICES = 1,
+ IA_PRIMITIVES = 2,
+ VS_INVOCATIONS = 4,
+ CLIP_INVOCATIONS = 8,
+ CLIP_PRIMITIVES = 16,
+ FS_INVOCATIONS = 32,
+ CS_INVOCATIONS = 64,
+ ALL = 127
+ }
export type BufferUsage = BufferUsageBit;
export type BufferFlags = BufferFlagBit;
export type MemoryAccess = MemoryAccessBit;
export type MemoryUsage = MemoryUsageBit;
@@ -8749,8 +8760,9 @@
export type ShaderStageFlags = ShaderStageFlagBit;
export type AccessFlags = AccessFlagBit;
export type DynamicStateFlags = DynamicStateFlagBit;
export type ClearFlags = ClearFlagBit;
+ export type PipelineStatisticFlags = PipelineStatisticFlagBit;
export class Size {
x: number;
y: number;
z: number;
@@ -8777,13 +8789,14 @@
maxComputeSharedMemorySize: number;
maxComputeWorkGroupInvocations: number;
maxComputeWorkGroupSize: Size;
maxComputeWorkGroupCount: Size;
+ timestampPeriod: number;
supportQuery: boolean;
clipSpaceMinZ: number;
screenSpaceSignY: number;
clipSpaceSignY: number;
- constructor(maxVertexAttributes?: number, maxVertexUniformVectors?: number, maxFragmentUniformVectors?: number, maxTextureUnits?: number, maxImageUnits?: number, maxVertexTextureUnits?: number, maxColorRenderTargets?: number, maxShaderStorageBufferBindings?: number, maxShaderStorageBlockSize?: number, maxUniformBufferBindings?: number, maxUniformBlockSize?: number, maxTextureSize?: number, maxCubeMapTextureSize?: number, maxArrayTextureLayers?: number, max3DTextureSize?: number, uboOffsetAlignment?: number, maxComputeSharedMemorySize?: number, maxComputeWorkGroupInvocations?: number, maxComputeWorkGroupSize?: Size, maxComputeWorkGroupCount?: Size, supportQuery?: boolean, clipSpaceMinZ?: number, screenSpaceSignY?: number, clipSpaceSignY?: number);
+ constructor(maxVertexAttributes?: number, maxVertexUniformVectors?: number, maxFragmentUniformVectors?: number, maxTextureUnits?: number, maxImageUnits?: number, maxVertexTextureUnits?: number, maxColorRenderTargets?: number, maxShaderStorageBufferBindings?: number, maxShaderStorageBlockSize?: number, maxUniformBufferBindings?: number, maxUniformBlockSize?: number, maxTextureSize?: number, maxCubeMapTextureSize?: number, maxArrayTextureLayers?: number, max3DTextureSize?: number, uboOffsetAlignment?: number, maxComputeSharedMemorySize?: number, maxComputeWorkGroupInvocations?: number, maxComputeWorkGroupSize?: Size, maxComputeWorkGroupCount?: Size, timestampPeriod?: number, supportQuery?: boolean, clipSpaceMinZ?: number, screenSpaceSignY?: number, clipSpaceSignY?: number);
copy(info: Readonly<DeviceCaps>): DeviceCaps;
}
export class DeviceOptions {
enableBarrierDeduce: boolean;
@@ -9568,8 +9581,15 @@
* @param usage The GFX texture usage.
* @param flags The GFX texture create flags.
*/
getMaxSampleCount(format: Format, usage: TextureUsage, flags: TextureFlags): SampleCount;
+ /**
+ * @en Get supported pipeline statistic flags by device query.
+ * @zh 获取可通过设备查询获取的管线硬件数据类型
+ * @param flags Pipeline statistic flag to be tested.
+ * @param outFlags Pipeline statistic flag test result.
+ */
+ getSupportedPipelineStatisticFlags(flags: Readonly<PipelineStatisticFlags>, outFlags: PipelineStatisticFlags): number;
}
export class DefaultResource {
constructor(device: Device);
getTexture(type: TextureType): Texture | null;
|
fc8eeff
to
83c385a
Compare
83c385a
to
de972b8
Compare
de972b8
to
269b839
Compare
@bluesky013, Please check the result of
Task Details |
@bluesky013, Please check the result of
Task Details |
cocos/renderer/pipeline/profile/GPUTimeQuery.cpp | ||
cocos/renderer/pipeline/profile/GPUTimeQuery.h | ||
cocos/renderer/pipeline/profile/GPUStatisticsQuery.cpp | ||
cocos/renderer/pipeline/profile/GPUStatisticsQuery.h | ||
cocos/renderer/pipeline/profile/PipelineProfiler.cpp | ||
cocos/renderer/pipeline/profile/PipelineProfiler.h |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might rename folder profile
to profiler
. Profile as noun has different meaning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this should be the profiler
.
void BufferAgent::readBack(void *dst, uint32_t offset, uint32_t size) { | ||
auto *mq = DeviceAgent::getInstance()->getMessageQueue(); | ||
ENQUEUE_MESSAGE_4( | ||
mq, BufferUpdate, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use readBack instead of BufferUpdate here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forgot to modify the label.
@@ -33,7 +33,7 @@ namespace { | |||
|
|||
constexpr uint32_t FORCE_MINOR_VERSION = 0; // 0 for default version, otherwise minorVersion = (FORCE_MINOR_VERSION - 1) | |||
|
|||
#define FORCE_ENABLE_VALIDATION 0 | |||
#define FORCE_ENABLE_VALIDATION 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Submitted code should have validation turned off
@@ -388,7 +388,7 @@ void CommandBufferValidator::draw(const DrawInfo &info) { | |||
if (!_curStates.descriptorSets[i]) continue; // there may be inactive sets | |||
const auto &dsBindings = _curStates.descriptorSets[i]->getLayout()->getBindings(); | |||
const auto &psoBindings = psoLayouts[i]->getBindings(); | |||
CC_ASSERT(psoBindings.size() == dsBindings.size()); | |||
// CC_ASSERT(psoBindings.size() == dsBindings.size()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is builtin per-pass binding of [0: CCCamera , 1: CCConst] failed this validation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to roll back here.
Re: #
Changelog
Continuous Integration
This pull request:
Compatibility Check
This pull request: