Hexagon12

Untitled

Feb 21st, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.38 KB | None | 0 0
  1. [ 11.795607] Render.OpenGL <Error> video_core\renderer_opengl\gl_shader_util.cpp:LoadShader:44: Error compiling vertex shader:
  2. 0(112) : error C0000: syntax error, unexpected ';', expecting "::" at token ";"
  3. 0(126) : error C0000: syntax error, unexpected ';', expecting "::" at token ";"
  4. 0(145) : error C0000: syntax error, unexpected ';', expecting "::" at token ";"
  5. 0(150) : error C0000: syntax error, unexpected ';', expecting "::" at token ";"
  6. 0(155) : error C0000: syntax error, unexpected ';', expecting "::" at token ";"
  7. 0(160) : error C0000: syntax error, unexpected ';', expecting "::" at token ";"
  8. 0(165) : error C0000: syntax error, unexpected ';', expecting "::" at token ";"
  9. 0(170) : error C0000: syntax error, unexpected ';', expecting "::" at token ";"
  10. [ 11.796150] Render.OpenGL <Error> video_core/renderer_opengl/gl_shader_util.h:LoadProgram:79: Error linking shader:
  11. Vertex info
  12. -----------
  13. 0(112) : error C0000: syntax error, unexpected ';', expecting "::" at token ";"
  14. 0(126) : error C0000: syntax error, unexpected ';', expecting "::" at token ";"
  15. 0(145) : error C0000: syntax error, unexpected ';', expecting "::" at token ";"
  16. 0(150) : error C0000: syntax error, unexpected ';', expecting "::" at token ";"
  17. 0(155) : error C0000: syntax error, unexpected ';', expecting "::" at token ";"
  18. 0(160) : error C0000: syntax error, unexpected ';', expecting "::" at token ";"
  19. 0(165) : error C0000: syntax error, unexpected ';', expecting "::" at token ";"
  20. 0(170) : error C0000: syntax error, unexpected ';', expecting "::" at token ";"
  21. (0) : error C2003: incompatible options for link
  22. [ 11.796178] Render.OpenGL <Info> video_core/renderer_opengl/gl_shader_util.h:LogShaderSource:32: Shader source #version 430 core
  23. #define EMULATION_UBO_BINDING 0
  24. #define CBUF_BINDING_3 1
  25. #define CBUF_BINDING_4 2
  26. #extension GL_ARB_separate_shader_objects : enable
  27.  
  28. // Shader Unique Id: VS9250918d009dbeef
  29.  
  30. #define MAX_CONSTBUFFER_ELEMENTS 4096
  31. #define MAX_GLOBALMEMORY_ELEMENTS 16384
  32. #define ftoi floatBitsToInt
  33. #define ftou floatBitsToUint
  34. #define itof intBitsToFloat
  35. #define utof uintBitsToFloat
  36.  
  37. float fromHalf2(vec2 pair) {
  38. return utof(packHalf2x16(pair));
  39. }
  40.  
  41. vec2 toHalf2(float value) {
  42. return unpackHalf2x16(ftou(value));
  43. }
  44.  
  45. layout (location = 0) out vec4 position;
  46.  
  47. layout (std140, binding = EMULATION_UBO_BINDING) uniform vs_config {
  48. vec4 viewport_flip;
  49. uvec4 config_pack; // instance_id, flip_stage, y_direction, padding
  50. uvec4 alpha_test;
  51. };
  52.  
  53. out gl_PerVertex {
  54. vec4 gl_Position;
  55. };
  56.  
  57. float gpr_0_vertex = 0;
  58. float gpr_1_vertex = 0;
  59. float gpr_2_vertex = 0;
  60. float gpr_3_vertex = 0;
  61. float gpr_4_vertex = 0;
  62. float gpr_5_vertex = 0;
  63. float gpr_6_vertex = 0;
  64. float gpr_7_vertex = 0;
  65. float gpr_8_vertex = 0;
  66. float gpr_9_vertex = 0;
  67. float gpr_10_vertex = 0;
  68. float gpr_11_vertex = 0;
  69. float gpr_12_vertex = 0;
  70. float gpr_13_vertex = 0;
  71. float gpr_14_vertex = 0;
  72. float gpr_15_vertex = 0;
  73. float gpr_16_vertex = 0;
  74. float gpr_17_vertex = 0;
  75. float gpr_18_vertex = 0;
  76. float gpr_19_vertex = 0;
  77.  
  78. bool zero_flag_vertex = false;
  79. bool sign_flag_vertex = false;
  80. bool carry_flag_vertex = false;
  81. bool overflow_flag_vertex = false;
  82.  
  83. layout (location = 0) in vec4 input_attr_0_vertex;
  84. layout (location = 5) in vec4 input_attr_5_vertex;
  85.  
  86. layout (location = 1) out vec4 output_attr_0_vertex;
  87. layout (location = 2) out vec4 output_attr_1_vertex;
  88. layout (location = 3) out vec4 output_attr_2_vertex;
  89. layout (location = 4) out vec4 output_attr_3_vertex;
  90. layout (location = 5) out vec4 output_attr_4_vertex;
  91.  
  92. layout (std140, binding = CBUF_BINDING_3) uniform cbuf_block_3_vertex {
  93. vec4 cbuf_3_vertex[MAX_CONSTBUFFER_ELEMENTS];
  94. };
  95.  
  96. layout (std140, binding = CBUF_BINDING_4) uniform cbuf_block_4_vertex {
  97. vec4 cbuf_4_vertex[MAX_CONSTBUFFER_ELEMENTS];
  98. };
  99.  
  100. void execute_vertex() {
  101. uint jmp_to = 10u;
  102. uint flow_stack[20];
  103. uint flow_stack_top = 0u;
  104. while (true) {
  105. switch (jmp_to) {
  106. case 0xau: {
  107. // 11: MOV_C (0x4c98079004170001)
  108. gpr_1_vertex = cbuf_4_vertex[16][1];
  109. // 12: LD_A (0xefd87f800847ff0b)
  110. gpr_11_vertex = input_attr_0_vertex.y;
  111. // 13: MOV_C (0x4c98079004070000)
  112. gpr_0_vertex = cbuf_4_vertex[16][0];
  113. // 15: LD_A (0xefd87f800d07ff0d)
  114. gpr_13_vertex = input_attr_5_vertex.x;
  115. // 16: SHL_IMM (0x3848000000470101)
  116. precise float tmp1 = itof((ftoi(gpr_1_vertex) << ftou(utof(4u))));
  117. gpr_1_vertex = tmp1;
  118. // 17: LD_A (0xefd87f800807ff09)
  119. gpr_9_vertex = input_attr_0_vertex.x;
  120. // 19: MOV_C (0x4c98079004270011)
  121. gpr_17_vertex = cbuf_4_vertex[16][2];
  122. // 21: MOV_C (0x4c98079004370012)
  123. gpr_18_vertex = cbuf_4_vertex[16][3];
  124. // 23: LD_A (0xefd87f800887ff06)
  125. gpr_6_vertex = input_attr_0_vertex.z;
  126. // 24: SHL_IMM (0x3848000000470000)
  127. precise float tmp2 = itof((ftoi(gpr_0_vertex) << ftou(utof(4u))));
  128. gpr_0_vertex = tmp2;
  129. // 27: SHL_IMM (0x3848000000471111)
  130. precise float tmp3 = itof((ftoi(gpr_17_vertex) << ftou(utof(4u))));
  131. gpr_17_vertex = tmp3;
  132. // 28: LD_A (0xefd87f8000070505)
  133. gpr_5_vertex = ;
  134. // 29: SHL_IMM (0x3848000000471212)
  135. precise float tmp4 = itof((ftoi(gpr_18_vertex) << ftou(utof(4u))));
  136. gpr_18_vertex = tmp4;
  137. // 32: FMUL_C (0x4c68100c00470b0f)
  138. precise float tmp5 = (gpr_11_vertex * cbuf_3_vertex[1][0]);
  139. gpr_15_vertex = tmp5;
  140. // 35: FMUL_C (0x4c68100c00570b10)
  141. precise float tmp6 = (gpr_11_vertex * cbuf_3_vertex[1][1]);
  142. gpr_16_vertex = tmp6;
  143. // 37: FMUL_IMM (0x3868104000070d13)
  144. precise float tmp7 = (gpr_13_vertex * utof(0x40000000u));
  145. gpr_19_vertex = tmp7;
  146. // 39: LD_A (0xefd87f8000070404)
  147. gpr_4_vertex = ;
  148. // 40: FFMA_CR (0x49a0078c0007090d)
  149. precise float tmp8 = fma(gpr_9_vertex, cbuf_3_vertex[0][0], gpr_15_vertex);
  150. gpr_13_vertex = tmp8;
  151. // 43: FMUL_C (0x4c68100c00670b0f)
  152. precise float tmp9 = (gpr_11_vertex * cbuf_3_vertex[1][2]);
  153. gpr_15_vertex = tmp9;
  154. // 45: FMUL_C (0x4c68100c00770b0b)
  155. precise float tmp10 = (gpr_11_vertex * cbuf_3_vertex[1][3]);
  156. gpr_11_vertex = tmp10;
  157. // 48: FFMA_CR (0x49a0080c00170910)
  158. precise float tmp11 = fma(gpr_9_vertex, cbuf_3_vertex[0][1], gpr_16_vertex);
  159. gpr_16_vertex = tmp11;
  160. // 49: LD_A (0xefd87f800d87ff0a)
  161. gpr_10_vertex = input_attr_5_vertex.z;
  162. // 51: FFMA_CR (0x49a0078c0027090f)
  163. precise float tmp12 = fma(gpr_9_vertex, cbuf_3_vertex[0][2], gpr_15_vertex);
  164. gpr_15_vertex = tmp12;
  165. // 52: LD_A (0xefd87f8000070808)
  166. gpr_8_vertex = ;
  167. // 53: FFMA_CR (0x49a0058c00370909)
  168. precise float tmp13 = fma(gpr_9_vertex, cbuf_3_vertex[0][3], gpr_11_vertex);
  169. gpr_9_vertex = tmp13;
  170. // 55: LD_A (0xefd87f8000070202)
  171. gpr_2_vertex = ;
  172. // 56: FFMA_CR (0x49a0068c0087060d)
  173. precise float tmp14 = fma(gpr_6_vertex, cbuf_3_vertex[2][0], gpr_13_vertex);
  174. gpr_13_vertex = tmp14;
  175. // 57: LD_A (0xefd87f8000071401)
  176. gpr_1_vertex = ;
  177. // 59: FFMA_CR (0x49a0080c00970610)
  178. precise float tmp15 = fma(gpr_6_vertex, cbuf_3_vertex[2][1], gpr_16_vertex);
  179. gpr_16_vertex = tmp15;
  180. // 60: LD_A (0xefd87f8000070707)
  181. gpr_7_vertex = ;
  182. // 61: FFMA_CR (0x49a0078c00a7060f)
  183. precise float tmp16 = fma(gpr_6_vertex, cbuf_3_vertex[2][2], gpr_15_vertex);
  184. gpr_15_vertex = tmp16;
  185. // 63: LD_A (0xefd87f8000070000)
  186. gpr_0_vertex = ;
  187. // 64: FFMA_CR (0x49a0048c00b70606)
  188. precise float tmp17 = fma(gpr_6_vertex, cbuf_3_vertex[2][3], gpr_9_vertex);
  189. gpr_6_vertex = tmp17;
  190. // 65: LD_A (0xefd87f8000070303)
  191. gpr_3_vertex = ;
  192. // 67: FMUL_C (0x4c68101001470509)
  193. precise float tmp18 = (gpr_5_vertex * cbuf_4_vertex[5][0]);
  194. gpr_9_vertex = tmp18;
  195. // 68: LD_A (0xefd87f800d47ff0c)
  196. gpr_12_vertex = input_attr_5_vertex.y;
  197. // 69: FMUL_C (0x4c68101001570505)
  198. precise float tmp19 = (gpr_5_vertex * cbuf_4_vertex[5][1]);
  199. gpr_5_vertex = tmp19;
  200. // 71: LD_A (0xefd87f800dc7ff0e)
  201. gpr_14_vertex = input_attr_5_vertex.w;
  202. // 72: FMUL_IMM (0x3868104000070a11)
  203. precise float tmp20 = (gpr_10_vertex * utof(0x40000000u));
  204. gpr_17_vertex = tmp20;
  205. // 73: ST_A (0xeff07f800c07ff13)
  206. output_attr_4_vertex.x = gpr_19_vertex;
  207. // 75: FFMA_CR (0x49a0049001070409)
  208. precise float tmp21 = fma(gpr_4_vertex, cbuf_4_vertex[4][0], gpr_9_vertex);
  209. gpr_9_vertex = tmp21;
  210. // 76: ST_A (0xeff07f800c87ff11)
  211. output_attr_4_vertex.z = gpr_17_vertex;
  212. // 77: FFMA_CR (0x49a0029001170404)
  213. precise float tmp22 = fma(gpr_4_vertex, cbuf_4_vertex[4][1], gpr_5_vertex);
  214. gpr_4_vertex = tmp22;
  215. // 79: FMUL_C (0x4c6810100047080a)
  216. precise float tmp23 = (gpr_8_vertex * cbuf_4_vertex[1][0]);
  217. gpr_10_vertex = tmp23;
  218. // 80: FMUL_C (0x4c6810100247020b)
  219. precise float tmp24 = (gpr_2_vertex * cbuf_4_vertex[9][0]);
  220. gpr_11_vertex = tmp24;
  221. // 81: FMUL_C (0x4c68101003470105)
  222. precise float tmp25 = (gpr_1_vertex * cbuf_4_vertex[13][0]);
  223. gpr_5_vertex = tmp25;
  224. // 83: FMUL_C (0x4c68101000570808)
  225. precise float tmp26 = (gpr_8_vertex * cbuf_4_vertex[1][1]);
  226. gpr_8_vertex = tmp26;
  227. // 84: FMUL_C (0x4c68101002570202)
  228. precise float tmp27 = (gpr_2_vertex * cbuf_4_vertex[9][1]);
  229. gpr_2_vertex = tmp27;
  230. // 85: FMUL_C (0x4c68101003570101)
  231. precise float tmp28 = (gpr_1_vertex * cbuf_4_vertex[13][1]);
  232. gpr_1_vertex = tmp28;
  233. // 87: FFMA_CR (0x49a005100007070a)
  234. precise float tmp29 = fma(gpr_7_vertex, cbuf_4_vertex[0][0], gpr_10_vertex);
  235. gpr_10_vertex = tmp29;
  236. // 88: ST_A (0xeff07f800cc7ff0e)
  237. output_attr_4_vertex.w = gpr_14_vertex;
  238. // 89: FFMA_CR (0x49a005900207000b)
  239. precise float tmp30 = fma(gpr_0_vertex, cbuf_4_vertex[8][0], gpr_11_vertex);
  240. gpr_11_vertex = tmp30;
  241. // 91: FFMA_CR (0x49a0041000170707)
  242. precise float tmp31 = fma(gpr_7_vertex, cbuf_4_vertex[0][1], gpr_8_vertex);
  243. gpr_7_vertex = tmp31;
  244. // 92: FFMA_CR (0x49a0011002170000)
  245. precise float tmp32 = fma(gpr_0_vertex, cbuf_4_vertex[8][1], gpr_2_vertex);
  246. gpr_0_vertex = tmp32;
  247. // 93: FFMA_CR (0x49a0029003070305)
  248. precise float tmp33 = fma(gpr_3_vertex, cbuf_4_vertex[12][0], gpr_5_vertex);
  249. gpr_5_vertex = tmp33;
  250. // 95: FFMA_CR (0x49a0009003170301)
  251. precise float tmp34 = fma(gpr_3_vertex, cbuf_4_vertex[12][1], gpr_1_vertex);
  252. gpr_1_vertex = tmp34;
  253. // 96: FADD_C (0x4c58101000c70a0a)
  254. precise float tmp35 = (gpr_10_vertex + cbuf_4_vertex[3][0]);
  255. gpr_10_vertex = tmp35;
  256. // 97: FADD_C (0x4c58101001c70909)
  257. precise float tmp36 = (gpr_9_vertex + cbuf_4_vertex[7][0]);
  258. gpr_9_vertex = tmp36;
  259. // 99: FADD_C (0x4c58101000d70707)
  260. precise float tmp37 = (gpr_7_vertex + cbuf_4_vertex[3][1]);
  261. gpr_7_vertex = tmp37;
  262. // 100: FADD_C (0x4c58101001d70404)
  263. precise float tmp38 = (gpr_4_vertex + cbuf_4_vertex[7][1]);
  264. gpr_4_vertex = tmp38;
  265. // 101: FADD_C (0x4c58101002c70b0b)
  266. precise float tmp39 = (gpr_11_vertex + cbuf_4_vertex[11][0]);
  267. gpr_11_vertex = tmp39;
  268. // 103: FADD_C (0x4c58101002d70000)
  269. precise float tmp40 = (gpr_0_vertex + cbuf_4_vertex[11][1]);
  270. gpr_0_vertex = tmp40;
  271. // 104: FADD_C (0x4c58101003c70505)
  272. precise float tmp41 = (gpr_5_vertex + cbuf_4_vertex[15][0]);
  273. gpr_5_vertex = tmp41;
  274. // 105: FADD_C (0x4c58101003d70101)
  275. precise float tmp42 = (gpr_1_vertex + cbuf_4_vertex[15][1]);
  276. gpr_1_vertex = tmp42;
  277. // 107: FMUL_IMM (0x3868104000070c0c)
  278. precise float tmp43 = (gpr_12_vertex * utof(0x40000000u));
  279. gpr_12_vertex = tmp43;
  280. // 108: FADD_C (0x4c58100c00c70d0d)
  281. precise float tmp44 = (gpr_13_vertex + cbuf_3_vertex[3][0]);
  282. gpr_13_vertex = tmp44;
  283. // 109: ST_A (0xeff07f800c47ff0c)
  284. output_attr_4_vertex.y = gpr_12_vertex;
  285. // 111: FADD_C (0x4c58100c00d71010)
  286. precise float tmp45 = (gpr_16_vertex + cbuf_3_vertex[3][1]);
  287. gpr_16_vertex = tmp45;
  288. // 112: ST_A (0xeff07f800707ff0d)
  289. position.x = gpr_13_vertex;
  290. // 113: FADD_C (0x4c58100c00e70f0f)
  291. precise float tmp46 = (gpr_15_vertex + cbuf_3_vertex[3][2]);
  292. gpr_15_vertex = tmp46;
  293. // 115: ST_A (0xeff07f800747ff10)
  294. position.y = gpr_16_vertex;
  295. // 116: FADD_C (0x4c58100c00f70606)
  296. precise float tmp47 = (gpr_6_vertex + cbuf_3_vertex[3][3]);
  297. gpr_6_vertex = tmp47;
  298. // 117: ST_A (0xeff07f800787ff0f)
  299. position.z = gpr_15_vertex;
  300. // 119: FADD_R (0x5c58100000a7ff0a)
  301. precise float tmp48 = (0 + gpr_10_vertex);
  302. gpr_10_vertex = tmp48;
  303. // 120: ST_A (0xeff07f8007c7ff06)
  304. position.w = gpr_6_vertex;
  305. // 121: FADD_R (0x5c5810000077ff07)
  306. precise float tmp49 = (0 + gpr_7_vertex);
  307. gpr_7_vertex = tmp49;
  308. // 123: ST_A (0xeff07f800807ff0a)
  309. output_attr_0_vertex.x = gpr_10_vertex;
  310. // 124: FADD_R (0x5c5810000097ff09)
  311. precise float tmp50 = (0 + gpr_9_vertex);
  312. gpr_9_vertex = tmp50;
  313. // 125: ST_A (0xeff07f800847ff07)
  314. output_attr_0_vertex.y = gpr_7_vertex;
  315. // 127: FADD_R (0x5c5810000047ff04)
  316. precise float tmp51 = (0 + gpr_4_vertex);
  317. gpr_4_vertex = tmp51;
  318. // 128: ST_A (0xeff07f800907ff09)
  319. output_attr_1_vertex.x = gpr_9_vertex;
  320. // 129: FADD_R (0x5c58100000b7ff0b)
  321. precise float tmp52 = (0 + gpr_11_vertex);
  322. gpr_11_vertex = tmp52;
  323. // 131: ST_A (0xeff07f800947ff04)
  324. output_attr_1_vertex.y = gpr_4_vertex;
  325. // 132: FADD_R (0x5c5810000007ff00)
  326. precise float tmp53 = (0 + gpr_0_vertex);
  327. gpr_0_vertex = tmp53;
  328. // 133: ST_A (0xeff07f800a07ff0b)
  329. output_attr_2_vertex.x = gpr_11_vertex;
  330. // 135: FADD_R (0x5c5810000057ff05)
  331. precise float tmp54 = (0 + gpr_5_vertex);
  332. gpr_5_vertex = tmp54;
  333. // 136: ST_A (0xeff07f800a47ff00)
  334. output_attr_2_vertex.y = gpr_0_vertex;
  335. // 137: FADD_R (0x5c5810000017ff01)
  336. precise float tmp55 = (0 + gpr_1_vertex);
  337. gpr_1_vertex = tmp55;
  338. // 139: ST_A (0xeff07f800b07ff05)
  339. output_attr_3_vertex.x = gpr_5_vertex;
  340. // 140: ST_A (0xeff07f800b47ff01)
  341. output_attr_3_vertex.y = gpr_1_vertex;
  342. // 141: EXIT (0xe30000000007000f)
  343. return;
  344. }
  345. default: return;
  346. }
  347. }
  348. }
  349.  
  350. void main() {
  351. position = vec4(0.0, 0.0, 0.0, 0.0);
  352. execute_vertex();
  353.  
  354. // Check if the flip stage is VertexB
  355. // Config pack's second value is flip_stage
  356. if (config_pack[1] == 1) {
  357. // Viewport can be flipped, which is unsupported by glViewport
  358. position.xy *= viewport_flip.xy;
  359. }
  360. gl_Position = position;
  361.  
  362. // TODO(bunnei): This is likely a hack, position.w should be interpolated as 1.0
  363. // For now, this is here to bring order in lieu of proper emulation
  364. if (config_pack[1] == 1) {
  365. position.w = 1.0;
  366. }
  367. }
Advertisement
Add Comment
Please, Sign In to add comment