Skip to content
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

ftime-trace flag is not respected by the DxcCompiler3 interface #6588

Open
bp-galopin opened this issue May 6, 2024 · 0 comments
Open

ftime-trace flag is not respected by the DxcCompiler3 interface #6588

bp-galopin opened this issue May 6, 2024 · 0 comments
Labels
bug Bug, regression, crash
Milestone

Comments

@bp-galopin
Copy link

Description

When using the DxcCompiler3 interface. The compilation argument -ftime-trace is ignored and no DXC_OUT_TIME_TRACE will be produced, same with the -ftime-report flag

Additionally, I should say that -ftime-report unconditionally writing to DXC_OUT_ERRORS is unfortunate and it would be nice if we could prevent it in a future release, just like the -ftime-trace=file allow !

In dxccompilerobj.cpp, the trace flag is only handled by the DxcCompilerAdapter::WrapCompile function. It is used internally by DxcCompilerAdapter::CompileWithDebug, DxcCompilerAdapter::Preprocess and DxcCompilerAdapter::Disassemble but calling IDxcCompiler3::Compile get you straight to DxcCompiler::Compile that has no support for it. The current workaround is to demote our user code from using the v3 interface to the v2 interface in order to compile though the internal adapter.

Steps to Reproduce

Instantiate a DxcCompiler3 in code and use the Compile function to compile a shader with one of the provided argument be -ftime-trace. Then try to query the output DXC_OUT_TIME_TRACE out of the DxcResult object, you will receive a INVALID_ARG error

Environment

  • DXC version 2024_03_29 and latest github source
  • Host Operating System Win11
@bp-galopin bp-galopin added bug Bug, regression, crash needs-triage Awaiting triage labels May 6, 2024
@llvm-beanz llvm-beanz added this to the Dormant milestone May 7, 2024
@llvm-beanz llvm-beanz removed the needs-triage Awaiting triage label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug, regression, crash
Projects
Status: Triaged
Development

No branches or pull requests

2 participants