Граф коммитов

219 Коммитов

Автор SHA1 Сообщение Дата
Young Kim 55667043c3 Support denorm option (#446)
This change is to support preserve denorm operations. We do this by creating dxc options and propagate them all the way to dxil metadata so that drivers can see how it should handle floats.
Currently we support three modes: any(default), preserve, and ftz

Denorm option will be of per function flag. We store this information at function annotation metadata. This means that for DXIL 1.2 we have a new structure for function annotation. The change in structure is documented on DXIL.rst
2017-07-27 10:08:14 -07:00
Marcelo Lopez Ruiz d5bb3089cf Add support for custom allocators (#390)
Supporting a custom allocator for dxcompiler.
Adds recovery for exceptions and out-of-memory handling.
Add custom allocator support to linker.
Fix for release-only test failure.
Removes assertion about presence of command-line option registration
2017-07-06 16:45:48 -07:00
Xiang Li b6e876bf39 Don't change function linkage for library profile. 2017-06-19 15:14:27 -07:00
Xiang Li 8e21407ca9 Add library profile. 2017-06-19 15:14:27 -07:00
Tex Riddell b4fa7bc4cc Convert DoBasicQueryInterface* functions to single variadic template (#304) 2017-05-19 18:52:52 -07:00
Marcelo Lopez Ruiz ad76d814a4 Debug name part implementation (#264)
* Add documentation with source-level debugging with HLSL and DXIL.
* Fix trailing underscore in generate .rst documentation.
* Add container support for debug name part.
* Bump validator version to 1.1.
* Implement debug stripping in dxc, including /Fd dir-named behavior.
* Implement IDxcCompiler2 and CompileWithDebug.
2017-05-09 18:32:48 -07:00
Lei Zhang 2c7a3fc39d [spirv] Add bare bone code for SPIR-V codegen (#233)
* [spirv] Add libclangSPIRV and skeleton FrontendAction for SPIR-V

* [spirv] Add -spirv into dxc for invoking EmitSPIRVAction

* [spirv] Build SPIR-V codegen conditionally

Added ENABLE_SPIRV_CODEGEN in CMake config to control the
building of SPIR-V component and wrap up SPIR-V code using it.
Also add -spirv to hctbuild to turn it on.
2017-05-05 19:39:59 -03:00
Tex Riddell 23082dbef2 Add HLSL 2017 (-HV 2017) option. (#245)
- Fix detection of invalid options in dxcompilerobj
2017-04-24 16:05:06 -07:00
Xiang Li 3911371309 Fix dbg info for temp variable. (#230)
1. Remove debug info when strip function parameter from entry function.
2. Set OptLevel to 0 for -Od.
3. If optimization is disabled, always load ReturnValue.
2017-04-18 13:49:59 -07:00
David Peixotto 67685d9660 Expand macros in root signature and semantic defines (#122)
This commit adds a standalone class for expanding macros and uses it
to for root signature and semantic define processing. Previously,
we were using the raw macro value instead of the expanded value
so something like:

    #define MYRS "DescriptorTable(SRV(t0))"
    #define RS   MYRS

would fail to compile the root signature with an entry point of
RS because it would get a root signature value of MYRS instead
of the expanded value. Similarly, for semantic defines we were
saving the non-expanded value into the bitcode.

This commit also adds a new flag that is used to specify that
the root signature should be read from a #define. So compiling
with `-rootsig-define RS` will read the root signature from
a `#define RS ...` in the source. The -roosig-define flag
takes precedence over a root signature annotation in the souce.
2017-03-07 11:34:23 -08:00
Xiang Li 38586597b9 Support -T rootsig_1_0/rootsig_1_1. (#112) 2017-03-01 17:00:45 -08:00
Tex Riddell 51898662c9 Close #75 - Pack prefix-stable by default (#90)
* Implement prefix-stable packing and make this the default.
* Add signature packing options -pack_prefix_stable and -pack_optimized.
2017-02-14 18:22:54 -08:00
Young Kim 6b01781e58 Fix dxc option to supress warnings. (#83)
* Fix dxc option to supress warnings.

 - Modifying option handling to enable no-warnings as expected

* Fix OutputWarnings option to enable by default
2017-02-13 11:45:43 -08:00
Young Kim b238ed36c3 Dxc fix verifyrootsignature option (#6)
* Dxc fix verifyrootsignature option

- distinguish stream type (stdout, stderr) when printing to console
- verifyrootsignature option returns correct errorlevel depending on its result
- adding more test cases to hcttest for verifyrootsignature option
- enable verifyrootsignature option when dxil.dll not present

* Fixes from review

- Change parameters for writing to consoles from File* to DWORD
- Change comment when dxil.dll does not exist
2017-02-07 17:02:14 -08:00
Young Kim 3a24e158ef Fixing Dxc Options (#4)
* Clean up dxc options:

setrootsignature, setprivate :
 Allow replacing existing rootsignature or private data and make a new container with new parts
(e.g dxc /dumpbin private.dxil /setprivate private.data /Fo private.new.dxil)

extractrootsignature:
Make it back compatible with fxc by returning dxil container with RTS0 part only and having the user to provide /Fo option.

Other Options:
For unimplemented options that was from fxc, ignore those options and proceed given operation.
For unimplemented options that was not from fxc, remove them for now.
Add more test cases for dxc command line operations.
Fix ISenseOption flag to have valid HLSL version check for dxc (disable 2015)

* Fix Preprocess option for dxc
Fix hcttestcmd for testing invalid rootsignature
2017-02-03 15:49:45 -08:00
Tex Riddell c18ed9133e Merge remote-tracking branch 'ms/dxil-v1.0' into integration 2017-02-01 15:43:43 -08:00
Young Kim 5a916c56d9 Adding options for dxc
- Update command line options of dxc
    (Qstrip_debug, Qstrip_priv, Qstrip_rootsignature, setrootsignature, getprivate, setprivate)
  - Add IDxcContainerBuilder API and its implementation
  - Resolve lifetime of dxil.dll on dxcompiler.dll to guarantee access of memory generated from dxil.dll
2017-01-31 17:56:38 -08:00
Tex Riddell af6b2a552f fixes #37 - License cleanup. 2017-01-27 16:48:08 -08:00
Marcelo Lopez Ruiz 6ee4074a4b first commit 2016-12-28 11:52:27 -08:00