Jump to content

DepthWarpShader doesn't compile on 2019.1.7f1


ScottHerz

Recommended Posts

In trying to build a stand along demo, I'm running into a problem where DepthWarpShader fails to compile. 

 

The error looks like so:

GLSL compilation failed:0(59) : error C1031: swizzle mask element not present in operand "xyERROR"0(59) : error C1048: invalid character 'E' in swizzle "xyERROR"0(59) : error C0000: syntax error, unexpected identifier, expecting ',' or ';' at token "missing"0(60) : error C1031: swizzle mask element not present in operand "xy"0(60) : error C0000: syntax error, unexpected identifier, expecting "::" at token "GetBitcastOp"0(62) : error C1031: swizzle mask element not present in operand "xyERROR"0(62) : error C1048: invalid character 'E' in swizzle "xyERROR"0(62) : error C0000: syntax error, unexpected identifier, expecting ',' or ';' at token "missing"0(80) : error C1503: undefined variable "u_xlat9"0(80) : error C0000: syntax error, unexpected identifier, expecting "::" at token "GetBitcastOp"0(82) : error C1503: undefined variable "u_xlat9"0(82) : error C0000: syntax error, unexpected identifier, expecting ',' or ';' at token "missing"

When I look at what it's compiled down to, it does look a little strange. Specifically the inclusion of ERROR where I'd expect something like z .

 

