Skip to content

Fix #6: Produce dxil container output when validation is disabled.#7

Merged
dmpots merged 2 commits intomasterfrom
dmpots_vd_fix
Jan 14, 2017
Merged

Fix #6: Produce dxil container output when validation is disabled.#7
dmpots merged 2 commits intomasterfrom
dmpots_vd_fix

Conversation

@dmpots
Copy link
Copy Markdown
Contributor

@dmpots dmpots commented Jan 9, 2017

Make sure that we wrap the llvm bitcode module in a dxil container
even when validation is disabled.

Note that we still produce a raw bitcode module output when only a
high- level compilation is requested by /fcgl.

Make sure that we wrap the llvm bitcode module in a dxil container
even when validation is disabled.

Note that we still produce a raw bitcode module output when only a
high- level compilation is requested by /fcgl.
@msftclas
Copy link
Copy Markdown

msftclas commented Jan 9, 2017

Hi @dmpots, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!


It looks like you're a Microsoft contributor (David Peixotto). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;

Copy link
Copy Markdown
Contributor

@marcelolr marcelolr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're probably missing a test for the debug info case - we can add that when we do the update.

void WrapModuleInDxilContainer(IMalloc *pMalloc, llvm::Module *llvmModule, AbstractMemoryStream *pModuleBitcode, CComPtr<IDxcBlob> &pDxilContainerBlob) {
CComPtr<AbstractMemoryStream> pContainerStream;
IFT(CreateMemoryStream(pMalloc, &pContainerStream));
SerializeDxilContainerForModule(llvmModule, pModuleBitcode, pContainerStream);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra indent level here

HRESULT valHR = S_OK;
std::unique_ptr<llvm::Module> llvmModule = action.takeModule();
if (!opts.CodeGenHighLevel)
WrapModuleInDxilContainer(pMalloc, llvmModule.get(), pOutputStream, pOutputBlob);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Serializing the module into a container will cause the original module to have its debug information stripped, so this will need to be updated to support the debug info module being used properly.

When the llvm module is serialized to a dxil container we strip the
debug info. When using the internal validator we need to make a copy of
the llvm module before serializing so that debug info is present for
validation error messages.

Added a test to check that validation error messages have valid debug
info.
@dmpots dmpots merged commit ae6a580 into master Jan 14, 2017
@dmpots dmpots deleted the dmpots_vd_fix branch January 14, 2017 01:58
tex3d added a commit that referenced this pull request Feb 10, 2017
Integrate validation and dxc option updates
damyanp referenced this pull request in damyanp/DirectXShaderCompiler Mar 22, 2025
* Initial proposal for math modes

The new HLSL math modes aims to provide an alternative to the `precise`
attribute which will both be less bug prone and provide a higher degree
of control for developers.

* Add bullet about dependency on C++ attributes.
s-perron pushed a commit that referenced this pull request Mar 3, 2026
… `vk::SampledTexture2D` type. (#8158)

Part of #7979

Support subscriptor indexing `[]` and `.mips[]` for `SampledTexture2D`.


`.sample[]` will not be allowed, as in `Texture2D`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants