struct svga_compile_key key;
struct tgsi_shader_info info;
unsigned unit;
+ unsigned version; /**< Either 40 or 41 at this time */
unsigned inst_start_token;
boolean discard_instruction; /**< throw away current instruction? */
VGPU10ProgramToken ptoken;
/* First token: VGPU10ProgramToken (version info, program type (VS,GS,PS)) */
- ptoken.majorVersion = 4;
- ptoken.minorVersion = 0;
+ ptoken.majorVersion = emit->version / 10;
+ ptoken.minorVersion = emit->version % 10;
ptoken.programType = translate_shader_type(emit->unit);
if (!emit_dword(emit, ptoken.value))
return FALSE;
goto done;
emit->unit = unit;
+ emit->version = svga_have_sm4_1(svga) ? 41 : 40;
+
emit->key = *key;
emit->vposition.need_prescale = (emit->key.vs.need_prescale ||