- Oct 28, 2017
-
-
John Kessenich authored
-
- Oct 27, 2017
-
-
John Kessenich authored
Both debug and release clang builds have segfaulted on recent changes, non deterministically, while doing the single/multi-thread test all test files. Removing recent test files, to see if it gives a clue.
-
- Oct 25, 2017
-
-
Aaron Muir Hamilton authored
-
- Oct 24, 2017
-
-
Aaron Muir Hamilton authored
-
- Oct 23, 2017
-
-
Aaron Muir Hamilton authored
-
John Kessenich authored
-
- Oct 22, 2017
-
-
Aaron Muir Hamilton authored
-
- Oct 21, 2017
-
-
Aaron Muir Hamilton authored
-
- Oct 20, 2017
-
-
John Kessenich authored
-
- Oct 19, 2017
-
-
John Kessenich authored
-
LoopDawg authored
This PR adds the ability to provide per-descriptor-set IO mapping shift values. If a particular binding does not land into a per-set value, then it falls back to the prior behavior (global shifts per resource class). Because there were already 6 copies of many different methods and internal variables and functions, and this PR would have added 6 more, a new API is introduced to cut down on replication and present a cleaner interface. For the global (non-set-specific) API, the old entry points still exist for backward compatibility, but are phrased internally in terms of the following. // Resource type for IO resolver enum TResourceType { EResSampler, EResTexture, EResImage, EResUbo, EResSsbo, EResUav, EResCount }; Methods on TShader: void setShiftBinding(TResourceType res, unsigned int base); void setShiftBindingForSet(TResourceType res, unsigned int set, unsigned int base); The first method replaces the 6 prior entry points of various spellings, which exist now in depreciated form. The second provides per-resource-set functionality. Both accept an enum from the list above. From the command line, the existing options can accept either a single shift value as before, or a series of 1 or more [set offset] pairs. Both can be provided, as in: ... --stb 20 --stb 2 25 3 30 ... which will use the offset 20 for anything except descriptor set 2 (which uses 25) and 3 (which uses 30).
-
John Kessenich authored
-
John Kessenich authored
Desktop defaults to highp for samplers, but this should not apply to the built-in functions, so make it appy only to user declarations.
-
- Oct 18, 2017
-
-
Aaron Muir Hamilton authored
This division is undefined behaviour which raises SIGFPE on x86. Most C++ preprocessors evaluate this silently to 0.
-
- Oct 17, 2017
-
-
Aaron Muir Hamilton authored
-
- Oct 16, 2017
-
-
John Kessenich authored
Also, rationalized this to generally make it safer and more readable. It could use a more modern approach, at some point...
-
John Kessenich authored
-
John Kessenich authored
-
John Kessenich authored
-
- Oct 12, 2017
-
-
John Kessenich authored
Fixes #1092. Allows arrays of opaques to keep arrayness, unless needed by uniform array flattening. Can handle assignments of mixed amounts of flattening.
-
- Oct 07, 2017
-
-
John Kessenich authored
-
John Kessenich authored
The semantics differ between GLSL/HLSL and SPIR-V. Translate between these.
-
John Kessenich authored
-
- Oct 06, 2017
-
-
Sebastian Tafuri authored
-
LoopDawg authored
A single texture can statically appear in code mixed with a shadow sampler and a non-shadow sampler. This would be create invalid SPIR-V, unless one of them is provably dead. The previous detection of this happened before DCE, so some shaders would trigger the error even though they wouldn't after DCE. To handle that case, this PR splits the texture into two: one with each mode. It sets "needsLegalization" (if that happens for any texture) to warn that this shader will need post-compilation legalization. If the texture is only used with one of the two modes, behavior is as it was before.
-
- Oct 04, 2017
-
-
John Kessenich authored
Works in conjuction with d1be7545 to represent and modify a partially dereferenced multi-level flattened aggregate.
-
- Oct 03, 2017
-
-
Unknown authored
-
- Oct 02, 2017
-
-
LoopDawg authored
Add support for Subpass Input proposal of issue #1069. Subpass input types are given as: layout(input_attachment_index = 1) SubpassInput<float4> subpass_f; layout(input_attachment_index = 2) SubpassInput<int4> subpass_i; layout(input_attachment_index = 3) SubpassInput<uint4> subpass_u; layout(input_attachment_index = 1) SubpassInputMS<float4> subpass_ms_f; layout(input_attachment_index = 2) SubpassInputMS<int4> subpass_ms_i; layout(input_attachment_index = 3) SubpassInputMS<uint4> subpass_ms_u; The input attachment may also be specified using attribute syntax: [[vk::input_attachment_index(7)]] SubpassInput subpass_2; The template type may be a shorter-than-vec4 vector, but currently user structs are not supported. (An unimplemented error will be issued). The load operations are methods on objects of the above type: float4 result = subpass_f.SubpassLoad(); int4 result = subpass_i.SubpassLoad(); uint4 result = subpass_u.SubpassLoad(); float4 result = subpass_ms_f.SubpassLoad(samp); int4 result = subpass_ms_i.SubpassLoad(samp); uint4 result = subpass_ms_u.SubpassLoad(samp); Additionally, the AST printer could not print EOpSubpass* nodes. Now it can. Fixes #1069
-
- Sep 30, 2017
-
-
John Kessenich authored
- support C++11 style brackets [[...]] - support namespaces [[vk::...]] - support these on parameter declarations in functions - support location, binding/set, input attachments
-
- Sep 29, 2017
-
-
GregF authored
-
John Kessenich authored
Also, remove assumption that if something is opaque that it must be in the UniformConstant storage class. This allows function declarations to know all parameters will be in the Function storage class.
-
John Kessenich authored
This assumes it will be combined with optimizing transforms that eliminate assignments to opaques.
-
- Sep 28, 2017
-
-
LoopDawg authored
Texture shadow mode must match the state of the sampler they are combined with. This change does that, both for the AST and the symbol table. Note that the texture cannot easily be *created* the right way, because this may not be known at that time. Instead, the texture is subsequently patched. This cannot work if a single texture is used with both a shadow and non-shadow sampler, so that case is detected and generates an error. This is permitted by the HLSL language, however. See #1073 discussion. Fixed one test source that was using a texture with both shadow and non-shadow samplers.
-
- Sep 27, 2017
-
-
GregF authored
Also added known-good mechanism to fetch latest validated spirv-tools. Also added -Od and -Os to disable optimizer and optimize for size. Fetching spirv-tools is optional for both glsl and hlsl. Legalization of hlsl is done by default if spirv-opt is present at cmake time. Optimization for glsl is currently done through the option -Os. Legalization testing is currently only done on four existing shaders. A separate baseLegalResults directory holds those results. All previous testing is done with the optimizer disabled.
-
Rex Xu authored
-
- Sep 20, 2017
-
-
LoopDawg authored
Remapper errors are generally fatal: there has been some unexpected situation while parsing the SPV binary, and there is no reasonable way to carry on. The errorHandler() function is called in this case, which by default exits, but it is possible to submit a handler which does not. In that case the remapper would carry on in a bad state. This change ensures a graceful termination of the remap() function. While a try {} catch {} construct would be the ideal and safe way to do this, that's off limits for certain environments, so this tries to do the same thing with explicit code, to catch all the bailout paths.
-
- Sep 19, 2017
-
-
John Kessenich authored
-
- Sep 15, 2017
-
-
xavier authored
-
John Kessenich authored
-
John Kessenich authored
-