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

417 Коммитов

Автор SHA1 Сообщение Дата
Tex Riddell a26681c807 Merge branch 'master' into rtmaster
# Conflicts:
#	lib/HLSL/DxilGenerationPass.cpp
#	lib/HLSL/DxilValidation.cpp
#	tools/clang/tools/dxcompiler/dxclinker.cpp
2018-05-22 20:52:03 -07:00
Greg Roth d27307905c Make correct/consistent include capitalization (#1269)
Several #included files were capitalized incorrectly in the case of
files pertaining to the project, or inconsistently in the case of
Windows headers which are typically only relevant where capitalization
doesn't matter. In spite of that, consistent capitalization can be
useful for cross platform stubbing purposes.

This corrects capitalization of a few Dxil* headers and forces
capitalization of Windows-specific headers to be consistent with
the overwhelming majority of other cases.

No functional change, just cross-platform facilitation
2018-05-10 10:47:52 -07:00
Tex Riddell 8bdf2fef5f Merged PR 69: Add -auto-binding-space option enabling auto-binding for lib targets
Add -auto-binding-space option enabling auto-binding for lib targets

- Added DxilAllocateResourcesForLib pass to allow auto-binding any unbound
resources in a DxcOptimizer pass.
2018-05-02 17:50:41 +00:00
Tex Riddell 283b71ca16 Change PerThreadFileSystem solution to still require explicit Setup
- Added AutoCleanupPerThreadFileSystem for calling cleanup on scope exit,
  useful for command line users.
- Use global singleton and ensure cleanup on exit if not called
- Put setup/cleanup in VerifierTest.cpp where the TestModule[Setup|Cleanup]
  methods live.
- Remove GlobalPerThreadSys from FileCheckForTest, since this has to happen
  at the module level instead.
- Added Setup/Cleanup to all the appropriate places
2018-04-19 18:42:52 -07:00
Tex Riddell 5ab102a352 Merge branch 'master' into rtmaster 2018-04-16 15:25:53 -07:00
Lei Zhang 35d0aeae20
Change Appveyor to do Release build (#1200)
Also changed to use the build project from antiagainst's account.
2018-04-13 15:29:57 -04:00
Young Kim 0777a7a020 Merge branch 'master' into rtmaster 2018-04-10 16:47:47 -07:00
Helena Kotas e4c5158b98 Fix compile shaders with relative path and include files
Fixes #991
2018-04-06 15:34:41 -07:00
Xiang Li 357803d342
Don't sink sample coordinate into control flow. (#1188) 2018-03-29 16:33:59 -07:00
Shawn Farkas 368aead044
Add an isAlwaysUniform property to instructions (#1168)
Add an isAlwaysUniform property to instructions
2018-03-21 18:51:00 -07:00
Tex Riddell e237f8a57e Merged PR 50: Fix attributes for ray intrinsics that can change during traversal
Fix attributes for ray intrinsics that can change during traversal
2018-03-13 03:13:03 +00:00
Tex Riddell cb5f27c080 Merge branch 'master' into user/texr/rt-merge-rebase 2018-03-12 13:11:12 -07:00
Tex Riddell d2f227b210
hctstart.cmd - flexible SDK detection using min version (#1121)
- match method and reg keys used by cmake script
2018-03-12 12:56:17 -07:00
Tex Riddell f8e1af0417 Merge branch 'master' into user/texr/rt-merge-rebase 2018-03-09 00:55:21 -08:00
Young Kim fc2cbbd4ce
revert cosh test tolerance value for float32 (#1119) 2018-03-07 17:49:51 -08:00
Young Kim a71140cdaa
Relax hcos tolerance range (#1114) 2018-03-06 17:33:32 -08:00
Young Kim 7895e40376
Fix div denorm ftz (#1113) 2018-03-06 17:33:24 -08:00
Adam Yang c252cc430c Modified hctgettaef.py to use tls1.2 when requesting files files github. 2018-03-05 14:08:35 -08:00
Young Kim 81ecfef34b
Fix denorm preserve division with high value of denominator (#1093) 2018-03-01 07:41:10 -08:00
Tex Riddell 914c040b14 Merged PR 26: Fix intrinsic names to match spec.
Fix intrinsic names to match spec.

- PrimitiveIndex still maps to low level dx.op.primitiveID
2018-02-21 21:51:20 +00:00
Tex Riddell 634fd7556b Merge branch 'rtmaster' into user/texr/rt-merge-rebase 2018-02-20 19:12:09 -08:00
Young Kim b287dd7d71
More overload for TextureGather and TextureGatherCmp (#1069) 2018-02-20 12:35:19 -08:00
Young Kim 3a77648684
Fix argument passing for tertiary denorm mode (#1078) 2018-02-20 12:33:49 -08:00
Tex Riddell 520f06d442 change *_USER_DEFINE_TYPE to *_USER_DEFINED_TYPE 2018-02-13 15:46:32 -08:00
Tex Riddell 7d145d64d5 Merge branch 'master' into user/texr/rt-merge-rebase 2018-02-12 17:51:50 -08:00
Young Kim 69e2583196 Adding RayFlags and HitKind built in constants 2018-02-13 00:24:18 +00:00
Young Kim e9f17e3c87
Fix denorm tests and sm support (#1059)
- Fixing device support for > SM 6.0
- updating dxexp
- Also fixing the following tests:
ExecutionTest::DenormBinaryFloatOpTest#FDivDenormFTZ
ExecutionTest::DenormBinaryFloatOpTest#FAddDenormAny
ExecutionTest::DenormBinaryFloatOpTest#FMulDenormAny
ExecutionTest::DenormBinaryFloatOpTest#FDivDenormAny
ExecutionTest::DenormBinaryFloatOpTest#FMulDenormFTZ
ExecutionTest::DenormBinaryFloatOpTest#FAddDenormFTZ
ExecutionTest::DenormBinaryFloatOpTest#FSubDenormFTZ
ExecutionTest::DenormBinaryFloatOpTest#FSubDenormAny
ExecutionTest::DenormTertiaryFloatOpTest#FMadDenormAny
ExecutionTest::DenormTertiaryFloatOpTest#FMadDenormFTZ
2018-02-07 13:51:16 -08:00
Xiang Li fdb8161ccb 1. Not replace local/static resource to handle for lib.
2. Not SROA on resource.
3. avoid unpack for resource.
4. Use value type for createHandleForLib.
5. Move all scalar global resource load to the beginning of function.
   This will stop other pass do optimizations on the loads of scalar global resource.
6. Not remove local resource for lib.
2018-02-06 19:30:24 -08:00
Young Kim e5bb22baf7
Fix sqrt,rsqrt and ulp test for half (#1054) 2018-02-06 14:57:58 -08:00
Xiang Li fdf2c31ca6 1. Fix IgnoreHit and AcceptHitAndEndSearch.
2. Support init list for RayDesc.
3. Remove range_id for lib.
4. Update some test.
2018-02-05 18:51:47 -08:00
Xiang Li dc3ad5efe5 Lower createHandelForLib.
TODO: fix nonUniform, resource array fails and remove LinkInfo.
2018-02-05 17:54:08 -08:00
Xiang Li 519938f12e Lower HLCreateHandle into CreateHandleFromResourceStructForLib. 2018-02-05 17:54:07 -08:00
Xiang Li 69bc49ffe4 Support System Value retrieval functions. 2018-02-05 17:54:07 -08:00
Xiang Li c45aa784ac Add AcceptHitAndEndSearch, CallShader, CommitHitAndStopRay and change ReportIntersection into ReportHit.
Also change RayTracingAccelerationStructure into RaytracingAccelerationStructure.
2018-02-05 17:54:06 -08:00
Xiang Li eb4b0ae768 Support user define type for dxil operation.
Add RayTracingAccelerationStructure to dxil resource.
Lower ReportIntersection and TraceRay.
2018-02-05 17:54:05 -08:00
Xiang Li bc2e19b771 Support TraceRay and ReportIntersection which has user-define param at front-end. 2018-02-05 17:54:04 -08:00
Young Kim 6f2aaa6ab3
Preserve denorms for frc on half inputs, and fix sqrt(-denorm) for float (#1042) 2018-01-30 16:52:58 -08:00
Young Kim 1e97116e9f
Fix countbits, reversebits, firstbitlow intrinsics for int16 types (#1037)
Fix countbits, reversebits, firstbitlow intrinsics for int16 types
2018-01-30 14:29:10 -08:00
Young Kim d5d3d8d49a
Fix Shader Model 6.2 tests (#1036)
Fixing a bunch of SM 6.2 Tests
- BinaryHalfOp tests reading input2 instead of input1
- Fixed converting signed zero from float to float16
- Fixed compiler options for float16 min,max test
- Fixed expected results for following float16 operations
- cos(0), sin(314), sin(-314)
- frc(-7.39)
- rsqrt(65504)
- int16 subtraction
- int16 unsigned multiplication
- sqrt, rsqrt, round_pi, round_ni, fmad treat denorm as it is
2018-01-30 14:28:49 -08:00
Lei Zhang fa1e7cddd0
[spirv] Add SubpassInput(MS) and vk::input_attachment_index (#1000)
Two new Vulkan specific intrinsic resource types, SubpassInput and
SubpassInputMS, are introduced to provide a way to use subpass inputs
in Vulkan. Their signatures:

template<typename T>
class SubpassInput {
  T SubpassLoad();
};

template<typename T>
class SubpassInputMS {
  T SubpassLoad(int sample);
};

T can be a scalar or vector type.

If compiled without ENABLE_SPIRV_CODEGEN, the compiler will report
unknown type name for SubpassInput(MS). If compiled with SPIR-V
CodeGen and trying to use SubpassInput(MS) in DXIL CodeGen, the
compiler will report an error saying the type is Vulkan-specific.

A new Vulkan-specific attribute, vk::input_attachment_index is
introduced to provide a way to set the input attachment index for
SubpassInput(MS) objects.
2018-01-20 17:16:39 -05:00
Jeff Noyle ad3e51b1dd
New pass for PIX "shader access tracking" (#998)
* py changes

* checkpoint

* wrong overloads for a couple ops

* Correct out-of-range checking

* test

* RTV

* Add shader access tracking and reportage of dynamically indexed registers

* Uniquify and encode proper register index!

* remove unncessary noise

* rename a var
2018-01-19 14:47:06 -08:00
Young Kim a43147de94
Add validation for Quad operations against non pixel shaders (#986) 2018-01-16 10:33:47 -08:00
Xiang Li b816c124f1
Support resource select for lib profile. (#940) 2017-12-20 10:47:29 -08:00
Young Kim 6c998fda25
- Add int16, uint16 execution tests (#920)
- Add enable-16-bit-types argument to half test shaders
2017-12-14 11:33:59 -08:00
Young Kim bf911b1d22
Add 16bit integers to Any IntrinsicCompTypes and for existing UInt3264 comp types. (#913) 2017-12-13 13:44:10 -08:00
Xiang Li 0790e03364
Remove stacksave and stackstore. (#914) 2017-12-12 18:50:01 -08:00
Young Kim ecf0307963
Half tests (#911)
- Adding half tests for unary,binary,tertiary math operations
- Add 'exec-future' option for hcttest
2017-12-12 15:12:19 -08:00
Young Kim fdadc6d718
Denorm float tests (#899)
-Execution tests for Shader Model 6.2 denorm mode
-'FAdd', 'FSub', 'FMul', 'FDiv', 'FMad' instructions are used for testings
-Code cleanup
2017-12-08 18:18:32 -08:00
Young Kim 09c7c17dac
Fix exec tests (#888)
- TAEF is unable to recognize negative values in hex representation in x64 released build. So use decimal values instead
- Add 'Shl', 'LShr', 'And', 'Or', 'Xor' execution tests
- Update Warp Version for test cases known to fail
2017-12-06 19:04:01 -08:00
Young Kim 4904266822
Code Cleanup for Execution Tests (#879)
- Cleaning up execution test
- Generating xml test file from the script and hctdb
- Fixing hctdb categories for unsigned int
- Adding more execution tests (Fadd, FSub, FMul, FDiv, Add, Sub, SDiv)
2017-12-05 15:17:50 -08:00
Lei Zhang bbddc280c9
[appveyor] Stop installing TAEF (#862)
Appveyor already has WDK for Windows 10, version 1709 installed:
https://www.appveyor.com/docs/build-environment/
2017-11-29 15:38:21 -05:00
Lei Zhang 8903528e88 Allow CMake 3.9.0 shipped with Visual Studio 2017 (#850) 2017-11-25 10:55:37 -08:00
Young Kim 77594e8624
Change rangeID parameter for CreateHandle to const (#833) 2017-11-20 20:04:54 -08:00
Young Kim 289d09e700
Bitcast for 16bit types (#817)
This change adds bitcast intrinsics for 16bit types (asfloat16, asint, asuint)
2017-11-16 11:38:56 -08:00
Young Kim 3cad152a90
Template argument for byteaddressbuffer load store (#804)
This change removes new Load variations (LoadHalf, LoadFloat, etc) for RWByteAddressBuffer/ByteAddressBuffer methods and add templated Load intrinsics. This templated Load only works on scalar or vector types, and its variations (Load2, Load3, Load4, etc) do not work with templates and work as it did before (only storing uints). For Store operation, you can store any scalar or vector types of up to 16 bytes, while prior to 2018 Store only supported storing uint scalar.
2017-11-15 18:47:12 -08:00
Young Kim a48d81fcac
New scalar types (#792)
This change is to add fixed width scalar types in HLSL 2018.
These types are: int16_t, uint16_t, int32_t, uint32_t, float16_t, float32_t, and float64_t.
Prior HLSL versions do not support these fixed width types.

This change also renames /no-min-precision command line option to /enable-16bit-types. int16_t and uint16_t are only allowed with this mode.
2017-11-13 15:03:19 -08:00
Young Kim 44db464c32
Native Int16 and Uint16 types (#783)
This change is to introduce native precision types for shader model 6.2. With native half (float16) types, we will introduce native int16/uint16 types with same command line option. This means that one option will disable all min precision types. For now, int16/uint16 types will be exposed on HLSL level as int16_t and uint16_t.

This change also includes some constant buffer fixes for 16 bit types, as well as int64 types.
2017-11-09 10:03:27 -08:00
Young Kim 2c140f795c
RawBufferLoad and new methods for ByteAddressBuffer (#762)
This change is an extension of float16 support. We are adding LoadHalf, LoadFloat, and LoadDouble method to byte address buffer so that users can access data from byte address buffer by these types. Also starting shader model 6.2, we are mapping byte address buffer and structure buffer load/store operations to RawBufferLoad/Store to differentiate raw buffer load from typed buffer load. Unlike BufferLoad for typed buffers, RawBufferLoad for min precision types will not have its min precision values as its return types, but their actual scalar size in buffer (i.e rawBufferLoad.i32 for min16int and rawBufferLoad.f32 for min16float). RawBufferLoad/Store contains additional parameters, where mask was required for correct status behavior for CheckAccessFullyMapped, and alignment is for relative alignment for future potential benefit for backend.
2017-11-07 18:15:19 -08:00
Young Kim 8c55bbbe6d
Denorm to function attribute (#764)
- Denorm mode to function attribute not function annotation
- Adding validation rule for fp32-denorm-mode



* Fix from comments
2017-11-06 18:09:14 -08:00
Xiang Li d8cefeb1ba
Make sure status only used by CheckAccessFullyMapped. (#763)
* Make sure status only used by CheckAccessFullyMapped.
2017-11-03 18:12:15 -07:00
Tex Riddell 1608deb16a Update hctstart for new SDK version: 16299 (#705) 2017-10-13 15:13:45 -07:00
Marcelo Lopez Ruiz 64f3b34995 Adds support for pipeline restart (#683)
* Adds support for pause/resume in pipeline.
* Adds 0.0 as the validator version to indicate no validation should occur.
* Moves module parsing from dxcompiler down to HLSL library.
* Adds support for optimizer to process a DXIL part.
* Adds a form with designer support for the interactive optimizer.
2017-10-11 14:04:24 -07:00
Xiang Li e26728ba5f Use float for tex coord instead of float_like. (#688)
* Use float for tex coord instead of float_like.

* Support min prec for GetDim.
2017-10-10 18:53:50 -07:00
Jeff Noyle b06a8153ff Shader debug instrumentation (#680)
See the comment in DxilDebugInstrumentation.cpp for a summary of how this-all works. Basically: instrument all instructions to output "trace" info to a UAV so that a debugger can reconstruct the execution of the shader and offer a debugger-like experience.
2017-10-09 15:30:29 -07:00
Tex Riddell f227c5f9d6 Target 6.0 in DXL.exe test to avoid failing validation with older dxil.dll (#650) 2017-09-26 09:44:38 -07:00
Jeff Noyle f169e6f238 PIX pixel-hit instrumentation: Re-emit type system, fix several issues with the UAV (#635)
* Add SV_Position index parameter, various minor tweaks to UAV setup

* Convert to raw buffer

* fix up unit tests, add a few names to variables

* CR feedback: check for pre-existing type; typo
2017-09-25 15:22:05 -07:00
Young Kim fb33d62978 Restrict no min precision option to shader model 6.2 (#615) 2017-09-12 16:05:08 -07:00
Young Kim 223a885613 Group Signature Elements by Element Width (#610)
This change is to enforce the new constraint on signature packing: pack signature elements by data width. Before we introduce fp16 type, every element was assumed to reserve 32 bits. Since we are introducing a new 16 bit data type, we need a new way to enforce signature rules.

After discussions we decided that it would be nice to pack elements based on data width. However, we are still enforcing the rule that each row contains up to 4 elements, regardless of the size. This way, depending on the hardware support drivers can optimize packing signatures, while on DXIL level we maintain the assumption that there are 4 elements per row. We are also still constraining on the total number of rows to be 32 for now. This can be changed in the future if people find this limit to be an issue.
2017-09-06 11:04:33 -07:00
Lei Zhang 13adee8411 [spirv] Support output disassembly in dxc (#603)
* [spirv] Support output disassembly in dxc

* Use normal pointers in DisassembleSpirv() and add tests

* keep script_dir under setlocal
2017-08-30 08:53:29 -07:00
Xiang Li 99af88f63b Update oprand name for BFI. 2017-08-18 15:12:49 -07:00
Xiang Li eb0894c913 Support static const field with initializer (#520)
* Support static const field of struct.
* Revert "Revert "Add nodup attribute for barrier.""

This reverts commit e435f63b02.
2017-08-04 13:40:31 -07:00
Xiang Li e435f63b02 Revert "Add nodup attribute for barrier."
This reverts commit 30b7f5cd4d.
2017-08-03 23:14:22 -07:00
Xiang Li 00351f3f94 Add nodup attribute for barrier. 2017-08-03 23:14:22 -07:00
Xiang Li 459b5998a4 Support same resource declared in different lib.
1. Add debug code in CompileFromBlob to help debug in release build.
2. Add dxl to help debug linker.
3. Check type match for resource when link.
2017-08-03 14:24:14 -07:00
Tex Riddell 705c3348e4 Add operand index enum and set methods to instruction helpers (#430)
* Add operand index enum and set methods to instruction helpers

* hctdb_instrhelp.py: Use namedtuple for llvm_type_map values.
2017-07-31 13:33:51 -07:00
Xiang Li 36ba7ac534 Add HLDeadFunctionEliminationPass. 2017-07-29 10:27:18 -07:00
Xiang Li 46e47f01e5 Refactoring DxilEmitMetadata pass. 2017-07-29 10:27:18 -07:00
Tex Riddell c9beb84c51 Fix ViewID state for flow control and consistent ViewID detection (#484)
* Fix ViewID state for flow control and consistent ViewID detection

1. Different ways of determining ViewID usage led to assert or crash.
Use DxilModule flag to guarantee consistency.  But this required
splitting DxilEmitMetadata pass into two passes, one that finalizes
the module and computes flags run before ComputeViewIdState, and one
that simply writes the metadata.

2. storeOutput in flow control with values not dependent on that flow,
such as literals, would not pick up control flow dependence.
Fix by picking up control flow dependence on storeOutput instructions,
not just the value being written.

* Fix control depenence computation

There was a bug in the implementation of the control dependence algorithm.
We were incorrectly iterating over all descendents in the postdom tree where
the algorithm should only iterate over immediate children.
2017-07-28 11:51:15 -07:00
Young Kim b0f5918d5b skip -denorm command line test when validator is present. (#482) 2017-07-27 19:52:38 -07:00
Marcelo Lopez Ruiz 60a67e6563 Fix unused var warning in release, better logging for command line tests. (#479) 2017-07-27 14:22:16 -07:00
Jeff Noyle d3f53b7f3e "Dr PIX": Force early Z (#467)
PIX has the ability to turn on early z and show you the performance difference with and without.
This pass implements the DXIL side of it.
2017-07-27 13:34:54 -07:00
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
Jeff Noyle 47226d0422 PIX: Pixel count/cost pass (#457)
The pass implements functionality for PIX for the "pixel cost", "depth complexity" and "overdraw" visualizers. You can probably infer what the pass does from the names "overdraw" and "depth complexity": For each pixel rendered it increments a corresponding counter in a UAV of a buffer that is the same size as the render target. The "pixel cost" pass does the same thing, only the increment is a weight value calculated from the total cost of the draw call, as derived from PIX's GPU-side profiling system.
2017-07-25 16:08:31 -07:00
Xiang Li 9db715523f Fix arg flatten issue caused by load before init. (#447)
* Fix arg flatten issue caused by load before init.
* Refine ShaderCompatSuite.
* Remove HLFunctions has body early.
2017-07-24 18:31:45 -07:00
Marcelo Lopez Ruiz bc55cacce2 improve help message in hcttest (#437) 2017-07-24 13:31:12 -07:00
Xiang Li edbf1b971c Support include and macro when lib share compile. (#441) 2017-07-19 15:55:43 -07:00
Jeff Noyle 82fcc7ca0f (PIX) Reduce msaa to single-sample (#427)
This pass will be used in PIX for "Dr. PIX experiments", wherein a workload is re-rendered with MSAA turned off in order to get an approximate understanding of the performance impact of MSAA.
2017-07-14 13:40:49 -07:00
David Peixotto cc64547852 Look for extra hctdb files in same dir as hctdb scripts (#419)
Allows the hctdb_instrhelper.py script to be run from outside
utils/hct. No change in generated code.
2017-07-12 09:48:46 -07:00
David Peixotto 42202ba3bf Use the get_db_dxil() function to get the db (#414)
Fixup the usage in a few functions. No change in generated code.
2017-07-11 01:28:48 -07:00
Marcelo Lopez Ruiz 0794f13ec7 Fix compile error for 32-bit CRITICAL_SECTION size embedded in mutex (#415) 2017-07-10 23:11:02 -07:00
Xiang Li c5d59d7e66 Add comment for OpClass conflict between WavePrefixBitCount and WavePrefixOp. 2017-07-10 13:58:38 -07:00
Ehsan 3e84980892 [spirv] Adding test fixture for HLSL to SPIRV codegen flow (#383)
This change enables CodeGenSPIRV test flow.

New tests can be added by simply adding the test file to
`tools/clang/test/CodeGenSPIRV/` directory and running:

```cpp
TEST_F(WholeFileTest, NewTest) {
  EXPECT_TRUE(runWholeFileTest("new-test-name"));
}
```

The input file with the format described in `WholeFileCheck.h` is read in;
the HLSL portion is passed to the compiler with SPIR-V codegen enabled.
The resulting SPIR-V binary is disassembled and compared to the expected
result in the input file.
2017-07-06 17:00:59 -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 114fd223d1 Add DxilD3DCompile and DxilD3DCompile2 as example of library use. (#402)
* Add DxilD3DCompile and DxilD3DCompile2 as examle of library use.
It will compile shader into library first, then link to generate the final dxil.
If there's include used, it will compile included file into seperate lib and link all lib together.
2017-07-05 17:37:40 -07:00
Xiang Li ff87c9951b Rmove attribute on intrinsic with output param. (#403) 2017-07-05 15:35:20 -07:00
Jeff Noyle fa94808e09 Remove all discard instructions (#400)
* Add remove-discards pass

* explicit lfs

* Change pass name, remove copy-pasted member enum, reduced include set

* CR feedback: better way to delete instructions, stale comment, end iterator could go stale, CHECK-NOT is a good idea.
2017-06-30 13:57:12 -07:00
Xiang Li 1188a80e63 Remove noise intrinsic. (#392) 2017-06-28 10:35:25 -07:00
Jeff Noyle e0c24c6839 Implementation of "constant color output" pass for PIX (#371) 2017-06-27 10:11:24 -07:00
Tex Riddell 36798cf0bc Fix typo in StoreOutput outputSigId parameter (#385) 2017-06-26 16:39:19 -07:00
Stefan Dyulgerov 92bf1f91c0 fixed incorrect message about cmake (#381) 2017-06-22 23:09:17 -07:00
Xiang Li bbc983ead5 Move Disassemble to dxcutil. (#353) 2017-06-13 17:35:07 -07:00
Xiang Li 6c4b87efd9 Create pass for Lower static global into allocas. (#341) 2017-06-07 17:14:43 -07:00
Tex Riddell 2386e372c7 Add hctdeploytest.cmd for deploying test dependencies. (#321) 2017-06-02 11:07:58 -07:00
David Peixotto 0ea6620342 Add pass to preserve all outputs (#326)
This commit adds a new pass that will transform all the storeOutput
instructions in the program. For each element in the output
signature we create an alloca to hold writes to the output.
We rewrite each storeOutput to store to the alloca'd location
instead. Then at each function return point we store to
each element in the output signature by reading the latest
value from the alloca'd location.

The above transformation provides the following properties
for outputs after it is run.

    1. Remove all dynamic indexing on output writes
    2. Remove multiple writes to same output location
    3. Ensure all output locations in the signature are written
2017-05-30 09:41:54 -07:00
David Peixotto 489147d88c Add support for expanding trig intrinsics (#325)
We can now expand the following intrinsics:

    Acos
    Asin
    Atan
    Hcos
    Hsin
    Htan

The expansion uses the same approximation algorithms used by the d3d compiler.
2017-05-23 08:15:59 -07:00
Marcelo Lopez Ruiz 4b834beaf9 Add support for external libraries to dxopt. (#324)
Adds support for external and external-fn arguments.
Adds support for a pf file with the pass configuration.
2017-05-22 21:21:23 -07:00
Lei Zhang 3c6537a7d5 [spirv] Add GoogleTest as an external dependency (#285)
GoogleTest will be used for unit testing and codegen testing for
SPIR-V.

* Added SPIRV_BUILD_TESTS option in CMake to control building
  of SPIR-V tests.
* Added "-spirvtest" into hctbuild to enable it.
* Added "spirv" and "spirv_only" targets for hcttest.

Running `hcttest spirv` will run ALL tests including SPIRV tests.
Running `hcttest spirv_only` will ONLY run SPIRV tests.

The default behavior of hctbuild and hcttest is not changed.
2017-05-22 12:02:23 -07:00
Tex Riddell ace430ff41 Remove extra 'dxc smoke.hlsl' from hcttestcmds that will always fail (#313) 2017-05-19 11:17:27 -07:00
Young Kim 4857166d1e Support for Enum in HLSL 2017 (#309)
This change is to support enum types in HLSL 2017. Enum/enum class with fixed underlying type to match C+11 standard. Enum should only be enabled with -HV 2017 option on dxc.
2017-05-19 09:44:07 -07:00
Tex Riddell 0b5ab5c87a Implement ViewIDPipelineValidation
- Update PSV data for GS multi stream out and other improvements
- Add ViewIDPipelineValidation.inl
- Refactor DxilSigPoint to .inl for easy external use
- Add Barycentrics feature flag
2017-05-18 18:00:59 -07:00
Tex Riddell 261c3f8819 Add NumOpCodes_Dxil_1_1 and ComputeViewIdState pass to hctdb (#300)
Note: changed viewid_state to viewid-state for consistency
2017-05-18 02:00:17 -07:00
Xiang Li 8ce48081cf Add a pass to eliminate dynamic indexing on output. (#287)
1. Add a pass to eliminate dynamic indexing on output.
2. Fix issue in AllocateSemanticIndex where argIdx should only udpate for leaf node.
2017-05-12 11:10:58 -07:00
Young Kim f66e8083d6 Allow two SV_Barycentrics (#282)
unlike other system value semantics, pixel shader is allowed to declare at most two input attributes with SV_Barycentrics, with one declaration uses perspective interpolation type while other one uses noperspective interpolation type.
2017-05-09 18:59:30 -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
Xiang Li 9edb1a553e Lower static global resource and local resource to handle. (#276)
1. Add ResourceToHandle pass to lower resource to handle.
2. Don't performPromotion in SROA_HLSL.
3. Add Option support for DynamicIndexingVectorToArray.
4. Fix bug in GetPassOption.
5. Replace GEP ptr, 0 with ptr in DynamicIndexingVectorToArray::ReplaceStaticIndexingOnVector.
6. Run mem2reg before DxilGenerationPass.
7.Legalize EvalOperations before change vector to array.
2017-05-05 18:31:35 -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
Xiang Li 4ddd43fd66 Don't require null terminator when create MemBuffer for module data. (#274) 2017-05-04 18:34:26 -07:00
Young Kim 13cf7d466c Update barycentric with new spec (#265)
1. Adding SV_Barycentric and removing barycentric intrinsics/dxilops
2. GetAttributeAtVertex only thakes no_interpolation attribute
3. SV_Barycentric can take any interpolation modifier except nointerpolation
4. SV_Barycentric can only have float3 type
2017-05-03 17:07:02 -07:00
Young Kim 77771f4e1c Update htan(Inf/-Inf) to +1/-1 (#268) 2017-05-03 10:36:04 -07:00
Tex Riddell c0d3163ee3 Dxil versioned OpCode/Class counts, and other dxil versioning fixes (#263) 2017-05-02 14:42:05 -07:00
Tex Riddell bd6c105e9b Add ViewID slot validation for PSIn (#254) 2017-05-01 17:54:33 -07:00
Marcelo Lopez Ruiz 740bcae86f hctstart improvements - use VS2017 cmake, fix cmake version checks (#260)
Use VS2017 cmake, fix cmake version checks.
Add trailing space to labels in hctstart to work around line ending issues.
2017-05-01 12:02:34 -07:00
Tex Riddell a581927370 Add SV_ViewID support (#251)
- Add SV_ViewID loaded from intrinsic in Dxil,
  for input to all graphics shader stages
- hctdb: rename shader_models to shader_stages,
  add shader_model for min required shader model
- Validator: validate dxil version required for shader model
- DxilModule: Add GetDxilVersion
- Set Barycentric intrinsics to SM 6.1
- Update SystemValueTest for SM 6.1
2017-04-27 14:17:31 -07:00
Young Kim 108b897f40 Barycentric init (#250)
This change is the initial step to support Barycentric coordinates for shader model 6.1 / DXIL 1.1
 - Add GetBarycentrics, GetAttributeAtVertex intrinsics and their corresponding dxil ops
 - Lowering intrinsics to dxil ops
 - Adding codegen tests for these operations
2017-04-26 12:29:48 -07:00
Young Kim 7112d77737 Add WaveActiveOp execution test (#232)
This change adds execution unit tests for WaveActiveOp intrinsics.

For wave operations, there is no guarantee of how many lanes exist in a given wave. The test therefore has to manually compute the expected output by identifying different waves in shaders and group lanes by the waves they belong to. This can be done by providing different id's for each structured resource and call WaveReadLaneFirst() on each shader, and mimic what wave intrinsics to compute expected results.

Right now the test will not run on a default mode on hcttest because of known issue for WARP driver with handling flow control in compute shader. As soon as this is fixed we should enable this test by setting the priority of the test to 0.

This change also includes other fixes in ExecutionTests including 
1)Have TableParameterHandler to read data driven table parameters and 2) fixing typos
2017-04-20 22:29:42 -07:00
Young Kim 4f3355b8f1 Fix Execution Test for atan(NaN) and Fabs
1. Update expected value of atan(NaN) to NaN (#240)
2. Update spec for Fabs for denorm
2017-04-20 22:27:02 -07:00
Lei Zhang 7a23033d69 Fix hctbuild -b -ninja and explain ninja build steps in README. (#238) 2017-04-20 09:06:35 -07:00
Tex Riddell 4de9ff32b6 Disable tests requiring name preservation on release builds. (#229)
* Disable tests requiring name preservation on release builds.
* Fix reversal of DxcVersionInfoFlags_Debug
* Enable parallel execution for unit tests
* Add -verbose to preserve logging and remove /parallel
2017-04-18 11:11:51 -07:00
Young Kim c50dd745d2 Add partial derivative test cases for pixel shaders (#220)
This change is to add another execution test case for partial derivative operations specific to pixel shaders.
The way we did this is by passing in the texture resource to the shader and taking the partial derivatives of these texture values.
Test is assuming the arithmetic precision of 1 ulp for derivative operations.

This change also has some changes on existing execution test
 - enable passing in Texture2D resource type as a default heap
 - reading primitive topology from XML file
 - clean up data driven tests: use DirectX Math structures and removing unused structures
2017-04-18 06:45:14 -07:00
David Peixotto b4389808e7 Use Post instead of Put to upload tests (#226)
This change makes the test result display properly on the test tab in appveyor.
2017-04-14 19:25:06 -07:00
Tex Riddell f323755dc9 hcttest: Fix parentheses in message prematurely terminating flow control (#227)
Add an optional extended description…
2017-04-14 18:48:36 -07:00
Tex Riddell 80cdd522a4 Improve hcttest.cmd, add hctcopy.cmd (#225)
* dxexp: print adapters when experimental fails
* ExecutionTest: Correct experimental mode message when running release
* Improve hcttest.cmd, add hctcopy.cmd
2017-04-14 17:48:29 -07:00
Lei Zhang 6a254ae8b2 Support -ninja in hcttest (#223)
Now we can run `hctbuild -s -ninja` to configure to use Ninja as
the generator, run `hctbuild -b` to build the artifacts with Ninja,
and then run `hcttest -ninja` to run the tests.

Also fixes the wrong order in hcttest help message.
2017-04-13 14:39:12 -07:00
David Peixotto 6b543756e1 Pull taef binaries from blessed location for appveyor builds (#219)
No longer necessary to install WDK!
2017-04-12 16:18:45 -07:00
Lei Zhang 47706a1bcc Support Ninja as the generator (#203) 2017-04-12 14:15:24 -07:00
Lei Zhang 4570e220a8 Add missing braces in intrinsic tables (#213)
This solves the compiler warnings given -Wmissing-braces.
2017-04-12 13:47:15 -07:00
Marcelo Lopez Ruiz 76d518d57d Updates hctbuild to better handle VS2017 (#212)
Defaults to VS2017 if VS2015 isn't available.
Avoids using the VS2015 tools when VS2017 is selected.
2017-04-12 12:38:50 -07:00
Young Kim e5265cc7ee Adding Execution Tests for ShaderOp Arithmetic operations (#207)
This change is to add execution tests for individual DXIL arithmetic operations.

Using TAEF's data-driven model to group operations by the type/number of operands for each instructions. (unary/binary operators for float/int/uint types)
Updating DXIL.rst for these instructions.
Update hctdb.py to enable internal links for DXIL instructions.
2017-04-12 00:14:00 -07:00
Marcelo Lopez Ruiz 3e939b95e6 Improvements to hctgettaef. (#208)
Create all missing directories to target directory as needed.
If urllib.urlretrieve fails, try to download via powershell.
2017-04-11 16:59:11 -07:00
Lei Zhang 858d7daa01 Output cmake-log.txt contents if CMake configuration failed (#206) 2017-04-11 14:29:56 -07:00
David Peixotto 0ba250e9dc Add pass to hoist constant arrays (#205)
This commit adds a new pass to hoist arrays from local to global scope
when the array only contains constant values. A local array will use
alloca and stores for initialization, but a global array uses a global
variable with a constant initializer.

The idea is that a global array with constant initializer will allow the
backend compilers to produce better code because it is much easier to see
that the array is fully constant.
2017-04-11 13:58:16 -07:00
Marcelo Lopez Ruiz 6f2f08bac1 Update default maxcpucount in hctbuild (#202)
Quick fix; we tend to be more constrained by memory than cycles in many build configurations, so ease back a bit.
2017-04-11 10:55:25 -07:00
Marcelo Lopez Ruiz 2cce7933fb Add support for an inline TAEF install rather than requiring WDK (#196)
Adds support for SDK 10.0.15063.0.
Adds support for TAEF download into external dir, no WDK required.
2017-04-10 22:53:37 -07:00
Marcelo Lopez Ruiz 254f253b14 Move unused global tracing flags into single usage, closes #157. (#185)
* Move unused global tracing flags into single usage, closes #157.

Normalizes API-provided names to include at least a current-relative
directory, simplifying file lookups. There are still restrictions on
how expressive include handlers enable the virtual file system to be,
these should be documented on the project wiki.

Handle some errors in BeginSourceFile paths where include handlers may
cause early errors, before compilation execution can begin.

Removes the prior scheme for directory handles, where the same handle
would be returned for any parent directory.

Future improvements would be to expand dxc paths before calling into
dxcompiler, and/or to fully implement OS API calls from console apps.

Improve hcttest to describe build config better and not override env var.
2017-04-07 12:02:20 -07:00
David Peixotto b0fd2d3949 Use opcode class to guide constant folding possibilities (#191)
This change modifies dxil constant folding to use the opcode class when
deciding if a dxil function can be constant folded. We now require a
DxilModule to be available when constant folding dxil functions.

To ensure that the dxil module is available we add a new pass that loads a
dxil module from metadata if it does not exist. We use the new pass in the
dxopt tests for constant folding.
2017-04-06 17:42:42 -07:00
Xiang Li 73e76ff294 Use mad for matrix mul. (#184) 2017-04-05 10:39:56 -07:00
David Peixotto c9bdb370d7 Make hctdb compatiable with python 3 (#173)
Make sure we only use python3 compatible code.  In the process of compatibility
fixes I found a bug in how we check for duplicate instruction classes. The fixed
code triggers an assert because we have duplicate instruction classes. I have
commented out the assert for now and we can re-enable it when we sort out what
we want to do about the duplicated classes.
2017-03-31 15:41:53 -07:00
Xiang Li 8693031f38 Force minprec cast to float for case DXIL don't support f16. (#178) 2017-03-31 15:39:31 -07:00
David Peixotto 84c30e388d Make hctdb output stable (#172) 2017-03-30 18:38:48 -07:00
Xiang Li a3306bff1d Lower resource to createHandle at clang code gen. (#163)
* Lower resource to createHandle at clang code gen.
1. A HL createHandle will have 1 or 2 parameters.
   For  uav/srv/sampler, 1 parameter. 1 is the resource load from resource ptr.
   For cbuffer, 2 parameter. 1 is the same. 2 is for dynamic indexing on array of cbuffers.
   uav/srv/sampler don't have 2 is because all the use of them is on builtin methods. Resource on methods is scalar.
   createHandle function will have metadata to save the resource information like class/kind/type/...

2. Added 2 more passes DxilLegalizeResourceUsePass DxilLegalizeStaticResourceUsePass to remove load/store on local/static resource.
   Also make sure HL createHandle don't have phi operand.

3. For DxilGenerationPass,  Dxil createHandle will be generated after GenerateDxilOperations.
   And HLObjectOperationLowerHelper now get RK/RC from MetadataAsValue argument of HL createHandle.
2017-03-28 18:43:59 -07:00
Marcelo Lopez Ruiz 843be2528a Close #62: strange error output on recursive function calls (#150)
* Traverse call graph to report recursive calls in the front-end.
* Emit function declarations only as needed.
* Fix extra echo output in hctbuild help.
* Remove unused test case.
2017-03-28 00:12:55 +01:00
Tex Riddell 6b3aeea0e5 Merge pull request #147 from Microsoft/master
Merge master into dxil-v1.0
2017-03-20 12:16:59 -07:00
Marcelo Lopez Ruiz d7f75ac8f0 Add reducibility analysis to the list of passes and paramless ctor. (#133)
Add reducibility analysis to the list of passes and paramless ctor.

This restores the property of having all passes initialized at DLL load time, keeps the reported list of passes stable, and fixes an assertion when the DLL is loaded on a thread but the first compile invocation occurs in a different thread.
2017-03-14 17:41:11 -07:00
David Peixotto 7a24bac9b5 Add support for AppVeyor continuous integration (#131)
This commit makes the necessary changes to run the project with AppVeyor
CI. The `appveyor.yml` file contains the configuration settings for the
build. Currently we only build x64-Debug, but we can build the full
x32/x64-Debug/Release matrix by adding a few lines to the config.

The remaining changes are somewhat tied to the specifics of how appveyor
provisions the build machines. The standard VS2015 machines build on
Windows Server 2012. We can build on these machines, but cannot run tests
because we require d3d12.dll which is not available on Windows Server
2012. However, it is present on Windows Server 2016, but appveyor only
provides VS2017 on those machines. So part of the changes are to allow
the compiler to build with VS2017 so we can run tests as part of CI.

The `appveyor_setup.ps1` script installs the WDK as part of the build.
This is the only extra software we need. It is actually installed on the
VS2015 build machines, but not our VS2017 build machines. Perhaps we can
get them to install it by default and then this script can go away.

The `appveyor_test.ps1` script runs the taef tests and then reports the
results to appveyor so they can be displayed on the "Tests" tab.

As a side effect of this work, We can now use the latest cmake (3.7.2) for
our own builds! The key seems to be setting
`-DCMAKE_SYSTEM_VERSION=10.0.14393.0` to ensure that we pick up the
correct SDK.
2017-03-13 16:21:15 -07:00
Marcelo Lopez Ruiz 723438c9bf Update required SDK to 10.0.14393.0 (#111) 2017-02-28 16:17:04 -08:00
Xiang Li 843b64b320 Check exist function match dxil operation function when refresh operation fucntion cache. (#108) 2017-02-27 16:32:41 -08:00
Xiang Li 73b6f95a40 Legalize sample offset when optimization is disabled. (#97) 2017-02-18 00:46:17 -08:00
Tex Riddell ca03b825f4 Update hctversion.txt to 1.0 2017-02-17 16:26:28 -08:00
Tex Riddell 68382a3ed6 Merge remote-tracking branch 'ms/master' into minmax2 2017-02-17 15:47:50 -08:00
Tex Riddell 7bdef32133 Adds documentation and tests for min/max intrinsics. (#81)
Improves xml-based tests to allow existing devices to be used.
Improves dxexp to print out SM6/wave/i64 support under experimental mode.
Bumps the hctversion to 0.7
2017-02-17 15:44:30 -08:00
Marcelo Lopez Ruiz 5cc190b0f6 Merge pull request #98 from Microsoft/master
python 2.7 is now looked for the same way other dependencies are.

Improves logging as well by providing minimal console output during
build, while providing a file logger with additional details.
2017-02-17 13:39:58 -08:00
Young Kim f7c215bc2b Enable Upper Case for Registers (#95)
- enable upper case for valid registers ('B', 'C', 'I', 'S', 'T', 'U')
- fix VerifyHelper.py to output ast when expected errors are present
- fix buffer view register validation check
2017-02-16 13:35:57 -08:00
Marcelo Lopez Ruiz 98f201b5fd Close #54 - hctstart should include python if missing (#84)
python 2.7 is now looked for the same way other dependencies are.

Improves logging as well by providing minimal console output during
build, while providing a file logger with additional details.
2017-02-13 11:47:26 -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
Tex Riddell e48f472bc3 Merge remote-tracking branch 'ms/master' into dxil-v1.0 2017-02-10 15:08:07 -08:00
Xiang Li 9ea3e5f44b Enable SampleCmpLevelZero for all shader profiles. 2017-02-10 11:43:30 -08:00
Tex Riddell bbc14d28f7 Use amd64 VS build tools instead of default x86 tools
- avoids running out of memory during incremental linking
2017-02-09 19:38:02 -08:00
Tex Riddell a6433c18f8 Merge pull request #76 from tex3d/integration
Integrate validation, dxc option, and other changes
2017-02-09 17:33:45 -08:00
Xiang Li cb0ba446c1 Fix validation bugs. (#10) 2017-02-07 22:18:10 -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
Xiang Li 2032a2c9a5 Update attribute for intrinsic. (#8) 2017-02-07 17:00:41 -08:00
yurido1 edfe849282 Changed intrinsic opcode attributes for DXIL. (#9) 2017-02-07 16:59:38 -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 4fbd33a449 Merge pull request #60 from tex3d/integration
Merge opcode and dxc options changes to dxil-v1.0
2017-02-03 10:58:57 -08:00
Tex Riddell 7beaa7ba54 Implement DXIL Container validation
- Implement and centralize container validation components in DxilValidation
- Strip RootSignature from module metadata before serializing to container
- Use existing DxilModule when serializing rather than constructing new one
- Add DxilModule::TryGetDxilModule for capturing diagnostics on metadata load
- Expose DxilPartWriters/DxilContainerWriter for use elsewhere (such as in validation)
2017-02-02 19:59:13 -08:00
Xiang Li f43f396598 Use i32 to fake 64bit for buffer load/store. (#63) 2017-02-02 17:48:43 -08:00
Tex Riddell c18ed9133e Merge remote-tracking branch 'ms/dxil-v1.0' into integration 2017-02-01 15:43:43 -08:00
Tex Riddell 797548781c Integrate final opcode changes for DXIL v1.0
- Removes IAddc and ISubc
- Renames USubc to USubb
- Compacts opcodes
2017-02-01 15:22:29 -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
Mark Herdeg 2040bffbb2 Revert "Merge remote-tracking branch 'refs/remotes/origin/dxil-v1.0'"
This reverts commit 27a00a9fdc, reversing
changes made to 1f256e15d3.

Revert mistaken merge commit.
2017-01-31 14:28:50 -05:00
Mark Herdeg 27a00a9fdc Merge remote-tracking branch 'refs/remotes/origin/dxil-v1.0' 2017-01-31 13:46:27 -05:00
Tex Riddell 13d3d39718 Merge pull request #44 from tex3d/integration
Fix validation test issues found during integration
2017-01-30 18:45:24 -08:00
Xiang Li cf6f8beb4b Check Race Condition for TGSM (#48) 2017-01-30 16:09:31 -08:00
Xiang Li ac228c5aa4 Translate AddUint64. (#47) 2017-01-30 12:30:25 -08:00
Tex Riddell 3bcc42ff10 Merge branch 'master' into dxil-v1.0 2017-01-27 17:18:24 -08:00
Tex Riddell af6b2a552f fixes #37 - License cleanup. 2017-01-27 16:48:08 -08:00
Tex Riddell 8df766a7cb Undo change to hcttest-samples.py re: d3d12warp 2017-01-25 17:12:17 -08:00
Tex Riddell e294996b0e Merge pull request #40 from Microsoft/master
- Clean up mistakes made when fixing copyright banners.
2017-01-25 15:04:28 -08:00
Tex Riddell 31bbfbf19a Merge pull request #38 from Microsoft/master
Fixes #29 Build scripts misbehave when relative paths are used in hct…
2017-01-25 14:44:01 -08:00
Tex Riddell e077864885 Clean up mistakes made when fixing copyright banners. 2017-01-25 14:36:50 -08:00
Tex Riddell e2f5d022bb Merge pull request #27 from tex3d/integration
Integrate internal changes
- link dump methods when compiled with _DEBUG or DBG
- d3d12warp to d3d10warp in hcttest-samples.py
2017-01-25 12:36:51 -08:00
Marcelo Lopez Ruiz ab6759350b Fixes #29 Build scripts misbehave when relative paths are used in hctstart (#31)
hctstart sets environment variables for source and build output dirs.

To support relative paths as arguments in hctstart, the full path
expansion should be used.
2017-01-25 10:45:33 -08:00
Tex Riddell 5e5897564a Merge branch 'master' into dxil-v1.0 2017-01-24 17:57:32 -08:00
David Peixotto f805233b49 Revert license text in banner comments to original llvm verbage (#33)
Fix #30: Revert license text in banner comments to original llvm verbage

This commit removes the Microsoft-specific copyright in llvm files
and reverts the copyright wording to the original llvm wording.

We used the following method to find the files to change:
1. Find all files in DirectXShaderCompiler that are also in llvm 3.7
2. For those files that have the Microsoft-specific copyright, revert
   it to the original llvm copyright as present in llvm 3.7
3. Revert the copyright in a few files that are not in llvm, but are
   mostly copies of files in llvm:
	lib\Transforms\Scalar\ScalarReplAggregatesHLSL.cpp
	lib\Transforms\Scalar\Reg2MemHLSL.cpp

Leave the Microsoft-specific copyright header in files not present
in stock llvm:

    include\dxc\*
    lib\HLSL\*
    lib\DxcSupport\*
    tools\clang\test\HLSL\*
    tools\clang\test\CodeGenHLSL\*
    tools\clang\unittests\HLSL\*
    tools\clang\unittests\HLSLHost\*
    tools\clang\tools\dxcompiler\*
    tools\clang\tools\dxa\*
    tools\clang\tools\dxc\*
    tools\clang\tools\dxopt\*
    tools\clang\tools\dxr\*
    tools\clang\tools\dxv\*
    tools\clang\tools\dotnetc\*
    utils\hct\*
    CONTRIBUTING.md
    COPYRIGHT
    LICENSE-MIT
    README.md
    cmake\modules\FindD3D12.cmake
    cmake\modules\FindDiaSDK.cmake
    cmake\modules\FindTAEF.cmake
    docs\DXIL.rst
    docs\HLSLChanges.rst
    docs\_themes\dxc-theme\layout.html
    docs\_themes\dxc-theme\theme.conf
    docs\_themes\dxc-theme\static\dxc-theme.css
    include\llvm\llvm_assert\assert.h
    include\llvm\llvm_assert\cassert
    include\llvm\Support\MSFileSystem.h
    include\llvm\Support\OacrIgnoreCond.h
    lib\MSSupport\CMakeLists.txt
    lib\MSSupport\MSFileSystemImpl.cpp
    lib\Support\assert.cpp
    lib\Support\MSFileSystemBasic.cpp
    lib\Support\Windows\MSFileSystem.inc.cpp
    lib\Transforms\Scalar\Reg2MemHLSL.cpp
    lib\Transforms\Scalar\ScalarReplAggregatesHLSL.cpp
    tools\clang\docs\UsingDxc.rst
    tools\clang\include\clang\AST\HlslTypes.h
    tools\clang\include\clang\Basic\BuiltinsDXIL.def
    tools\clang\include\clang\Basic\LangOptions.fixed.def
    tools\clang\include\clang\Parse\ParseHLSL.h
    tools\clang\include\clang\Sema\SemaHLSL.h
    tools\clang\lib\AST\ASTContextHLSL.cpp
    tools\clang\lib\AST\HlslTypes.cpp
    tools\clang\lib\CodeGen\CGHLSLMS.cpp
    tools\clang\lib\CodeGen\CGHLSLRuntime.cpp
    tools\clang\lib\CodeGen\CGHLSLRuntime.h
    tools\clang\lib\Frontend\Rewrite\FrontendActions_rewrite.cpp
    tools\clang\lib\Parse\HLSLRootSignature.cpp
    tools\clang\lib\Parse\HLSLRootSignature.h
    tools\clang\lib\Parse\ParseHLSL.cpp
    tools\clang\lib\Sema\gen_intrin_main_tables_15.h
    tools\clang\lib\Sema\SemaHLSL.cpp
    tools\clang\tools\d3dcomp\CMakeLists.txt
    tools\clang\tools\d3dcomp\d3dcomp.cpp
    tools\clang\tools\d3dcomp\d3dcomp.def
    tools\clang\tools\libclang\dxcisenseimpl.cpp
    tools\clang\tools\libclang\dxcisenseimpl.h
    tools\clang\tools\libclang\dxcrewriteunused.cpp
    tools\clang\tools\libclang\libclang.rc
    tools\dxexp\CMakeLists.txt
    tools\dxexp\dxexp.cpp
    tools\dxexp\LLVMBuild.txt
2017-01-24 17:54:00 -08:00
Xiang Li 664c0b6436 Change bool to i32 instead of i8. (#28) 2017-01-23 17:54:09 -08:00
Tex Riddell a96eea8581 Integrate internal changes
- link dump methods when compiled with _DEBUG or DBG
- d3d12warp to d3d10warp in hcttest-samples.py
2017-01-23 16:40:48 -08:00
David Peixotto 2cb77194db Improve hctdb use for extension intrinsics (#25)
Use a variable for the function used to check if an instruction is a dxil
intrinsic call rather than hardcoding the name. Allows us to override the
name if we want to use a different function. Useful for reusing hctdb
to generate code for extension intrinsics.
2017-01-23 16:28:49 -08:00
Tex Riddell 220f78a557 Merge 'master' into dxil-v1.0 2017-01-20 14:11:27 -08:00
Xiang Li 5623234187 Strip function parameter for entry and patch constant function. (#20)
Strip function parameter for entry and patch constant function

* Update error message for ValidationTest::MultiDimArray

* Merge remote-tracking branch 'origin/master'

# Conflicts:
#	lib/HLSL/DxilValidation.cpp
#	tools/clang/unittests/HLSL/ValidationTest.cpp

* Update error message for ValidationTest::MultiDimArray

Update error message for ValidationTest::MultiDimArray

* Fix merge error. (#3)

* Delete local file (#4)

* Fix merge error.

* Delete local file

* Strip function parameter for entry and patch constant function. (#5)
2017-01-19 19:00:17 -08:00
Tex Riddell 2d3ce8ef22 Merge remote-tracking branch 'upstream/master' into integration 2017-01-19 11:21:59 -08:00
Marcelo Lopez Ruiz e8fccd80ef Change hctstart default to x64 and require lower feature level in tests. (#16)
D3D_FEATURE_LEVEL_12_1 isn't required by the execution tests, so we
use a lower default, D3D_FEATURE_LEVEL_11_0, which allows tests to run
on more hardware. We can have tests specify higher values on a per-test
basis if there's a specific need in future changes.
2017-01-19 09:38:41 -08:00
Tex Riddell 4b532ceff9 Merge branch 'master' into integration 2017-01-18 19:43:07 -08:00
Tex Riddell 69d8d3209b Integrate change to DXIL Version 1.0 2017-01-18 19:18:55 -08:00
Tex Riddell c27cd89141 Restrict shader models accepted by DxCompiler API to 6.0 (#15)
- upconvert to 6.0 in dxc.exe and d3dcompiler_dxc_bridge
  - restrict to 6.0 in dxcompiler API
  - restrict to 6.0 in DxilValidator
  - allow loading of SM < 6.0 for now on DXIL 0.7
2017-01-18 17:45:26 -08:00
Tex Riddell 55ba393c2c Signature packing, codegen fixes, and validation fixes and additions.
- Add DxilSignatureAllocator for signature packing
  - Fix signature validation.  Add more validation.
  - Fix and add validation tests.
  - Fix codegen for inout params with SV like SV_Coverage
  - fix m_SemanticStartIndex on DxilSignatureElement::Initialize
  - fix DxilSignatureElement::GetColsAsMask for start col == 2
  - Add diags for signature allocation failures
  - Use Regex in ValidationTest
2017-01-17 18:10:16 -08:00
David Peixotto 5dca710dff Update htcdb scripts (#10)
- Pass input stream for hlsl intrinsics function instead of hard-coding
      the file location.
- Keep enum namespace as a property of hlsl_db
- Compatibility changes for python3.
2017-01-17 14:04:34 -08:00
Xiang Li ee0e81b047 Disable multi-dim array type and function call. (#12) 2017-01-17 13:30:42 -08:00
Xiang Li 2d4330634e Merge pull request #9 from Microsoft/dxilDev
Cleanup more Validation TODOs.
2017-01-12 18:01:37 -08:00
Xiang Li 96c0eb50ef Cleanup more Validation TODOs. 2017-01-12 17:59:37 -08:00
Xiang Li 1c960f4abf Merge pull request #8 from Microsoft/dxilDev
Cleanup Validation TODOs.
2017-01-11 10:49:49 -08:00
Xiang Li 03149de76f Cleanup more validation TODOs. 2017-01-11 10:42:48 -08:00
Xiang Li 8eb801f1fd Clean more validation TODOs. 2017-01-10 16:24:10 -08:00
Xiang Li 245a771a85 1. Clean more validation TODOs.
2. Support array of SV_Target.
2017-01-10 11:44:48 -08:00
python3kgae 277f6b300b Merge pull request #4 from Microsoft/dxilDev
Clean more TODOs for Validation and Dxil generation.
2017-01-04 13:32:57 -08:00
Xiang Li 28b3ffe821 Clean more validation TODOs. 2017-01-04 13:29:28 -08:00
David Peixotto bb4794ca6c Improve new user experience (#1)
Improve new developer experience

Update README and hctstart.cmd tools to help new developers.

Update README
    * Add instructions on how to setup the build environment
      from the command line.
    * Add note to install common tools for c++ to get the atl headers.
    * Change cmake download to point to cmake 3.4.3. Version 3.4 did
      not work for me (it could not find the Visual Studio compiler tools).

Modify hctstart.cmd
    * Explicitly check for the d3d12.h header from the 10240 windows kit.
      Without this early check we get a build error much later.
    * Check for cmake version 3.4.3 and warn if not found.

Update gitignore for visual studio code temporary files.
2017-01-04 09:24:29 -08:00
Marcelo Lopez Ruiz 6ee4074a4b first commit 2016-12-28 11:52:27 -08:00