Lines Matching refs:command
104 u32* Shader::MakeFullCommand( u32* command ) const in MakeFullCommand()
107 command = MakePrepareCommand( command ); in MakeFullCommand()
112 command = MakeGeoProgramCommand( command ); in MakeFullCommand()
113 command = MakeGeoSwizzleCommand( command ); in MakeFullCommand()
114 command = MakeGeoConstRgCommand( command ); in MakeFullCommand()
115 command = MakeGeoBoolMapCommand( command ); in MakeFullCommand()
119 command = MakeVtxProgramCommand( command ); in MakeFullCommand()
120 command = MakeVtxSwizzleCommand( command ); in MakeFullCommand()
121 command = MakeVtxConstRgCommand( command ); in MakeFullCommand()
122 command = MakeVtxBoolMapCommand( command ); in MakeFullCommand()
126 command = MakeOutAttrCommand( command ); in MakeFullCommand()
129 return command; in MakeFullCommand()
134 u32* Shader::MakePrepareCommand( u32* command ) const in MakePrepareCommand()
140 *command++ = PICA_DATA_DRAW_GEOMETRY_PRIMITIVE << 8; in MakePrepareCommand()
144 *command++ = m_DrawMode << 8; in MakePrepareCommand()
146 *command++ = PICA_CMD_HEADER_SINGLE_BE( PICA_REG_VS_OUT_REG_NUM3, 2 ); in MakePrepareCommand()
150 … command = MakeDummyCommand_( command, PICA_REG_VS_OUT_REG_NUM2, DUMMY_DATA_NUM_251 ); in MakePrepareCommand()
154 … command = MakeDummyCommand_( command, PICA_REG_VERTEX_ATTR_ARRAYS_BASE_ADDR, DUMMY_DATA_NUM_200 ); in MakePrepareCommand()
158 *command++ = IsEnableGeoShader() ? 2 : 0; in MakePrepareCommand()
159 *command++ = PICA_CMD_HEADER_SINGLE_BE( PICA_REG_DRAW_MODE0, 1 ); in MakePrepareCommand()
163 … command = MakeDummyCommand_( command, PICA_REG_VERTEX_ATTR_ARRAYS_BASE_ADDR, DUMMY_DATA_NUM_200 ); in MakePrepareCommand()
167 *command++ = IsEnableGeoShader() ? 1 : 0; in MakePrepareCommand()
168 *command++ = PICA_CMD_HEADER_SINGLE_BE( PICA_REG_VS_COM_MODE, 1 ); in MakePrepareCommand()
171 return command; in MakePrepareCommand()
176 u32* Shader::MakeVtxProgramCommand( u32* command ) const in MakeVtxProgramCommand()
184 *command++ = 0; in MakeVtxProgramCommand()
185 *command++ = PICA_CMD_HEADER_SINGLE( reg_addr ); in MakeVtxProgramCommand()
201 command = MakeLoadCommand_( command, reg_load, in MakeVtxProgramCommand()
207 *command++ = 1; in MakeVtxProgramCommand()
208 *command++ = PICA_CMD_HEADER_SINGLE( reg_end ); in MakeVtxProgramCommand()
211 return command; in MakeVtxProgramCommand()
216 u32* Shader::MakeGeoProgramCommand( u32* command ) const in MakeGeoProgramCommand()
224 *command++ = 0; in MakeGeoProgramCommand()
225 *command++ = PICA_CMD_HEADER_SINGLE( reg_addr ); in MakeGeoProgramCommand()
235 command = MakeLoadCommand_( command, reg_load, in MakeGeoProgramCommand()
241 *command++ = 1; in MakeGeoProgramCommand()
242 *command++ = PICA_CMD_HEADER_SINGLE( reg_end ); in MakeGeoProgramCommand()
245 return command; in MakeGeoProgramCommand()
250 u32* Shader::MakeConstRgCommand_( u32* command, in MakeConstRgCommand_() argument
290 … *command++ = value[ 0 ] | value[ 1 ] << 8 | value[ 2 ] << 16 | value[ 3 ] << 24; in MakeConstRgCommand_()
291 *command++ = PICA_CMD_HEADER_SINGLE( reg_integer + info.index ); in MakeConstRgCommand_()
295 *command++ = info.index; in MakeConstRgCommand_()
296 *command++ = PICA_CMD_HEADER_BURSTSEQ( reg_float, 4 ); in MakeConstRgCommand_()
297 … *command++ = ( value[ 3 ] << 8 & 0xffffff00 ) | ( value[ 2 ] >> 16 & 0x000000ff ); in MakeConstRgCommand_()
298 … *command++ = ( value[ 2 ] << 16 & 0xffff0000 ) | ( value[ 1 ] >> 8 & 0x0000ffff ); in MakeConstRgCommand_()
299 … *command++ = ( value[ 1 ] << 24 & 0xff000000 ) | ( value[ 0 ] >> 0 & 0x00ffffff ); in MakeConstRgCommand_()
300 *command++ = PADDING_DATA; // padding in MakeConstRgCommand_()
305 return command; in MakeConstRgCommand_()
310 u32* Shader::MakeOutAttrCommand_( u32* command ) in MakeOutAttrCommand_() argument
503 *command++ = 0x00000000; in MakeOutAttrCommand_()
504 … *command++ = PICA_CMD_HEADER_SINGLE_BE( PICA_REG_DRAW_MODE0, 0xa ); // 0x229 in MakeOutAttrCommand_()
507 *command++ = 0x00000000; in MakeOutAttrCommand_()
508 … *command++ = PICA_CMD_HEADER_SINGLE_BE( PICA_REG_DRAW_MODE1, 0x3 ); // 0x253 in MakeOutAttrCommand_()
511 *command++ = 0x08000000 | (gsDataMode == 0 ? 0x0000 : 0x0100) | vtxOutNum - 1; in MakeOutAttrCommand_()
512 … *command++ = PICA_CMD_HEADER_SINGLE_BE( PICA_REG_GS_ATTR_NUM, 0xb ); // 0x289 in MakeOutAttrCommand_()
515 *command++ = 0x7fff0000 | m_ExeImageInfo[ m_GeoShaderIndex ]->mainAddress; in MakeOutAttrCommand_()
516 … *command++ = PICA_CMD_HEADER_SINGLE( PICA_REG_GS_START_ADDR ); // 0x28a in MakeOutAttrCommand_()
519 *command++ = outMask; in MakeOutAttrCommand_()
520 … *command++ = PICA_CMD_HEADER_SINGLE( PICA_REG_GS_OUT_REG_MASK ); // 0x28d in MakeOutAttrCommand_()
523 *command++ = 0x7fff0000 | m_ExeImageInfo[ m_VtxShaderIndex ]->mainAddress; in MakeOutAttrCommand_()
524 … *command++ = PICA_CMD_HEADER_SINGLE( PICA_REG_VS_START_ADDR ); // 0x2ba in MakeOutAttrCommand_()
527 *command++ = vtxOutMask; in MakeOutAttrCommand_()
528 … *command++ = PICA_CMD_HEADER_SINGLE( PICA_REG_VS_OUT_REG_MASK ); // 0x2bd in MakeOutAttrCommand_()
531 *command++ = vtxOutNum - 1; in MakeOutAttrCommand_()
532 … *command++ = PICA_CMD_HEADER_SINGLE( PICA_REG_VS_OUT_REG_NUM2 ); // 0x251 in MakeOutAttrCommand_()
535 *command++ = 0x76543210; in MakeOutAttrCommand_()
536 … *command++ = PICA_CMD_HEADER_SINGLE( PICA_REG_GS_ATTR_IN_REG_MAP0 ); // 0x28b in MakeOutAttrCommand_()
537 *command++ = 0xfedcba98; in MakeOutAttrCommand_()
538 … *command++ = PICA_CMD_HEADER_SINGLE( PICA_REG_GS_ATTR_IN_REG_MAP1 ); // 0x28c in MakeOutAttrCommand_()
547 *command++ = gsDataMode; in MakeOutAttrCommand_()
548 … *command++ = PICA_CMD_HEADER_SINGLE( PICA_REG_GS_MISC_REG0 ); // 0x252 in MakeOutAttrCommand_()
550 *command++ = vtxOutNum - 1; in MakeOutAttrCommand_()
551 … *command++ = PICA_CMD_HEADER_SINGLE( PICA_REG_VS_OUT_REG_NUM1 ); // 0x24a in MakeOutAttrCommand_()
555 *command++ = 0x00000100; in MakeOutAttrCommand_()
556 … *command++ = PICA_CMD_HEADER_SINGLE_BE( PICA_REG_DRAW_MODE0, 0xa ); // 0x229 in MakeOutAttrCommand_()
558 *command++ = 0x00000100; in MakeOutAttrCommand_()
559 … *command++ = PICA_CMD_HEADER_SINGLE_BE( PICA_REG_DRAW_MODE1, 0x3 ); // 0x253 in MakeOutAttrCommand_()
562 *command++ = 0x7fff0000 | m_ExeImageInfo[ m_VtxShaderIndex ]->mainAddress; in MakeOutAttrCommand_()
563 … *command++ = PICA_CMD_HEADER_SINGLE( PICA_REG_VS_START_ADDR ); // 0x2ba in MakeOutAttrCommand_()
566 *command++ = outMask; in MakeOutAttrCommand_()
567 … *command++ = PICA_CMD_HEADER_SINGLE( PICA_REG_VS_OUT_REG_MASK ); // 0x2bd in MakeOutAttrCommand_()
569 *command++ = outNum - 1; in MakeOutAttrCommand_()
570 … *command++ = PICA_CMD_HEADER_SINGLE( PICA_REG_VS_OUT_REG_NUM2 ); // 0x251 in MakeOutAttrCommand_()
572 *command++ = 0; in MakeOutAttrCommand_()
573 … *command++ = PICA_CMD_HEADER_SINGLE( PICA_REG_GS_MISC_REG0 ); // 0x252 in MakeOutAttrCommand_()
575 *command++ = outNum - 1; in MakeOutAttrCommand_()
576 … *command++ = PICA_CMD_HEADER_SINGLE( PICA_REG_VS_OUT_REG_NUM1 ); // 0x24a in MakeOutAttrCommand_()
580 *command++ = outNum - 1; in MakeOutAttrCommand_()
581 … *command++ = PICA_CMD_HEADER_SINGLE_BE( PICA_REG_VS_OUT_REG_NUM3, 1 ); // 0x25e in MakeOutAttrCommand_()
583 *command++ = outNum; in MakeOutAttrCommand_()
584 … *command++ = PICA_CMD_HEADER_SINGLE( PICA_REG_VS_OUT_REG_NUM0 ); // 0x04f in MakeOutAttrCommand_()
592 *command++ = attr[ index ]; in MakeOutAttrCommand_()
593 *command++ = PICA_CMD_HEADER_SINGLE( PICA_REG_VS_OUT_ATTR0 + outNum ); in MakeOutAttrCommand_()
599 *command++ = attr[ index ]; in MakeOutAttrCommand_()
600 *command++ = PICA_CMD_HEADER_SINGLE( PICA_REG_VS_OUT_ATTR0 + index ); in MakeOutAttrCommand_()
605 *command++ = useTex; in MakeOutAttrCommand_()
606 *command++ = PICA_CMD_HEADER_SINGLE( PICA_REG_VS_OUT_ATTR_MODE ); // 0x064 in MakeOutAttrCommand_()
609 *command++ = clock; in MakeOutAttrCommand_()
610 *command++ = PICA_CMD_HEADER_SINGLE( PICA_REG_VS_OUT_ATTR_CLK ); // 0x06f in MakeOutAttrCommand_()
614 *command++ = 0; in MakeOutAttrCommand_()
615 *command++ = PICA_CMD_HEADER_SINGLE_BE( PICA_REG_VS_OUT_REG_NUM3, 8 ); // 0x25e in MakeOutAttrCommand_()
618 return command; in MakeOutAttrCommand_()
623 u32* Shader::MakeLoadCommand_( u32* command, in MakeLoadCommand_() argument
636 *command++ = *src_buffer_ptr++; in MakeLoadCommand_()
637 *command++ = PICA_CMD_HEADER_BURST( load_reg, rest ); in MakeLoadCommand_()
638 std::memcpy( command, src_buffer_ptr, ( rest - 1 ) * sizeof( u32 ) ); in MakeLoadCommand_()
639 command += rest - 1; in MakeLoadCommand_()
641 if ( ( rest & 1 ) == 0 ) *command++ = PADDING_DATA; // padding in MakeLoadCommand_()
646 *command++ = *src_buffer_ptr++; in MakeLoadCommand_()
647 *command++ = PICA_CMD_HEADER_BURST( load_reg, WRITE_MAX ); in MakeLoadCommand_()
648 std::memcpy( command, src_buffer_ptr, ( WRITE_MAX - 1 ) * sizeof( u32 ) ); in MakeLoadCommand_()
650 command += WRITE_MAX - 1; in MakeLoadCommand_()
654 if ( ( WRITE_MAX & 1 ) == 0 ) *command++ = PADDING_DATA; // padding in MakeLoadCommand_()
658 return command; in MakeLoadCommand_()
663 u32* Shader::MakeDummyCommand_( u32* command, in MakeDummyCommand_() argument
667 *command++ = 0; in MakeDummyCommand_()
668 *command++ = PICA_CMD_HEADER_BURST_BE( load_reg, dataNum, 0 ); in MakeDummyCommand_()
672 *command++ = PADDING_DATA; in MakeDummyCommand_()
675 return command; in MakeDummyCommand_()