DirectXShaderCompiler icon indicating copy to clipboard operation
DirectXShaderCompiler copied to clipboard

Asserts are used in place of DXASSERT in shader debug passes

Open jeffnn opened this issue 1 year ago • 1 comments

Description See bob80905's comments on PR https://github.com/microsoft/DirectXShaderCompiler/pull/6300 In summary, "assert" was used when "DXASSERT" is preferred. Plus, some of the asserts are just plain "assert(false)" and could be refactored into something more meaningful.

Steps to Reproduce (Code issue. No repro exists.)

Actual Behavior "assert" is used!

Environment None. Code issue.

jeffnn avatar Feb 14 '24 20:02 jeffnn

I think it would be better to use the c-standard assert over DXASSERT for portability and understandability of the code. Cases that are assert(false) should probably be llvm_unreachable(<msg>) instead.

llvm-beanz avatar Mar 20 '24 20:03 llvm-beanz