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

448 Коммитов

Автор SHA1 Сообщение Дата
Tex Riddell 912e1bc819 Merged PR 67: Fix reflection of raytracing acceleration structure resource. 2018-04-24 21:22:53 +00:00
Tex Riddell f0513781bd Merged PR 63: Support D3D12LibraryReflection, add tests, fix reflection bugs, fix MSFileSystem usage issue
- Support ID3DLibraryReflection
- Fix CB init that was putting a pointer to stack in var desc
- Reflection dumper for testing, add tests, fix more empty struct breaks
- Fix problems with MSFileSystem used from independent locations
- Skip structured buffers when setting usage, since it's not gathered
- RDAT Assembly: Avoid adding duplicate strings to string table
- DxilRuntimeReflection: avoid possibility of wstring::data() invalidation
2018-04-20 20:02:39 +00:00
Tex Riddell 22ba6368bb RDAT Assembly: Avoid adding duplicate strings to string table 2018-04-19 18:47:17 -07: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
Xiang Li f2440150d7 Move code to remove phi on resource into DxilLowerCreateHandleForLib. 2018-04-19 14:07:29 -07:00
Tex Riddell 3bc4206b8c Auto alloc TLS for file system instead of requiring explicit Setup/Cleanup 2018-04-18 01:21:21 -07:00
Tex Riddell 431de81ba9 AutoPerThreadSystem: calls [Setup/Cleanup]PerThreadFileSystem() 2018-04-18 00:21:12 -07:00
Xiang Li afcd7cb6a7 Fix Merge conflict on Better memcpy propagation. (#1233). 2018-04-17 11:58:11 -07:00
Xiang Li e1fd0fc9de
Better memcpy propagation. (#1233)
1. MergeGepUse for cbuffer and temp gep created when flatten.
2. When flatten alloca, always keep order by size of type.
   So we can make sure big alloca flattened first, then small alloca can easier remove memcpy.
3. For global variable which has zero init value, replace use of zero initializer if possible.
4. In ResourceToHandle::ReplaceResourceWithHandle only assert when has user.
5. MergeGepUse for input output in collectInputOutputAccessInfo.
2018-04-17 10:57:15 -07:00
Tex Riddell 42ca602351 Merge branch 'rtmaster' into user/texr/library-reflection 2018-04-16 17:04:16 -07:00
Tex Riddell 5ab102a352 Merge branch 'master' into rtmaster 2018-04-16 15:25:53 -07:00
Tex Riddell 406f9a94e0 Skip structured buffers when setting usage, since it's not gathered 2018-04-15 17:01:56 -07:00
Tex Riddell fc2d6fe4da Fix problems with MSFileSystem used from independent locations
CompilerTest would hit appverif break due to using before other
code would call setup.
Adding setup leads to independent locations trying to setup/cleanup
the file system, which would trigger assert.

- Make [Setup/Cleanup]PerThreadFileSystem() support tracking/ignoring
nested calls.
- Added setup/cleanup to CompilerTest and DxilModuleTest
- Added some asserts
2018-04-15 17:00:23 -07:00
Tex Riddell 7d7ce64f8f Reflection dumper for testing, add tests, fix more empty struct breaks 2018-04-14 12:53:29 -07:00
Tex Riddell 25c755f6f8 Fix CB init that was putting a pointer to stack in var desc 2018-04-14 00:01:16 -07:00
Tex Riddell b6b3cd6d6d Add some asserts. 2018-04-13 19:06:46 -07:00
Lei Zhang a4491dd439
[spirv] Support shifting all sets with -fvk-*-shift N all (#1224) 2018-04-13 15:40:44 -04:00
Xiang Li d6187949d7
Check input for atan2. (#1213)
* Check input for atan2.
2018-04-12 10:52:51 -07:00
Tex Riddell c1b6627843 Support ID3DLibraryReflection
- function parameter reflection not supported
2018-04-11 14:13:56 -07:00
Young Kim e507d99e4e fix merge conflict on SROA 2018-04-10 17:33:37 -07:00
Young Kim 0777a7a020 Merge branch 'master' into rtmaster 2018-04-10 16:47:47 -07:00
Tex Riddell 0021e993a2 Merged PR 56: Avoid inserting other insts before allocas in several passes.
Avoid inserting other insts before allocas in several passes.

- Improve code that creates allocas/non-allocas to keep allocas first
- Add helper functions to dxilutil
- Use name AllocaBuilder for CreateAlloca for clarity
2018-04-10 23:33:41 +00:00
Young Kim 0bc25bd790 Revert dxilpipelinestatevalidation namespaces 2018-04-10 12:31:30 -07:00
Lei Zhang 0a8b8c4e1d
[spirv] Rename -fvk-use-glsl-layout to -fvk-use-gl-layout (#1206)
GLSL as a shading language does not define the layout rules for
std140/std430; the OpenGL graphics environment defines that.

This is also more consistent with -fvk-use-dx-layout.
2018-04-10 10:25:26 -04:00
Young Kim 33a8ad5130 Merged PR 61: Implement DxilRuntimeRefleciton API for runtime
DxilRuntimeReflection uses RDATTableReader to obtain information about the library. InitFromRDAT call will allocate all memory required to get DXIL_LIBRARY_DESC.
2018-04-10 00:08:50 +00:00
Lei Zhang 99c142be0b
[spirv] Add support for DX layout rules (#1198)
These layout rules can be turned on with -fvk-use-dx-layout.
For both cbuffer/tbuffer and structured buffers.
2018-04-08 12:50:57 -04:00
Ehsan 2a0b7c49fd
[spirv] Add -fspv-target-env command line option. (#1187)
* [spirv] Add -fspv-target-env command line option.

The valid values for this option currently are:
vulkan1.0
vulkan1.1

If no target environment is specified, vulkan1.0 is used as default.
2018-04-03 09:12:51 -04:00
Tex Riddell 335ee949bb More places to be cautious about alloca vs. non-alloca insert locs.
- some builder name changes for consistency
2018-03-29 18:05:38 -07:00
Xiang Li 357803d342
Don't sink sample coordinate into control flow. (#1188) 2018-03-29 16:33:59 -07:00
Lei Zhang 241d32c810
[spirv] Allow explicitly controlling SPIR-V extensions (#1151)
Added FeatureManager to record all extensions specified from
the command-line and emit error if trying to use one not permitted.

Added command-line option -fspv-extension= to specify
whitelisted extensions.
2018-03-27 17:42:16 -04:00
Xiang_Li (XBox) 1d91a0a5b1 Merged PR 59: Remove hl functions has body and always inline before DxilGeneration to avoid
Remove hl functions has body and always inline before DxilGeneration to avoid fail to find resource for update counter.
2018-03-27 21:35:10 +00:00
Sebastian Tafuri 44dff38588 Silence unusued variable warning when building without asserts (#1073)
* Silence unusued variable warning when building without asserts

* Spaces instead of tabs

* Replaced DXASSERT with DXASSERT_LOCALVAR instead
2018-03-27 09:27:17 -07:00
Lei Zhang 236cdc1cdf
Hook up --help-hidden with PrintHelp() (#1060)
We have defined --help-hidden in HLSLOptions.td but the compiler
is not set up to respect it. This commit hooks up them.
2018-03-27 12:08:11 -04:00
Xiang Li a489c2ec25
Transform mad(a, 0, b) into b. (#1150) 2018-03-19 18:04:56 -07:00
Lei Zhang 0d8a15a61a
[spirv] Better reflection support via new extensions (#1111)
This commit uses the HlslCounterBufferGOOGLE decoration to link
the main RW/Append/Consume StructuredBuffer with its associated
counter buffer. It also uses HLSLSemanticGOOGLE to decorate
stage IO variables with their semantic strings from the source code.
2018-03-17 13:05:31 -04:00
Young Kim f174990c6e
Fix checking LoadInput for GetAttributeAtVertex for no Opt (#1149) 2018-03-17 08:45:46 -07:00
Grant 18138ff8cf Handle more complex addressing modes (#1147)
Fix HoistConstantArray pass to recognize more complex load & store patterns.

Previously it was expecting no nesting and just a simple list of GetElementPtr's that fed loads or stores. Now it can accept a tree (DAG) of GetElementPtrs that feed leaf node loads or stores.
These patterns cannot be directly derived from HLSL, however they can occur due to previous optimizations that transform the array accesses (like a partial CSE or similar).
2018-03-16 14:29:36 -07:00
Tex Riddell 81f8b8c3a2 Avoid inserting other insts before allocas in several passes.
- Improve code that creates allocas/non-allocas to keep allocas first
- Add helper functions to dxilutil
- Use name AllocaBuilder for CreateAlloca for clarity
2018-03-15 17:41:42 -07:00
Tex Riddell 6f531dedd0 Merge branch 'user/texr/unused-var-warning' into user/texr/rt-merge-rebase 2018-03-13 12:47:40 -07:00
Tex Riddell 53bb89f6d8 Fix unused local var warning when DXASSERT is off. 2018-03-13 12:44:59 -07:00
Young Kim 648b4aebd1 Merged PR 47: Remove duplicate resource usage for a function for arrays of resources
Remove duplicate resource usage for a function for arrays of resources
2018-03-13 18:13:46 +00:00
Xiang Li d66d48721f
Set default input control point count to 1. (#1135) 2018-03-13 11:06:30 -07:00
Tex Riddell 74f4fee608 HLMatrixLower: Fix out matrix param for lib func 2018-03-13 01:53:52 -07:00
Tex Riddell 5f94a3cf57 Save/restore diag printer in LoadModuleFromBitcode. 2018-03-12 23:16:31 -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 8ba7f58967 Merged PR 44: Fix CreateTransposeShuffle in HLMatrixLowerPass
Fix CreateTransposeShuffle in HLMatrixLowerPass
2018-03-12 20:10:00 +00:00
Tex Riddell 64dada19d7 Merged PR 41: Prevent GVN from upsizing loads and bitcasting i32* to i64* breaking DXIL
Prevent GVN from upsizing loads and bitcasting i32* to i64* breaking DXIL
2018-03-12 20:09:49 +00:00
Tex Riddell bb2009ac39 Merged PR 40: Skip unused resources in FindUsingFunction fixing AV
Skip unused resources in FindUsingFunction fixing AV
2018-03-12 20:09:37 +00:00
Tex Riddell 4b02d18ca2 Merged PR 39: Linker: add resources to LLVMUsed so they don't get deleted prematurely
Linker: add resources to LLVMUsed so they don't get deleted prematurely
2018-03-12 20:09:24 +00:00