04:29 Horizon_Brave: greetings everyone
12:06 dboyan_: imirkin: I happened to see on trello board about AMD_vs_{layer, viewport_index}. You mentioned "it worked for only one of those, and not the other". Is it that layer works but viewport not?
13:57 imirkin: dboyan_: yeah, layer works, viewport doesn't. Lyude looked into it but also couldn't work out what was wrong.
14:00 dboyan: imirkin: I found one thing missing in your patch, see https://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp#n2156
14:01 dboyan: imirkin: and https://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp#n3567
14:01 imirkin: oooooh
14:01 imirkin: well
14:02 imirkin: that's not a problem in and of itself, as long as the export happens at the end
14:02 imirkin: aha, but the export does NOT happen at the end
14:02 dboyan: OPCODE_EMIT is only in GS?
14:03 imirkin: yea
14:03 imirkin: that's probably the problem
14:03 dboyan: so it viewport index not emitted at all
14:03 dboyan: s/it//
14:03 imirkin: not sure how i missed that
14:06 dboyan: viewport index is not emitted in Converter::storeDst, and the only place to export viewport index is when there is a TGSI_OPCODE_EMIT, which only happens in GS
14:06 dboyan: so vs and tes won't set viewport index
14:08 dboyan: I guess it's an optimization of some sort, which layer doesn't have. So layer works all right
14:12 dboyan: Actually I've checked the code generated by forcing the extension on, and I didn't see vp setting a[0x68]
14:20 imirkin: that thing where it stores the viewport off should only happen for geometry shaders
14:21 imirkin: instead of != frag
14:22 imirkin: it's not an opt
14:22 imirkin: it's a workaround for broken programs that work with broken drivers =/
14:23 dboyan: I think so
14:23 dboyan: well
15:32 imirkin: dboyan: are you going to give fixing it a go?
15:32 dboyan: probably not, I have nowhere to test it
15:32 imirkin: ah ok
15:33 imirkin: Lyude: want to give it another shot? sounds like just the small change in nv50_ir_from_tgsi.cpp is needed. not sure how i missed that =/ would have been obvious in the generated code... odd.
23:23 Lyude: imirkin: sure thing
23:23 Lyude: Was something different in the shader asm?
23:37 imirkin: well, from the sounds of it (at least reading the code), we were entirely omitting the viewport emit
23:40 Lyude: ah, lol