-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix MOVC translation with swizzle #33
base: master
Are you sure you want to change the base?
Commits on Sep 30, 2014
-
Configuration menu - View commit details
-
Copy full SHA for b20c523 - Browse repository at this point
Copy the full SHA b20c523View commit details
Commits on Apr 8, 2015
-
Fix incorrect behavior GLSL compiler for ATI cards:
this case will cast to 0.0: intBitsToFloat(int(0xBECCCCCDu)); this case will cast to -0.4: uint q = 0xBECCCCCDu; intBitsToFloat(int(q)); this case will cast to 0.0 again: const uint q = 0xBECCCCCDu; intBitsToFloat(int(q));
Configuration menu - View commit details
-
Copy full SHA for 9f83393 - Browse repository at this point
Copy the full SHA 9f83393View commit details -
Fix incorrect swizzling for ftoi instruction.
For example instruction: ftoi r0.yz, r0.yyzy Will translate into: Temp[0].yz = intBitsToFloat(ivec4(Temp[0].yyzy).xy); Instead correct translate: Temp[0].yz = intBitsToFloat(ivec4(Temp[0].yyzy).yz);
Configuration menu - View commit details
-
Copy full SHA for 8160436 - Browse repository at this point
Copy the full SHA 8160436View commit details
Commits on Oct 30, 2015
-
Fix translation LT instruction:
lt r2.zw, l(0.000000, 0.000000, 0.500000, 0.500000), |v4.xxxy| was: Temp[2].zw = uintBitsToFloat(uvec2(lessThan(vec4(intBitsToFloat(0x0), intBitsToFloat(0x0), intBitsToFloat(0x3F000000), intBitsToFloat(0x3F000000)), abs(Input4.xxxy))) * 0xFFFFFFFFu); should be: Temp[2].zw = uintBitsToFloat(uvec2(lessThan(vec4(intBitsToFloat(0x0), intBitsToFloat(0x0), intBitsToFloat(0x3F000000), intBitsToFloat(0x3F000000)), abs(Input4.xxxy)).zw) * 0xFFFFFFFFu);
Configuration menu - View commit details
-
Copy full SHA for d79f744 - Browse repository at this point
Copy the full SHA d79f744View commit details
Commits on Apr 9, 2016
-
Added a little more flexibility when writing the "layout" qualifiers …
…for resources - new flag "HLSLCC_FLAG_PREFER_BINDINGS" that causes the compiler to use bindings (rather than locations) for all resources - another flag, "HLSLCC_FLAG_ASSIGN_DESCRIPTOR_SET" uses the set qualifier to distinguish between resource bindings and constant buffer bindings - this is intended to be used when compiling HLSL -> SPIR-V (via GLSL).
Configuration menu - View commit details
-
Copy full SHA for 8ada495 - Browse repository at this point
Copy the full SHA 8ada495View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4b7de53 - Browse repository at this point
Copy the full SHA 4b7de53View commit details -
Explicitly specifying matrix dimensions
- in order to support float3x4/float4x3 type matrices
Configuration menu - View commit details
-
Copy full SHA for 853f47f - Browse repository at this point
Copy the full SHA 853f47fView commit details
Commits on Apr 13, 2016
-
Configuration menu - View commit details
-
Copy full SHA for 5cbc6c8 - Browse repository at this point
Copy the full SHA 5cbc6c8View commit details
Commits on Apr 15, 2016
-
Removed a line that write "subroutine void SubroutineType();" into al…
…l shaders with higher GLSL version numbers - it's not clear to me what the intention of this line is - however, it causes a compile error when attempting to compile the result to SPIR-V (which doesn't support subroutines)
djewsbury committedApr 15, 2016 Configuration menu - View commit details
-
Copy full SHA for eb520e4 - Browse repository at this point
Copy the full SHA eb520e4View commit details
Commits on Apr 18, 2016
-
INEG instruction can now handle format conversions and swizzling prop…
…erly - new CallUnaryOp, which duplicates the behaviour of CallBinaryOp function (but for unary operations) - this allows the INEG instruction (which is translated as X = 0 - A) to deal with complex swizzling operations, as well as casting (when the register types are not integers)
djewsbury committedApr 18, 2016 Configuration menu - View commit details
-
Copy full SHA for 8420fdd - Browse repository at this point
Copy the full SHA 8420fddView commit details -
RESINFO instruction now translates to imageSize when appropriate
- previously, textureSize was always used for RESINFO, regardless of the type of the object we were querying - UAV declarations are translated into "image" types, and so size queries should use the corresponding function, "imageSize" - this only works when targetting GLSL 4.3 (which is the standard that adds imageSize) - when targetting early languages, using RESINFO with a UAV will result in uncompilable code
djewsbury committedApr 18, 2016 Configuration menu - View commit details
-
Copy full SHA for 9345ac3 - Browse repository at this point
Copy the full SHA 9345ac3View commit details -
Support for "GL_KHR_vulkan_glsl" extension
- this extension renames gl_VertexID -> gl_VertexIndex and gl_InstanceID -> gl_InstanceIndex - this is required when using the GLSL -> SPIR-V path
djewsbury committedApr 18, 2016 Configuration menu - View commit details
-
Copy full SHA for 81a07e3 - Browse repository at this point
Copy the full SHA 81a07e3View commit details -
Using "TranslateTexCoord" for all variations of "GATHER" instructions
- this is required when doing a depth compare gather on an array of 2d textures (for example) - previously, this was implemented for some variations of the GATHER instruction - this change uses the same logic for all variations
djewsbury committedApr 18, 2016 Configuration menu - View commit details
-
Copy full SHA for 5ffcb6b - Browse repository at this point
Copy the full SHA 5ffcb6bView commit details -
Improved support for output variables from vertex shaders that have o…
…verlap on the same location - now, all output locations get a temporary "vec4" - we copy from those vec4 values to the actual output values in a fixup step at the end of the shader - previously there was an attempt at this behaviour with #defines - however, this required declaring one of the output variables as a vec4 (even if really wasn't) - this solution handles more cases and results in a shader interface that better matches the original HLSL code - there may be issues with types largers than a vec4 (such as a matrix) - currently this is only supported for vertex shader outputs... but it could be made more general and used for other shader types
djewsbury committedApr 18, 2016 Configuration menu - View commit details
-
Copy full SHA for 2408f08 - Browse repository at this point
Copy the full SHA 2408f08View commit details -
Fix for RESINFO instruction when using complex swizzle patterns on th…
…e destination - previously, RESINFO instruction only supported some "mask" type swizzle pattern for the destination - this adds support for all swizzle patterns - added a new function that can calculate the order of the components referenced by a given swizzle pattern - that is, it converts the swizzle values into an array of 4 ints, where each int references either x, y, z or w
djewsbury committedApr 18, 2016 Configuration menu - View commit details
-
Copy full SHA for 3182d86 - Browse repository at this point
Copy the full SHA 3182d86View commit details -
Shader inputs are now correctly sized for the used components
- previously all shader inputs would be 4 component vectors - this could cause shader linking errors now that vertex shaders can output fewer components - this change uses the "component" layout attribute and uses the correct sized vector types
djewsbury committedApr 18, 2016 Configuration menu - View commit details
-
Copy full SHA for 017bf7f - Browse repository at this point
Copy the full SHA 017bf7fView commit details
Commits on Apr 22, 2016
-
typecast of gl_FrontFacing should match with type of destination Input
code: uvec4 Input7 Input7.x = uint(gl_FrontFacing); cause: error C7011: implicit cast from "int" to "uint" at least at NVidia GF960
Configuration menu - View commit details
-
Copy full SHA for cb719bd - Browse repository at this point
Copy the full SHA cb719bdView commit details
Commits on Apr 25, 2016
-
New callback to allow the client to construct the rules for selecting…
… binding points and descriptor set indices - Clients can use the callback function, EvaluateBindingFn, to select any binding, descriptor set, or location for HLSL resources - clients get access to the type, HLSL binding register information and name with which to make an assignment - this is important for Vulkan, were we need to assign descriptor sets to resources - depreciated the previous flags, HLSLCC_FLAG_PREFER_BINDINGS & HLSLCC_FLAG_ASSIGN_DESCRIPTOR_SET, since this is much more powerful solution
djewsbury committedApr 25, 2016 Configuration menu - View commit details
-
Copy full SHA for fc0c9e6 - Browse repository at this point
Copy the full SHA fc0c9e6View commit details
Commits on Apr 27, 2016
-
Added support for separated texture and sampler objects (as defined b…
…y GL_KHR_vulkan_glsl) - this is useful when compiling to Vulkan - when using the "Load" method in texture objects in HLSL, we need to use a dummy sampler in the generated GLSL - this appears to only be required in order to compile... the sampler may have no effect on the output - the dummy sampler is bound to s16 by default; but it can be rebound using the bind evaluation function
djewsbury committedApr 27, 2016 Configuration menu - View commit details
-
Copy full SHA for fdf1201 - Browse repository at this point
Copy the full SHA fdf1201View commit details -
UAV objects can now have binding and set information
djewsbury committedApr 27, 2016 Configuration menu - View commit details
-
Copy full SHA for 92f4e70 - Browse repository at this point
Copy the full SHA 92f4e70View commit details -
Passing ResourceBinding information through to the "evaluate binding"…
… function for buffers - this allows us to distinquish between StructuredBuffer types and ConstantBuffers - both types have a "ConstantBuffer" object - but the true type can be determined from the "eType" member of the ResourceBinding object
djewsbury committedApr 27, 2016 Configuration menu - View commit details
-
Copy full SHA for 6ced4a1 - Browse repository at this point
Copy the full SHA 6ced4a1View commit details
Commits on Apr 28, 2016
-
Fix for using textureSize() with separated textures and samplers
djewsbury committedApr 28, 2016 Configuration menu - View commit details
-
Copy full SHA for cd2c8af - Browse repository at this point
Copy the full SHA cd2c8afView commit details -
Changed the naming conventions for RWStructuredBuffers to match Struc…
…turedBuffers - this allows the RWStructedBuffer's "buffer" object to contain the true name - that name will be preserved in the SPIR-V code and allows us to get at it using reflection on the SPIR-V bytecode
djewsbury committedApr 28, 2016 Configuration menu - View commit details
-
Copy full SHA for fdf08ed - Browse repository at this point
Copy the full SHA fdf08edView commit details
Commits on May 2, 2016
-
More robust handling of swizzling for FTOI, FTOU, ITOF, UTOF and RESI…
…NFO instructions - these instructions were interpreted incorrectly for cases where the destination swizzle was not a contiguous sequence from .x - the new method handles more cases... - but this is only applied to a few instructions - it should really effect many instructions!
djewsbury committedMay 2, 2016 Configuration menu - View commit details
-
Copy full SHA for ea29040 - Browse repository at this point
Copy the full SHA ea29040View commit details -
Another fix to FTOU/UTOF swizzling
djewsbury committedMay 2, 2016 Configuration menu - View commit details
-
Copy full SHA for 816499d - Browse repository at this point
Copy the full SHA 816499dView commit details -
Fix for binding information for StructuredBuffer types
djewsbury committedMay 2, 2016 Configuration menu - View commit details
-
Copy full SHA for 94b5bd6 - Browse repository at this point
Copy the full SHA 94b5bd6View commit details
Commits on May 3, 2016
-
Better logic for selecting method for "vec1", "uvec1", etc
- selecting a #define for languages that support scalar swizzle, or falling back to old solution otherwise
djewsbury committedMay 3, 2016 Configuration menu - View commit details
-
Copy full SHA for 9a74ca3 - Browse repository at this point
Copy the full SHA 9a74ca3View commit details -
Fix for single intructions that load from multiple cbuffer variables
- Sometimes a single instruction will use values from multiple constant buffer variables. - So, for example, a constant buffer might look like this: cbuffer Buffer { float3 Vector; float Scalar; } - Now consider the following statement: variable = float4(Vector, Scalar); - this can become a single instruction, because both Vector and Scalar are packed into the same 4d vector in the cbuffer - new code for loading from a cbuffer that handles these cases - also some improvements to the swizzling code to handle more cases
djewsbury committedMay 3, 2016 Configuration menu - View commit details
-
Copy full SHA for 8a8bf5c - Browse repository at this point
Copy the full SHA 8a8bf5cView commit details -
Support for shadow samplers when using separated samplers and textures
djewsbury committedMay 3, 2016 Configuration menu - View commit details
-
Copy full SHA for 8444828 - Browse repository at this point
Copy the full SHA 8444828View commit details -
Fixes for geometry shader input variables
djewsbury committedMay 3, 2016 Configuration menu - View commit details
-
Copy full SHA for 3f8370c - Browse repository at this point
Copy the full SHA 3f8370cView commit details
Commits on May 17, 2016
-
Minor change to the cmake config to make it easier to generate separa…
…te Win32/x64 target builds
djewsbury committedMay 17, 2016 Configuration menu - View commit details
-
Copy full SHA for ca20f37 - Browse repository at this point
Copy the full SHA ca20f37View commit details -
Fix for linking error when calling WriteUniformLayout()
djewsbury committedMay 17, 2016 Configuration menu - View commit details
-
Copy full SHA for ce15153 - Browse repository at this point
Copy the full SHA ce15153View commit details
Commits on May 19, 2016
-
Using an "instance" name for all cbuffers when GL_KHR_vulkan_glsl is …
…enabled - an instance name is required using the layout(push_constant) qualifier - so we use an instance name for all cbuffers to cover this case
djewsbury committedMay 19, 2016 Configuration menu - View commit details
-
Copy full SHA for 1ec4781 - Browse repository at this point
Copy the full SHA 1ec4781View commit details
Commits on Aug 24, 2016
-
Configuration menu - View commit details
-
Copy full SHA for a8e1cea - Browse repository at this point
Copy the full SHA a8e1ceaView commit details -
Merge branch 'master' of https://github.com/James-Jones/HLSLCrossComp…
…iler Conflicts: src/toGLSLDeclaration.c
Configuration menu - View commit details
-
Copy full SHA for a4e0c8e - Browse repository at this point
Copy the full SHA a4e0c8eView commit details -
Domain shader input arrays now sized using gl_MaxPatchVertices (like …
…Hull shader) Fixes the following error seen on an NVIDIA driver. Number components of parameters for domain shader should match with number components of input parameters of fragment shader
Configuration menu - View commit details
-
Copy full SHA for bd1096e - Browse repository at this point
Copy the full SHA bd1096eView commit details
Commits on Aug 25, 2016
-
OPERAND_TYPE_INPUT_FORK_INSTANCE_ID should be presented as SVT_INT da…
…ta type HS_CTRL_POINT_PHASE require post shader code phase (because it contain writing to gl_out) SetDataTypes current working wrong, because for case: 8: mov r0.x, vForkInstanceID.x 9: mov o[r0.x + 0].x, l(5.000000) will generated incorrect code: //MOV Temp_int[0].x = ivec4(floatBitsToInt(forkInstanceID)).x; // writing to Temp_int //MOV Output0[int(Temp[0].x)].x = vec4(immediateConstBufferF(int(Temp_int[0].x)).x).x; // but reading from Temp due psOperand->psSubOperand[0]->aeDataType == SVT_FLOAT of destination operand o[r0.x + 0].x
Configuration menu - View commit details
-
Copy full SHA for a601b5d - Browse repository at this point
Copy the full SHA a601b5dView commit details
Commits on Aug 26, 2016
-
Configuration menu - View commit details
-
Copy full SHA for 73e624d - Browse repository at this point
Copy the full SHA 73e624dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6c9c801 - Browse repository at this point
Copy the full SHA 6c9c801View commit details -
Configuration menu - View commit details
-
Copy full SHA for e64ed95 - Browse repository at this point
Copy the full SHA e64ed95View commit details
Commits on Sep 29, 2016
-
Configuration menu - View commit details
-
Copy full SHA for 5522379 - Browse repository at this point
Copy the full SHA 5522379View commit details
Commits on Dec 6, 2016
-
fix swizling case for vec1 inputs:
vec1 Input6; //.... Temp[123] = Input6.xxx + Input3.xyz; should be represented as: vec1 Input6; //.... Temp[123] = vec3(Input6.x) + Input3.xyz;
mrshoor committedDec 6, 2016 Configuration menu - View commit details
-
Copy full SHA for 0751d57 - Browse repository at this point
Copy the full SHA 0751d57View commit details -
fix link error due optimization
mrshoor committedDec 6, 2016 Configuration menu - View commit details
-
Copy full SHA for 509c9b8 - Browse repository at this point
Copy the full SHA 509c9b8View commit details
Commits on Jan 22, 2017
-
fix compilation error in Visual Studio
Joao Paulo Magalhaes committedJan 22, 2017 Configuration menu - View commit details
-
Copy full SHA for bf33242 - Browse repository at this point
Copy the full SHA bf33242View commit details
Commits on May 31, 2018
-
Merge commit 'bf332426c471bbf1809738cee25c2832ae3faca9'
mrshoor committedMay 31, 2018 Configuration menu - View commit details
-
Copy full SHA for 0e7c7bf - Browse repository at this point
Copy the full SHA 0e7c7bfView commit details -
fix: scalar type cannot be swizzled in GLSL
fix: impossible assign vec1 to float
Configuration menu - View commit details
-
Copy full SHA for c23bf2d - Browse repository at this point
Copy the full SHA c23bf2dView commit details
Commits on Jun 2, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 78c8d63 - Browse repository at this point
Copy the full SHA 78c8d63View commit details
Commits on Jun 4, 2018
-
Configuration menu - View commit details
-
Copy full SHA for d70f910 - Browse repository at this point
Copy the full SHA d70f910View commit details
Commits on Jul 27, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 22a61ce - Browse repository at this point
Copy the full SHA 22a61ceView commit details
Commits on Aug 30, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 2f57479 - Browse repository at this point
Copy the full SHA 2f57479View commit details
Commits on Sep 16, 2018
-
* structs can't be used as input semantics
upd. for vertex shaders only
Configuration menu - View commit details
-
Copy full SHA for 0276f42 - Browse repository at this point
Copy the full SHA 0276f42View commit details