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

868 Коммитов

Автор SHA1 Сообщение Дата
Lei Zhang 87d66c9d09
[spirv] Add doc and tests for snorm/unorm float type (#773) 2017-11-08 10:49:32 -05: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
John Porto 6a25d56df2
Modifies CodeGenSimpleHS 10 and 11 so that they use target hs_6_0 (#766) 2017-11-07 15:13:04 -08:00
Ehsan 7cb1c20853
[spirv] Handle TessFactor size mismatches. (#771) 2017-11-07 12:37:02 -08:00
Lei Zhang dc3d2c7921
[spirv] Require ClipDistance/CullDistance capability on use (#769)
Declaring but not using (reading/writing) ClipDistance/CullDistance
does not require the ClipDistance/CullDistance capability.
2017-11-07 15:17:13 -05:00
Lei Zhang 5759c22d82
[spirv] Add check for Patch decoration in interface tests (#770)
Also make parameter names clear that they are for patch constant
function (PCF), not generally patch constant, which also involves
some domain shader inputs.
2017-11-07 14:30:29 -05:00
Xiang Li f9c599bba6
Make Od the same group with o0/o1/o2/o3. (#767) 2017-11-07 10:34:02 -08:00
Lei Zhang 734266277b
[spirv] Change vertex processing stages to emit gl_PerVertex (#757)
As per the Vulkan spec requirement:

  Any variable decorated with Position must be declared as a
  four-component vector of 32-bit floating-point values.

But for HS/DS/GS, we actually have an extra arrayness. If we
generate a stand-alone Postion builtin variable, it will be
an array of float4, which does not comply with the spec.

Similary for the type requirements on ClipDistance and
CullDistance.

The spec could have an problem on this issue, but the GLSL way
is to emit a gl_PerVertex that contains Position, ClipDistance,
and CullDistance. That satisfies the current Vulkan spec.

This commit converts VS output, HS/DS input and output, GS
input to emit the gl_PerVertex struct. It also splits arrays
of structs into arrays of the fields for HS/DS/GS input/output.

ClipDistance/CullDistance is also supported in this commit,
which requires quite some non-trivial handling.
2017-11-07 09:56:10 -05: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
Jeff Noyle 966eb72fc4
Emit all the args (#765) 2017-11-06 16:25:36 -08:00
John Porto 502323cb73
moves the patch constant fn validation to the backend. (#754)
* moves the patch constant fn validation to the backend.

* addresses comments

* fixes broken test
2017-11-06 12:41: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
Ehsan 97aab11faf
[spirv] Translate intrinsic asdouble and asuint. (#758) 2017-11-03 05:38:08 -07:00
Ehsan 4b7fab259f
[spirv] Add support for HLSLMatrixTruncationCast (#753) 2017-11-03 05:37:46 -07:00
Tex Riddell 694296b6b0
Add target-dependent experimental function attribute (#759) 2017-11-02 19:20:57 -07:00
Lei Zhang 6f9fb6a534
[spirv] Remove duplicated HLSL type probing methods (#755) 2017-11-02 12:32:48 -04:00
Lei Zhang 2a15ef6914
[spirv] Fix effcee error message check name and file name (#756) 2017-11-02 12:30:08 -04:00
Jeff Noyle 59b317d549
Skip getelementptr instructions (#751) 2017-11-01 12:31:05 -07:00
Ehsan 529f6ee6bf
[spirv] Translate FlatConversion implicit cast. (#750) 2017-11-01 09:29:09 -07:00
Ehsan 317eba1b86
[spirv] Emit error for tex*() intrinsic functions. (#738) 2017-11-01 06:19:21 -07:00
Xiang Li adcdb2ccba
Use _wcsicmp instead of wcsicmp. (#752) 2017-10-31 18:09:39 -07:00
Jeff Noyle 0acdbd9a8c
PIX pixel-cost visualizer: Fix byte offset, simplify ReEmitDxilResources (#749)
* byte offset, not element offset => multiply by sizeof(dword)
set uav to r/w
Re-emit meta-data becomes delete then emit

* update test

* re-compute view id state
2017-10-31 13:37:07 -07:00
John Porto 3563ae9c5a
Allows Patch Constant Function definition after HS entry point (#748)
* Allows Patch Constant Function definition after HS entry point

* Fixes SimpleHS8.hlsl
2017-10-31 10:39:56 -07:00
Ehsan c5dc49a7fd
[spirv] Translate intrinsic Lit function. (#744) 2017-10-31 10:14:56 -04:00
Xiang Li b304e729a2
Use LHS type as result type for compound assignment. (#746) 2017-10-30 17:37:59 -07:00
Xiang Li 8c790a8b0e
Do not generate phi of pointers. (#745)
* Disable optimizations which may generate phi of pointers.
2017-10-30 15:53:25 -07:00
Xiang Li cb2a7e46d8
Only set fastmath on binary math op. (#743) 2017-10-30 13:18:32 -07:00
Young Kim ce9d6267a5 DataLayout String and ConstantBuffer Offset Fix (#727)
This change is to update correct target data layout for DXIL. Now that we have a scalar type of size less than dwords, we need to correctly print string data layout to determine non-packed structure layout.

This change also fixes alignments issues with ConstantBuffer as it was having different CG path from cbuffer.
2017-10-26 14:51:50 -07:00
Ehsan 3ff562f294 [spirv] Tests InputPatch & OutputPatch operator[] (#737) 2017-10-26 16:24:03 -04:00
Ehsan 6d8bf3e34a [spirv] Support GS output stream types. (#736) 2017-10-26 14:02:40 -04:00
Lei Zhang 4046ce318a [spirv] Update dependencies and use two new opt passes (#735) 2017-10-25 16:43:54 -04:00
Ehsan 96c5c0ad17 [spirv] Execution modes for GS primitive types. (#734) 2017-10-25 16:02:23 -04:00
Ehsan 0d9cfd2b3a [spirv] Translate maxvertexcount attribute for GS. (#732) 2017-10-25 09:25:38 -04:00
Lei Zhang ffe7692c75 [spirv] Update SPIR-V rst doc (#733) 2017-10-24 14:32:38 -04:00
Lei Zhang 108f1658d2 [spirv] Add support for [[vk::counter_binding(X)]] (#730)
A new attribute [[vk::counter_binding(X)]] can be used to specify
the binding number for associated counters for RW/append/consume
structured buffers.

Also added support for .IncrementCounter() and .DecrementCounter()
for RWStructuredBuffer.

Also fixed the type error of OpAtomicI{Add|Sub}.
2017-10-24 10:51:50 -04:00
Xiang Li ef7a891ab2 Support case write to struct input. (#731) 2017-10-23 19:09:30 -07:00
Ehsan be61057cb5 [spirv] Translation of domain shaders. (#724)
Added necessary functionality to handle domain shader translation.
Also added Bezier domain shader as test.
Also added Patch decoration to the hull shader patch constant outputs and
the domain shader patch constant inputs.
2017-10-23 15:47:13 -04:00
Lei Zhang 5686ccf2c4 [spirv] Allow the same binding number for combined image sampler (#729)
Vulkan combined image sampler is logically considered a sampled
image and a sampler bound together.
2017-10-23 11:57:40 -07:00
Adam Yang 946e0b3922 Merge pull request #726 from adam-yang/test
Using IMalloc::Free instead of delete for Release.
2017-10-23 11:26:39 -07:00
Adam Yang 1fc7549dae Deleted the accidentally added output files. 2017-10-23 10:38:42 -07:00
Marcelo Lopez Ruiz b7ce331dee Fix unused var warning in Release, fix #709 misplaces parens (#728) 2017-10-21 14:43:23 -07:00
Lei Zhang 8702f97dff [spirv] Add support for four register number shifting options (#720)
Added the following four command line options to shift register
number for Vulkan:

* -fvk-b-shift
* -fvk-t-shift
* -fvk-s-shift
* -fvk-u-shift

These options are used to avoid assigning the same binding
number to more than one resources.
2017-10-20 19:37:11 -07:00
Adam Yang 655b1fc8dd Initializing malloc obj in DxcDiaSourceFile 2017-10-20 17:00:41 -07:00
Adam Yang edae151c04 Added back in the Tread Malloc guard 2017-10-20 15:17:59 -07:00
Adam Yang 2fea86ac2b Using IMalloc::Free instead of delete for Release. 2017-10-20 14:42:05 -07:00
Young Kim 40369a5884 Structure alignment Change (#721)
Structure buffer alignment change for float16. Starting in shader model 6.2, the structure will match that of #pragma pack(8) alignment in C++

Removing padding for structure buffer. We will not have any padding in HLSL structure since load/store operation already handles offset as if padding exist in #pragma pack(8) mode in C++

Disable legacy alignment for non precision mode as it was only needed for min precision
2017-10-20 13:51:42 -07:00
Ehsan a62dba918f [spirv] Translate intrinsic Interlocked* methods. (#722) 2017-10-20 13:06:37 -04:00
Jeff Noyle 5b3f3d7c16 Another instance of parameters-that-should-have-been-undef (#718) 2017-10-18 09:07:52 -07:00
Xiang Li a7cba6d180 Create constant initilizer from static constructor if possible. (#717)
* Create constant initilizer from static constructor if possible.
2017-10-17 18:17:00 -07:00
Jeff Noyle 9cb2d14005 Specify undefined values for unused arguments... (#716) 2017-10-17 14:41:40 -07:00