Commit Graph

45 Commits

Author SHA1 Message Date
Hans-Kristian Arntzen
f0200bb18d Use packoffset in HLSL.
Rewrite how cbuffers are emitted.
2017-10-10 13:15:49 +02:00
Hans-Kristian Arntzen
9aa42a87af Just emit textureSize variants we actually need. 2017-09-20 10:31:56 +02:00
Hans-Kristian Arntzen
1bc5b70752 Add exhaustive image query to HLSL.
Need to strip this down somehow ...
2017-09-20 10:00:13 +02:00
Hans-Kristian Arntzen
4375aa3fd2 Refactor out access chain reads.
Prepare for matrix, array and struct loads.
2017-08-15 10:12:08 +02:00
Hans-Kristian Arntzen
7d7f4b3b50 Emit flattened loads and stores. 2017-08-15 09:15:23 +02:00
Hans-Kristian Arntzen
bdfa97a1cf Unify vertex clip-coord fixups.
The different options were scattered around in different backends and
didn't really work right with CLI at all.
2017-08-03 13:02:59 +02:00
Hans-Kristian Arntzen
98c76eed69 Declare specialization constants in HLSL. 2017-07-29 22:13:27 +02:00
Hans-Kristian Arntzen
620da7b943 Add basic support for : register() declaration in HLSL. 2017-06-17 10:15:32 +02:00
Bill Hollings
b41e1482c8 Support emitting SPIR-V type declarations tuned for specified SPIR-V objects.
CompilerGLSL type_to_glsl() and image_type_glsl() functions support optional object ID.
Add SPIRType::Image::access member to support SPIR-V OpTypeImage access qualifier.
Remove SPIRType::Image::is_read and ::is_written members.
Use DecorationNonReadable and DecorationNonWritable to mark read/write access for image variables.
CompilerMSL emit access qualifiers per image variable, instead of per image type.
CompilerGLSL and CompilerHLSL behaviour is unchanged.
2017-05-29 20:45:05 -04:00
Hans-Kristian Arntzen
947f7010c7 HLSL: Use emit_sampled_image_op instead. 2017-05-07 13:28:08 +02:00
Hans-Kristian Arntzen
686ac6812b HLSL: Can pass down combined image samplers as arguments. 2017-05-07 13:22:16 +02:00
Hans-Kristian Arntzen
59ad08429b HLSL: Add test for passing down separate image and samplers to functions. 2017-05-07 12:53:51 +02:00
Hans-Kristian Arntzen
f4d7268565 GLSL will also need shadow state analysis.
Refactor stuff out to top-level.

Fix some bugs with combined shadow samplers in regular GLSL.
2017-05-06 13:21:35 +02:00
Hans-Kristian Arntzen
100e9d34b8 HLSL: Basic support for separate image/samplers. 2017-05-06 12:39:04 +02:00
Hans-Kristian Arntzen
2b4c3db7e3 Don't enable point_size_compat by default. 2017-05-04 10:32:43 +02:00
Hans-Kristian Arntzen
17d88ca928 Add compatibility option for PointSize in HLSL.
If we opt-in to it, PointSize can be ignored to avoid more annoying
workarounds.
2017-05-04 10:12:14 +02:00
Robert Konrad
8446631171 Support cube maps in HLSL 2017-04-21 14:54:03 +02:00
Robert Konrad
fd9b589469 Support textureProj in HLSL4/5 2017-04-20 13:37:38 +02:00
Hans-Kristian Arntzen
9bad477f16 Add vector-less IR construction to subclasses as well. 2017-04-01 16:08:19 +02:00
Robert Konrad
a7e2a69a6f Add bit casting to HLSL 2017-03-24 14:13:59 +01:00
Hans-Kristian Arntzen
b8bda45802 Add test case for interpolation qualifiers in HLSL. 2017-03-21 13:48:50 +01:00
Hans-Kristian Arntzen
439fa9f4a2 Handle I/O blocks separately from regular inputs and outputs. 2017-03-21 13:48:50 +01:00
Hans-Kristian Arntzen
61c31c6054 Make use of explicit locations in HLSL. 2017-03-21 13:48:50 +01:00
Hans-Kristian Arntzen
bdea1a444a Begin rewriting how HLSL deals with inputs and outputs. 2017-03-21 13:48:50 +01:00
Hans-Kristian Arntzen
bcf2303ba0 Do not emit storage qualifiers for local variables.
Metal backend uses local variables to implement global variables.
Do not emit storage qualifiers for any variable which is declared inside
a function.
2017-02-24 11:15:34 +01:00
Robert Konrad
2da32f717d Remove obsolete transpose op functions for HLSL 2017-01-27 16:51:50 +01:00
Robert Konrad
4358b2f788 Format the other HLSL copyright comment 2017-01-27 16:45:43 +01:00
Robert Konrad
048293198b Add optional y vertex flip for HLSL 2017-01-27 15:55:39 +01:00
Robert Konrad
532877f6f5 Make clipspace fixing in HLSL optional 2017-01-27 15:52:47 +01:00
Robert Konrad
c3268c9410 Do not output layouts for uniforms in HLSL 2017-01-24 09:23:22 +01:00
Robert Konrad
99469f0690 Convert uniform buffer blocks to cbuffers 2017-01-24 09:17:43 +01:00
Robert Konrad
40e5d1e7f7 Format code 2017-01-23 14:49:32 +01:00
Robert Konrad
4a0267e201 Do not intertwine TEXCOORD and POSITION outputs 2017-01-23 14:39:40 +01:00
Robert Konrad
1a48d7d4fc Output code for OpFMod in HLSL when required 2016-08-18 12:54:22 +02:00
Robert Konrad
8e9bf1f7af Implement some common GLSL lib insts in HLSL
Because some are the same and some are not.
2016-08-18 12:40:35 +02:00
Robert Konrad
7534b224d9 Add remaining matrix multiplication ops for HLSL 2016-08-18 11:45:50 +02:00
Robert Konrad
f3740a00ee Support HLSL shader models > 3 2016-08-18 00:51:12 +02:00
Robert Konrad
a896868215 Sort variables in HLSL input/output structs
To make binding numbers the same in all
shader stages.
2016-08-15 20:33:10 +02:00
Robert Konrad
da5f99bb6d Handle matrix times vector ops correctly in HLSL 2016-08-14 23:54:51 +02:00
Robert Konrad
d2b29c900e Add basic HLSL texture support 2016-08-14 23:09:06 +02:00
Robert Konrad
e9cd04e8ec Format code 2016-08-14 22:02:38 +02:00
Robert Konrad
80fcf554f9 Handle HLSL input/output 2016-08-14 21:33:32 +02:00
Robert Konrad
096d46f62c Start supporting proper HLSL type names 2016-08-14 20:28:52 +02:00
Robert Konrad
02fd8e92ab Use input/output structs for HLSL 2016-08-14 17:58:56 +02:00
Robert Konrad
45270f618f Start on HLSL using a CompilerGLSL descendant 2016-08-14 16:21:43 +02:00