**** Platform OpenGL Core:Compiled code for kernel CSMain:#version 420#extension GL_ARB_shading_language_420pack : require#ifdef GL_ARB_compute_shader#extension GL_ARB_compute_shader : enable#endif#ifdef GL_ARB_gpu_shader_fp64#extension GL_ARB_gpu_shader_fp64 : enable#endif#define HLSLCC_ENABLE_UNIFORM_BUFFERS 1#if HLSLCC_ENABLE_UNIFORM_BUFFERS#define UNITY_UNIFORM#else#define UNITY_UNIFORM uniform#endif#define UNITY_SUPPORTS_UNIFORM_LOCATION 1#if UNITY_SUPPORTS_UNIFORM_LOCATION#define UNITY_LOCATION(x) layout(location = x)#define UNITY_BINDING(x) layout(binding = x, std140)#else#define UNITY_LOCATION(x)#define UNITY_BINDING(x) layout(std140)#endiflayout(std140) uniform CGlobals {	vec4 DepthParam;	int ImageWidth;};uniform  sampler2D DepthInput;writeonly layout(binding=0) uniform image2D Result;vec4 u_xlat0;ivec4 u_xlati0;uint u_xlatu0;bool u_xlatb0;vec2 u_xlat1;uvec4 u_xlatu1;bool u_xlatb1;uvec4 u_xlatu2;uvec4 u_xlatu3;float u_xlat4;float u_xlat8;int u_xlati8;uint u_xlatu8;bool u_xlatb8;bool u_xlatb12;layout(local_size_x = 8, local_size_y = 8, local_size_z = 1) in;void main(){    u_xlati0.x = ImageWidth >> 1;    u_xlatu1.xy = gl_GlobalInvocationID.xy;    u_xlatu1.z = uint(0u);    u_xlatu1.w = uint(0u);    u_xlat4 = texelFetch(DepthInput, ivec2(u_xlatu1.xy), int(u_xlatu1.w)).x;    u_xlati8 = (-int(gl_GlobalInvocationID.x)) + ImageWidth;    u_xlatu8 = (-uint(u_xlati0.x)) + uint(u_xlati8);    u_xlat8 = float(u_xlatu8);    u_xlat8 = u_xlat4 * u_xlat8;    u_xlat8 = u_xlat8 / DepthParam.x;    u_xlat8 = u_xlat8 + DepthParam.y;    u_xlat8.xyERROR missing components in GetBitcastOp()(u_xlat0.zw) + uintBitsToFloat(u_xlatu2.zw);    u_xlat8.xy(-ERROR missing components in GetBitcastOp()(u_xlat8.xy)) + uintBitsToFloat(u_xlatu1.xy);    u_xlatb1 = int(u_xlatu3.x)>=0;    u_xlat8.xyERROR missing components in GetBitcastOp()(u_xlat0.zw) + vec2(dvec4(2.2252139516747411e-308, 2.2331671504539444e-308, 2.2252139516747411e-308, 2.2331671504539444e-308).xy);    u_xlatb8 = int(u_xlatu3.z)<ImageWidth;    u_xlatb8 = u_xlatb8 && u_xlatb1;    u_xlat1.xy = DepthParam.zw * vec2(100.0, 100.0);    u_xlatb12 = u_xlat1.x<u_xlat0.y;    u_xlatb8 = u_xlatb12 && u_xlatb8;    u_xlatb1 = u_xlat0.y<u_xlat1.y;    u_xlatb8 = u_xlatb8 && u_xlatb1;    if(u_xlatb8){        u_xlatu3.yw = gl_GlobalInvocationID.yy;        imageStore(Result, ivec2(u_xlatu3.xy), u_xlat0.yyyy);        imageStore(Result, ivec2(u_xlatu3.zw), u_xlat0.yyyy);    }    u_xlatu0 = (-floatBitsToUint(u_xlat0.x)) + gl_GlobalInvocationID.x;    u_xlat0.x = float(u_xlatu0);    u_xlat0.x = u_xlat0.y * u_xlat0.x;    u_xlat0.x = u_xlat0.x / DepthParam.x;    u_xlat0.x = u_xlat0.x + (-DepthParam.y);    u_xlat9.xyuintBitsToFloat(u_xlatu2.zw) + ERROR missing components in GetBitcastOp()(u_xlat9.xy);    u_xlatb0 = int(u_xlatu2.x)>=0;    u_xlat9.xyERROR missing components in GetBitcastOp()(u_xlat9.xy) + vec2(dvec4(2.2252139516747411e-308, 2.2331671504539439e-308, 2.2252139516747411e-308, 2.2331671504539439e-308).xy);    u_xlatb8 = int(u_xlatu2.z)<ImageWidth;    u_xlati0.x = u_xlatb8 ? u_xlati0.x : int(0);    u_xlati0.x = int(uint(u_xlati0.w) & uint(u_xlati0.x));    u_xlati0.x = u_xlatb1 ? u_xlati0.x : int(0);    if(u_xlati0.x != 0) {        u_xlatu2.yw = gl_GlobalInvocationID.yy;        imageStore(Result, ivec2(u_xlatu2.xy), intBitsToFloat(u_xlati0.yyyy));        imageStore(Result, ivec2(u_xlatu2.zw), intBitsToFloat(u_xlati0.yyyy));    }    return;}**** Platform Direct3D 11:Compiled code for kernel CSMain:binary blob size 1688://// Generated by Microsoft ® D3D Shader Disassembler////// Note: shader requires additional functionality://       Double-precision floating point//       Double-precision extensions for 11.1////// Input signature://// Name                 Index   Mask Register SysValue  Format   Used// -------------------- ----- ------ -------- -------- ------- ------// no Input//// Output signature://// Name                 Index   Mask Register SysValue  Format   Used// -------------------- ----- ------ -------- -------- ------- ------// no Output      cs_5_0      dcl_globalFlags refactoringAllowed | enableDoublePrecisionFloatOps | enable11_1DoubleExtensions      dcl_constantbuffer CB0[2], immediateIndexed      dcl_resource_texture2d (float,float,float,float) t0      dcl_uav_typed_texture2d (float,float,float,float) u0      dcl_input vThreadID.xy      dcl_temps 4      dcl_thread_group 8, 8, 1   0: ishr r0.x, cb0[1].x, l(1)   1: mov r1.xy, vThreadID.xyxx   2: mov r1.zw, l(0,0,0,0)   3: ld_indexable(texture2d)(float,float,float,float) r0.y, r1.xyzw, t0.yxzw   4: iadd r0.z, -vThreadID.x, cb0[1].x   5: iadd r0.z, -r0.x, r0.z   6: utof r0.z, r0.z   7: mul r0.z, r0.y, r0.z   8: div r0.z, r0.z, cb0[0].x   9: add r0.z, r0.z, cb0[0].y  10: ftod r0.zw, r0.z  11: itod r1.xy, cb0[1].x  12: ftod r1.zw, cb0[0].x  13: dmul r0.zw, r0.zwzw, r1.zwzw  14: ftod r2.xy, r0.y  15: ddiv r0.zw, r0.zwzw, r2.xyxy  16: itod r2.zw, r0.x  17: dadd r0.zw, r0.zwzw, r2.zwzw  18: dadd r0.zw, -r0.zwzw, r1.xyxy  19: dtoi r3.x, r0.zwzw  20: ige r1.x, r3.x, l(0)  21: dadd r0.zw, r0.zwzw, d(0.000000l, 0.500000l)  22: dtoi r3.z, r0.zwzw  23: ilt r0.z, r3.z, cb0[1].x  24: and r0.z, r0.z, r1.x  25: mul r1.xy, cb0[0].zwzz, l(100.000000, 100.000000, 0.000000, 0.000000)  26: lt r0.w, r1.x, r0.y  27: and r0.z, r0.w, r0.z  28: lt r1.x, r0.y, r1.y  29: and r0.z, r0.z, r1.x  30: if_nz r0.z  31:   mov r3.yw, vThreadID.yyyy  32:   store_uav_typed u0.xyzw, r3.xyyy, r0.yyyy  33:   store_uav_typed u0.xyzw, r3.zwww, r0.yyyy  34: endif   35: iadd r0.x, -r0.x, vThreadID.x  36: utof r0.x, r0.x  37: mul r0.x, r0.y, r0.x  38: div r0.x, r0.x, cb0[0].x  39: add r0.x, r0.x, -cb0[0].y  40: ftod r3.xy, r0.x  41: dmul r1.zw, r1.zwzw, r3.xyxy  42: ddiv r1.zw, r1.zwzw, r2.xyxy  43: dadd r1.zw, r2.zwzw, r1.zwzw  44: dtoi r2.x, r1.zwzw  45: ige r0.x, r2.x, l(0)  46: dadd r1.zw, r1.zwzw, d(0.000000l, 0.500000l)  47: dtoi r2.z, r1.zwzw  48: ilt r0.z, r2.z, cb0[1].x  49: and r0.x, r0.z, r0.x  50: and r0.x, r0.w, r0.x  51: and r0.x, r1.x, r0.x  52: if_nz r0.x  53:   mov r2.yw, vThreadID.yyyy  54:   store_uav_typed u0.xyzw, r2.xyyy, r0.yyyy  55:   store_uav_typed u0.xyzw, r2.zwww, r0.yyyy  56: endif   57: ret // Approximately 0 instruction slots used

   

Link to comment
Share on other sites

  • 7 months later...
  • 5 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...