OROCHI
 
Loading...
Searching...
No Matches
GxShaderPackage.h
Go to the documentation of this file.
1//===========================================================================
10//===========================================================================
11#pragma once
12
13GX_CORE_NAMESPACE_BEGIN()
16#if GX_ENABLE_TESSELLATION
17class GxRenderHullShader;
18class GxRenderDomainShader;
19#endif //GX_ENABLE_TESSELLATION
20#if GX_ENABLE_COMPUTE_SHADER
22#endif // GX_ENABLE_COMPUTE_SHADER
23
24//===========================================================================
26//===========================================================================
28{
29 //-------------------------------------------------------------
31 //-------------------------------------------------------------
33public:
34 GX_RTTI_CLASS(GxShaderPackage, GxClassBase)
35 // GxClassBase継承クラス用禁止宣言
37
38 friend class GxSysShader;
39
49
52 {
53 //-------------------------------------------------------------
55 //-------------------------------------------------------------
57
59 static GX_FORCE_INLINE b32 compare(const GxShaderCode* pShaderCode0, const GxShaderCode* pShaderCode1);
61 static GX_FORCE_INLINE b32 compareWithOptimizedData( const GxShaderCode* pShaderCode0, const GxShaderCode* pShaderCode1, u32 hash, u8* pCodeBuffer );
62
64 static GX_FORCE_INLINE void copy(GxShaderCode* pDst, const GxShaderCode* pSrc);
65
67 GX_FORCE_INLINE void update(void);
68
70 //-------------------------------------------------------------
72 //-------------------------------------------------------------
74
76 constexpr GxShaderPackage* getShaderPackage(void) const { return _header._pShaderPackage; }
77
79 GX_FORCE_INLINE u32 getProgramFunctions(GX_HANDLE handle);
81 GX_FORCE_INLINE void setProgramFunctions(GX_HANDLE handle, u32 value);
83 GX_FORCE_INLINE u32 getMaterialFunctions(GX_HANDLE handle);
85 GX_FORCE_INLINE void setMaterialFunctions(GX_HANDLE handle, u32 value);
87 GX_FORCE_INLINE void setPass(u32 pass);
88
90 GX_FORCE_INLINE void* getCodeAddress(void) const;
92 GX_FORCE_INLINE const void* getCodeAddressConst(void) const;
94 GX_FORCE_INLINE u32 getSize(void) const;
95
97 //-------------------------------------------------------------
99 //-------------------------------------------------------------
101
103
105 };
106
107protected:
122
134
136 static constexpr u32 INVALID_INDEX = 0xFFFFFFFFUL;
138 static constexpr u32 CODE_COUNT_IN_NODE = 16;
139
148
156
165
174
177 {
178 GX_CSTR _name;
179 GX_CSTR _virtualName;
180 };
181
184 {
185 size_t _nameOffset;
187 };
188
197
206
207#if GX_DEVELOP
209 enum class CONFIG_FILE_FORMAT
210 {
211 BINARY,
212 SINGLE_TEXT,
213 XML,
214 UNKNOWN,
215 NOT_FOUND,
216 };
217#endif //GX_DEVELOP
218
220 //-----------------------------------------------------------
222 //-----------------------------------------------------------
224public:
226 GxShaderPackage(void);
227
229 //-------------------------------------------------------------
231 //-------------------------------------------------------------
233
235#if GX_DEVELOP
236 b32 initialize(GX_CSTR shaderSource, const GxCallback::GxHandlerBase& includeCallbackHandler, const GxCallback::GxHandlerBase& saveResourceCallbackHandler, b32 isOriginalResource, class GxResShaderPackage* pResShaderPackage = nullptr, GX_CSTR shaderPath = nullptr);
237#endif // GX_DEVELOP
238 b32 initialize(void);
239
241 void terminate(void);
242
244 GxShaderCode* allocateShaderCode(void);
245
247 void freeShaderCode(GxShaderCode* pShaderCode);
248
250 //-----------------------------------------------------------
252 //-----------------------------------------------------------
254public:
256 GX_FORCE_INLINE void setPropertyVertexShaderCount(const void* const /*pValue*/) {}
258 GX_FORCE_INLINE void getPropertyVertexShaderCount(void* const pValue) { *static_cast<u32*>(pValue) = _header._shaderCount[static_cast<u32>(RENDER_SHADER::VERTEX)]; }
259
261 GX_FORCE_INLINE void setPropertyPixelShaderCount(const void* const /*pValue*/) {}
263 GX_FORCE_INLINE void getPropertyPixelShaderCount(void* const pValue) { *static_cast<u32*>(pValue) = _header._shaderCount[static_cast<u32>(RENDER_SHADER::PIXEL)]; }
264
265#if GX_ENABLE_TESSELLATION
267 GX_FORCE_INLINE void setPropertyHullShaderCount(const void* const /*pValue*/) {}
269 GX_FORCE_INLINE void getPropertyHullShaderCount(void* const pValue) { *static_cast<u32*>(pValue) = _header._shaderCount[static_cast<u32>(RENDER_SHADER::HULL)]; }
270
272 GX_FORCE_INLINE void setPropertyDomainShaderCount(const void* const /*pValue*/) {}
274 GX_FORCE_INLINE void getPropertyDomainShaderCount(void* const pValue) { *static_cast<u32*>(pValue) = _header._shaderCount[static_cast<u32>(RENDER_SHADER::DOMAIN_)]; }
275#endif //GX_ENABLE_TESSELLATION
276
277#if GX_ENABLE_COMPUTE_SHADER
279 GX_FORCE_INLINE void setPropertyComputeShaderCount(const void* const /*pValue*/) {}
281 GX_FORCE_INLINE void getPropertyComputeShaderCount(void* const pValue) { *static_cast<u32*>(pValue) = _header._shaderCount[static_cast<u32>(RENDER_SHADER::COMPUTE)]; }
282#endif //GX_ENABLE_COMPUTE_SHADER
283
285 GX_FORCE_INLINE void setPropertyProgramFunctionsCount(const void* const /*pValue*/) {}
287 GX_FORCE_INLINE void getPropertyProgramFunctionsCount(void* const pValue) { *static_cast<u32*>(pValue) = getProgramFunctionsCount(); }
288
290 GX_FORCE_INLINE void setPropertyMaterialFunctionsCount(const void* const /*pValue*/) {}
292 GX_FORCE_INLINE void getPropertyMaterialFunctionsCount(void* const pValue) { *static_cast<u32*>(pValue) = getMaterialFunctionsCount(); }
293
295 GX_FORCE_INLINE void setPropertyProgramParameterCount(const void* const /*pValue*/) {}
297 GX_FORCE_INLINE void getPropertyProgramParameterCount(void* const pValue) { *static_cast<u32*>(pValue) = getProgramParameterCount(); }
298
300 GX_FORCE_INLINE void setPropertyMaterialParameterCount(const void* const /*pValue*/) {}
302 GX_FORCE_INLINE void getPropertyMaterialParameterCount(void* const pValue) { *static_cast<u32*>(pValue) = getMaterialParameterCount(); }
303
308#if GX_ENABLE_TESSELLATION
310 GxRenderHullShader* getHullShader(GxShaderCode* pShaderCode);
312 GxRenderDomainShader* getDomainShader(GxShaderCode* pShaderCode);
314 b32 getShader(GxShaderCode* pShaderCode, GxRenderVertexShader*& pVertexShader, GxRenderPixelShader*& pPixelShader, GxRenderHullShader*& pHullShader, GxRenderDomainShader*& pDomainShader);
315#else //GX_ENABLE_TESSELLATION
317 b32 getShader(GxShaderCode* pShaderCode, GxRenderVertexShader*& pVertexShader, GxRenderPixelShader*& pPixelShader);
318#endif // !GX_ENABLE_TESSELLATION
319#if GX_ENABLE_COMPUTE_SHADER
321 b32 getComputeShader(GxShaderCode* pShaderCode, GxRenderComputeShader*& pComputeShader);
322#endif // GX_ENABLE_COMPUTE_SHADER
324 u32 getOptimizedShaderCodeHash( GxShaderCode* pShaderCode, u8* pCodeBuffer );
327
329 constexpr u32 getProgramFunctionsCount(void) const { return _header._programFunctionsCount; }
331 constexpr u32 getMaterialFunctionsCount(void) const { return _header._materialFunctionsCount; }
332
334 constexpr u32 getProgramParameterCount(void) const { return _header._programParameterCount; }
336 constexpr u32 getMaterialParameterCount(void) const { return _header._materialParameterCount; }
337
339 constexpr u32 getPassCount(void) const { return _header._passCount; }
340
342 GX_HANDLE getProgramFunctionsHandleByName(GX_CSTR name) const;
345
350
352 GX_FORCE_INLINE GX_CSTR getProgramFunctionsName(GX_HANDLE handle) const;
354 GX_FORCE_INLINE GX_CSTR getMaterialFunctionsName(GX_HANDLE handle) const;
355
357 GX_FORCE_INLINE GX_CSTR getProgramFunctionsVirtualName(GX_HANDLE handle) const;
359 GX_FORCE_INLINE GX_CSTR getMaterialFunctionsVirtualName(GX_HANDLE handle) const;
360
362 GX_FORCE_INLINE GX_CSTR getProgramFunctionsValueName(GX_HANDLE handle, u32 value) const;
364 GX_FORCE_INLINE GX_CSTR getMaterialFunctionsValueName(GX_HANDLE handle, u32 value) const;
365
367 GX_FORCE_INLINE GX_CSTR getProgramFunctionsValueVirtualName(GX_HANDLE handle, u32 value) const;
369 GX_FORCE_INLINE GX_CSTR getMaterialFunctionsValueVirtualName(GX_HANDLE handle, u32 value) const;
370
372 u32 getProgramFunctionsValueByName(GX_HANDLE handle, GX_CSTR name) const;
374 u32 getMaterialFunctionsValueByName(GX_HANDLE handle, GX_CSTR name) const;
375
377 u32 getProgramFunctionsValueByVirtualName(GX_HANDLE handle, GX_CSTR name) const;
379 u32 getMaterialFunctionsValueByVirtualName(GX_HANDLE handle, GX_CSTR name) const;
380
381#if GX_DEVELOP
383 GX_FORCE_INLINE const GX_ENUM* getProgramFunctionsValueGxEnum(GX_HANDLE handle) const { return _compiler.getProgramFunctionsValueGxEnum(handle); }
385 GX_FORCE_INLINE const GX_ENUM* getMaterialFunctionsValueGxEnum(GX_HANDLE handle) const { return _compiler.getMaterialFunctionsValueGxEnum(handle); }
386#endif //GX_DEVELOP
387
389 GX_FORCE_INLINE u32 getProgramFunctionsValueCount(GX_HANDLE handle) const;
391 GX_FORCE_INLINE u32 getMaterialFunctionsValueCount(GX_HANDLE handle) const;
392
394 GX_HANDLE getProgramParameterHandleByName(GX_CSTR name) const;
397
402
404 GX_FORCE_INLINE GX_CSTR getProgramParameterName(GX_HANDLE handle) const;
406 GX_FORCE_INLINE GX_CSTR getMaterialParameterName(GX_HANDLE handle) const;
407
409 GX_FORCE_INLINE GX_CSTR getProgramParameterVirtualName(GX_HANDLE handle) const;
411 GX_FORCE_INLINE GX_CSTR getMaterialParameterVirtualName(GX_HANDLE handle) const;
412
417
420
421#if GX_DEVELOP
423 GX_FORCE_INLINE GxShaderLanguage::GxParameterAnnotation getMaterialParameterAnnotation(GX_HANDLE handle) const { return _compiler.getMaterialParameterAnnotation(handle); }
424
427 GX_FORCE_INLINE const GxShaderLanguage& GetShaderLanguage(void){ return _compiler;}
428#endif //GX_DEVELOP
429
433 void setOptimizedProgramFunctionsBits( u32 pass, u8* pBits );
435 void setOptimizedMaterialFunctionsBits( u32 pass, u8* pBits );
436
438 //-----------------------------------------------------------
440 //-----------------------------------------------------------
442public:
444 b32 load(GxStream& stream);
445#if GX_DEVELOP
447 b32 save(GxStream& stream);
449 b32 saveResource(void);
451 b32 loadConfig(GxStream& stream);
453 b32 saveConfig(GxStream& streama);
455 CONFIG_FILE_FORMAT checkConfigVersion(GxStream& stream);
457 static constexpr CONFIG_FILE_FORMAT CONFIG_SAVE_FORMAT = CONFIG_FILE_FORMAT::BINARY;
459 b32 loadConfigBinary(GxStream& stream);
461 b32 loadConfigSingleText(GxStream& stream);
463 b32 loadConfigXml(GxStream& stream);
465 b32 saveConfigBinary(GxStream& stream);
467 b32 saveConfigSingleText(GxStream& stream);
469 b32 saveConfigXml(GxStream& stream);
470#endif // GX_DEVELOP
471
472protected:
474 GxShaderNode* searchNode(GxShaderCode* pShaderCode);
476 GxShaderNode* searchNode(u32 hash);
477
479 GxShaderNode* addNode(GxShaderCode* pShaderCode);
480
482 u32 addShaderCode(GxShaderCode* pShaderCode);
483
485 GxShaderCode* getShaderCodeFromIndex(u32 index) { return static_cast<GxShaderCode*>(GX_POINTER_ADD(_pShaderCodeBuffer, index * _shaderCodeSize)); }
486
487#if GX_DEVELOP
489 GxShaderObject createShader(GxShaderCode* pShaderCode);
491 GxShaderObject createShader(GxShaderCode* pShaderCode, GxShaderLanguage& language);
493 b32 addShader(GxShaderObject& shaderObject);
495 void createVertexShader(GxShaderCompiler& shaderCompiler, u32 outputSemantics, GxRenderVertexShader** ppOutVertexShader, u32* pOutVertexShaderHash, GxShaderLanguage& language);
497 void createPixelShader(GxShaderCompiler& shaderCompiler, GxRenderPixelShader** ppOutPixelShader, u32* pOutPixelShaderHash, GxShaderLanguage& language);
498#if GX_ENABLE_TESSELLATION
500 void createHullShader(GxShaderCompiler& shaderCompiler, u32 outputSemantics, GxRenderHullShader** ppOutVertexShader, u32* pOutHullShaderHash, GxShaderLanguage& language);
502 void createDomainShader(GxShaderCompiler& shaderCompiler, u32 outputSemantics, GxRenderDomainShader** ppOutDomainShader, u32* pOutDomainShaderHash, GxShaderLanguage& language);
503#endif //GX_ENABLE_TESSELLATION
504#if GX_ENABLE_COMPUTE_SHADER
506 void createComputeShader(GxShaderCompiler& shaderCompiler, u32 outputSemantics, GxRenderComputeShader** ppOutComputeShader, u32* pOutComputeShaderHash, GxShaderLanguage& language);
507#endif // GX_ENABLE_COMPUTE_SHADER
509 s32 findShaderByBinaryCode(void* pBinaryCode, u32 size, const GxArray& hashArray, const GxArrayClassBaseReference& shaderArray);
511 s32 findShader(GxRenderShader* pShaderNew, const GxArray& hashArray, const GxArrayClassBaseReference& shaderArray);
513 b32 setConstantRegisterTableFromCompiler(const GxShaderCompiler& shaderCompiler, GxRenderShader* pRenderShader);
514#endif //GX_DEVELOP
515
517 void setConstantRegisterSetInformation(GxRenderShader::GxRegisterSet* pConstantRegisterSet, void* pConstantRegisterParameterTable, const GxShaderInfo& shaderInfo);
518
519#if GX_DEVELOP
521 void setConstantRegisterParameterInformation(void* pConstantRegisterParameterTable, const GxShaderCompiler& shaderCompiler);
522#endif //GX_DEVELOP
523
525 //-------------------------------------------------------------
527 //-------------------------------------------------------------
529
547
548#if GX_DEVELOP
549 GxShaderLanguage _compiler;
550 GxCallback::GxHandlerBase _saveResourceCallbackHandler;
551 GxResShaderPackage* _pResShaderPackage;
552#endif // GX_DEVELOP
553
557
559};
560
562#define GX_SAFE_FREE_SHADER_CODE(pShaderCode) \
563 if( pShaderCode ) \
564 { \
565 pShaderCode->getShaderPackage()->freeShaderCode(pShaderCode); \
566 pShaderCode = nullptr; \
567 }
568
569//---------------------------------------------------------------------------
570// 比較
574//---------------------------------------------------------------------------
576{
577 if (pShaderCode0->_header._pShaderPackage != pShaderCode1->_header._pShaderPackage)
578 {
579 return false;
580 }
581 else if (pShaderCode0->_header._hash != pShaderCode1->_header._hash)
582 {
583 return false;
584 }
585 else if (GX_MEMCMP(pShaderCode0->getCodeAddressConst(), pShaderCode1->getCodeAddressConst(), pShaderCode0->getSize()) != 0)
586 {
587 return false;
588 }
589 return true;
590}
591
592//---------------------------------------------------------------------------
593// 比較
598//---------------------------------------------------------------------------
599GX_FORCE_INLINE b32 GxShaderPackage::GxShaderCode::compareWithOptimizedData( const GxShaderPackage::GxShaderCode* pShaderCode0, const GxShaderPackage::GxShaderCode* pShaderCode1, u32 hash, u8* pCodeBuffer )
600{
601 if (pShaderCode0->_header._pShaderPackage != pShaderCode1->_header._pShaderPackage)
602 {
603 return false;
604 }
605 else if (hash != pShaderCode1->_header._hash)
606 {
607 return false;
608 }
609 else if (GX_MEMCMP(pCodeBuffer, pShaderCode1->getCodeAddressConst(), pShaderCode0->getSize()) != 0)
610 {
611 return false;
612 }
613 return true;
614}
615
616//---------------------------------------------------------------------------
617// コピー
620//---------------------------------------------------------------------------
622{
623 GX_MEMCPY(pDst->getCodeAddress(), pSrc->getCodeAddressConst(), pSrc->getSize());
624
625 pDst->update();
626}
627
628//---------------------------------------------------------------------------
629// シェーダコードアップデート
630//---------------------------------------------------------------------------
632{
633 _header._hash = GxMath::getHash32(getCodeAddress(), getSize());
634}
635
636//---------------------------------------------------------------------------
637// プログラムで設定する関数の取得
640//---------------------------------------------------------------------------
642{
643 if( _header._pShaderPackage->getProgramFunctionsCount() <= handle )
644 {
645 GX_ERROR(false, "未定義の program functions handle");
646 return 0;
647 }
648 return _header._pProgramFunctions[handle];
649}
650
651//---------------------------------------------------------------------------
652// プログラムで設定する関数の設定
653//
656//---------------------------------------------------------------------------
658{
659 if( _header._pShaderPackage->getProgramFunctionsCount() <= handle )
660 {
661 GX_ERROR(false, "未定義の program functions handle");
662 return;
663 }
664#if GX_DEVELOP
665 else if( _header._pShaderPackage->getProgramFunctionsValueCount(handle) <= value )
666 {
667 GX_ERROR(false, "未定義の program functions value");
668 return;
669 }
670#endif //GX_DEVELOP
671 _header._pProgramFunctions[handle] = static_cast<u8>(value);
672}
673
674//---------------------------------------------------------------------------
675// マテリアルで設定する関数の取得
678//---------------------------------------------------------------------------
680{
681 if( _header._pShaderPackage->getMaterialFunctionsCount() <= handle )
682 {
683 GX_ERROR(false, "未定義の material functions handle");
684 return 0;
685 }
686 return _header._pMaterialFunctions[handle];
687}
688
689//---------------------------------------------------------------------------
690// マテリアルで設定する関数の設定
691//
694//---------------------------------------------------------------------------
696{
697 if( _header._pShaderPackage->getMaterialFunctionsCount() <= handle )
698 {
699 GX_ERROR(false, "未定義の material functions handle");
700 return;
701 }
702#if GX_DEVELOP
703 else if( _header._pShaderPackage->getMaterialFunctionsValueCount(handle) <= value )
704 {
705 GX_ERROR(false, "未定義の material functions value");
706 return;
707 }
708#endif //GX_DEVELOP
709 _header._pMaterialFunctions[handle] = static_cast<u8>(value);
710}
711
712//---------------------------------------------------------------------------
713// パスの設定
714//
716//---------------------------------------------------------------------------
718{
719 if( _header._pShaderPackage->getPassCount() <= pass )
720 {
721 GX_ERROR(false, "未定義のパス");
722 }
723 else
724 {
725 *(_header._pPass) = pass;
726 }
727}
728
729//---------------------------------------------------------------------------
730// シェーダコード本体のアドレスを取得
732//---------------------------------------------------------------------------
734{
735 return GX_POINTER_ADD(this, sizeof(GxShaderCode));
736}
737
738//---------------------------------------------------------------------------
739// シェーダコード本体のアドレスを取得(const)
741//---------------------------------------------------------------------------
743{
744 return getCodeAddress();
745}
746
747//---------------------------------------------------------------------------
748// ヘッダを除くサイズを取得
750//---------------------------------------------------------------------------
752{
753 return sizeof(u32)
754 + GxMath::getRoundUpFast(_header._pShaderPackage->getProgramFunctionsCount() * static_cast<u32>(sizeof(u8)), GxMath::VALUE_4)
755 + GxMath::getRoundUpFast(_header._pShaderPackage->getMaterialFunctionsCount() * static_cast<u32>(sizeof(u8)), GxMath::VALUE_4);
756}
757
758//---------------------------------------------------------------------------
759// プログラムで設定する関数の名前を取得
762//---------------------------------------------------------------------------
764{
765 if( _header._programFunctionsCount <= handle )
766 {
767 GX_ERROR(false, "未定義の program functions handle");
768 return nullptr;
769 }
770
771 return _pProgramFunctions[handle]._name;
772}
773
774//---------------------------------------------------------------------------
775// マテリアルで設定する関数の名前を取得
778//---------------------------------------------------------------------------
780{
781 if( _header._materialFunctionsCount <= handle )
782 {
783 GX_ERROR(false, "未定義の material functions handle");
784 return nullptr;
785 }
786
787 return _pMaterialFunctions[handle]._name;
788}
789
790//---------------------------------------------------------------------------
791// プログラムで設定する関数の仮想名を取得
794//---------------------------------------------------------------------------
796{
797 if( _header._programFunctionsCount <= handle )
798 {
799 GX_ERROR(false, "未定義の program functions handle");
800 return nullptr;
801 }
802
803 return _pProgramFunctions[handle]._virtualName;
804}
805
806//---------------------------------------------------------------------------
807// マテリアルで設定する関数の仮想名を取得
810//---------------------------------------------------------------------------
812{
813 if( _header._materialFunctionsCount <= handle )
814 {
815 GX_ERROR(false, "未定義の material functions handle");
816 return nullptr;
817 }
818
819 return _pMaterialFunctions[handle]._virtualName;
820}
821
822//---------------------------------------------------------------------------
823// プログラムで設定する関数の値の名前を取得
827//---------------------------------------------------------------------------
829{
830 if( _header._programFunctionsCount <= handle )
831 {
832 GX_ERROR(false, "未定義の program functions handle");
833 return nullptr;
834 }
835 else if( _pProgramFunctions[handle]._functionCount <= value )
836 {
837 GX_ERROR(false, "未定義の program functions value");
838 return nullptr;
839 }
840
841 return _pProgramFunctions[handle]._pFunction[value]._name;
842}
843
844//---------------------------------------------------------------------------
845// マテリアルで設定する関数の値の名前を取得
849//---------------------------------------------------------------------------
851{
852 if( _header._materialFunctionsCount <= handle )
853 {
854 GX_ERROR(false, "未定義の material functions handle");
855 return nullptr;
856 }
857 else if( _pMaterialFunctions[handle]._functionCount <= value )
858 {
859 GX_ERROR(false, "未定義の material functions value");
860 return nullptr;
861 }
862
863 return _pMaterialFunctions[handle]._pFunction[value]._name;
864}
865
866//---------------------------------------------------------------------------
867// プログラムで設定する関数の値の仮想名を取得
871//---------------------------------------------------------------------------
873{
874 if( _header._programFunctionsCount <= handle )
875 {
876 GX_ERROR(false, "未定義の program functions handle");
877 return nullptr;
878 }
879 else if( _pProgramFunctions[handle]._functionCount <= value )
880 {
881 GX_ERROR(false, "未定義の program functions value");
882 return nullptr;
883 }
884
885 return _pProgramFunctions[handle]._pFunction[value]._virtualName;
886}
887
888//---------------------------------------------------------------------------
889// マテリアルで設定する関数の値の仮想名を取得
893//---------------------------------------------------------------------------
895{
896 if( _header._materialFunctionsCount <= handle )
897 {
898 GX_ERROR(false, "未定義の material functions handle");
899 return nullptr;
900 }
901
902 return _pMaterialFunctions[handle]._pFunction[value]._virtualName;
903}
904
905//---------------------------------------------------------------------------
906// プログラムで設定する関数の値数を取得
909//---------------------------------------------------------------------------
911{
912 if( _header._programFunctionsCount <= handle )
913 {
914 GX_ERROR(false, "未定義の program functions handle");
915 return 0;
916 }
917
918 return _pProgramFunctions[handle]._functionCount;
919}
920
921//---------------------------------------------------------------------------
922// マテリアルで設定する関数の値数を取得
925//---------------------------------------------------------------------------
927{
928 if( _header._materialFunctionsCount <= handle )
929 {
930 GX_ERROR(false, "未定義の material functions handle");
931 return 0;
932 }
933
934 return _pMaterialFunctions[handle]._functionCount;
935}
936
937//---------------------------------------------------------------------------
938// プログラムで設定するパラメータの名前を取得
941//---------------------------------------------------------------------------
943{
944 if( _header._programParameterCount <= handle )
945 {
946 GX_ERROR(false, "未定義の program parameter handle");
947 return nullptr;
948 }
949
950 return _pProgramParameter[handle]._name;
951}
952
953//---------------------------------------------------------------------------
954// マテリアルで設定するパラメータの名前を取得
957//---------------------------------------------------------------------------
959{
960 if( _header._materialParameterCount <= handle )
961 {
962 GX_ERROR(false, "未定義の material parameter handle");
963 return nullptr;
964 }
965
966 return _pMaterialParameter[handle]._name;
967}
968
969//---------------------------------------------------------------------------
970// プログラムで設定するパラメータの仮想名を取得
973//---------------------------------------------------------------------------
975{
976 if( _header._programParameterCount <= handle )
977 {
978 GX_ERROR(false, "未定義の program parameter handle");
979 return nullptr;
980 }
981
982 return _pProgramParameter[handle]._virtualName;
983}
984
985//---------------------------------------------------------------------------
986// マテリアルで設定するパラメータの仮想名を取得
989//---------------------------------------------------------------------------
991{
992 if( _header._materialParameterCount <= handle )
993 {
994 GX_ERROR(false, "未定義の material parameter handle");
995 return nullptr;
996 }
997
998 return _pMaterialParameter[handle]._virtualName;
999}
1000
1001//---------------------------------------------------------------------------
1002// プログラムで設定するパラメータのタイプを取得
1005//---------------------------------------------------------------------------
1007{
1008 if (_header._programParameterCount <= handle)
1009 {
1010 GX_ERROR(false, "未定義の program parameter handle");
1012 }
1013
1014 return _pProgramParameter[handle]._type;
1015}
1016
1017//---------------------------------------------------------------------------
1021//---------------------------------------------------------------------------
1023{
1024 if (_header._materialParameterCount <= handle)
1025 {
1026 GX_ERROR(false, "未定義の material parameter handle");
1028 }
1029
1030 return _pMaterialParameter[handle]._type;
1031}
1032
1033//---------------------------------------------------------------------------
1037//---------------------------------------------------------------------------
1039{
1040 if (_header._materialParameterCount <= handle)
1041 {
1042 GX_ERROR(false, "未定義の material parameter handle");
1043 static auto defaultValue = GxShaderLanguage::GxParameterDefaultValue();
1044 return defaultValue;
1045 }
1046
1047 return _pMaterialParameter[handle]._defaultValue;
1048}
1049
1050GX_CORE_NAMESPACE_END()
#define GX_PROHIBIT_CLASS_BASE(__CLASS__)
GxClassBase継承の禁止宣言
Definition GxBase.h:240
u32 GX_HANDLE
ハンドル
Definition GxDefine.h:214
@ UNKNOWN
未定義
@ PIXEL
ピクセルシェーダー
@ VERTEX
頂点シェーダー
@ MAX
定義数
@ MAX
定義数
参照カウンタ用配列クラス
Definition GxArrayClassBase.h:145
配列クラス
Definition GxArray.h:18
ハンドラ基本クラス
Definition GxCallback.h:27
オブジェクト基底クラス
Definition GxBase.h:88
クリティカルセクションクラス
Definition GxThread.h:20
static u32 getHash32(void *pData, u32 size)
ハッシュ値取得(32bit、データ、サイズ指定版)
Definition GxMath.cpp:241
static constexpr u32 VALUE_4
4
Definition GxMath.h:121
static GX_FORCE_INLINE T getRoundUpFast(T value, size_t alignment)
数値切り上げ(高速版 ※2のべき乗指定)
Definition GxMath.h:537
コンピュートシェーダを管理する
Definition GxRenderComputeShader.h:21
ピクセルシェーダを管理する
Definition GxRenderPixelShader.h:20
シェーダ共通の処理を記述
Definition GxRenderShader.h:20
頂点シェーダを管理する
Definition GxRenderVertexShader.h:22
シェーダパッケージリソースクラス
Definition GxResShaderPackage.h:19
メタシェーダ言語クラス
Definition GxShaderLanguage.h:19
PARAMETER_TYPE
パラメータの種類
Definition GxShaderLanguage.h:35
@ FLOAT4
浮動小数点型(float4)
シェーダパッケージクラス
Definition GxShaderPackage.h:28
GX_HANDLE getProgramFunctionsHandleByVirtualName(GX_CSTR name) const
プログラムで設定する関数のハンドルを仮想名から取得
Definition GxShaderPackage.cpp:690
GxShaderPackageHeader _header
ヘッダ
Definition GxShaderPackage.h:530
GxFunctions * _pProgramFunctions
関数情報
Definition GxShaderPackage.h:541
u32 getMaterialFunctionsValueByVirtualName(GX_HANDLE handle, GX_CSTR name) const
マテリアルで設定する関数の値を仮想名から取得
Definition GxShaderPackage.cpp:789
GxShaderNode * _pNode
ノードの先頭ポインタ
Definition GxShaderPackage.h:531
GX_FORCE_INLINE void setPropertyProgramParameterCount(const void *const)
プログラムで設定するパラメータの数を設定
Definition GxShaderPackage.h:295
GX_FORCE_INLINE void setPropertyMaterialParameterCount(const void *const)
マテリアルで設定するパラメータの数を設定
Definition GxShaderPackage.h:300
u32 getProgramFunctionsValueByName(GX_HANDLE handle, GX_CSTR name) const
プログラムで設定する関数の値を名前から取得
Definition GxShaderPackage.cpp:729
GX_FORCE_INLINE GX_CSTR getMaterialParameterVirtualName(GX_HANDLE handle) const
マテリアルで設定するパラメータの仮想名を取得
Definition GxShaderPackage.h:990
GX_FORCE_INLINE void getPropertyVertexShaderCount(void *const pValue)
頂点シェーダの数を取得
Definition GxShaderPackage.h:258
u32 _shaderCodeAllocateCount
シェーダコードの確保数
Definition GxShaderPackage.h:535
GX_FORCE_INLINE GX_CSTR getMaterialFunctionsValueName(GX_HANDLE handle, u32 value) const
マテリアルで設定する関数の値の名前を取得
Definition GxShaderPackage.h:850
GxShaderPackage(void)
デフォルトコンストラクタ
Definition GxShaderPackage.cpp:41
b32 getShader(GxShaderCode *pShaderCode, GxRenderVertexShader *&pVertexShader, GxRenderPixelShader *&pPixelShader)
シェーダ取得
Definition GxShaderPackage.cpp:546
GX_FORCE_INLINE void getPropertyPixelShaderCount(void *const pValue)
ピクセルシェーダの数を取得
Definition GxShaderPackage.h:263
GxCriticalSection _criticalSection
クリティカルセクション
Definition GxShaderPackage.h:546
GX_HANDLE getMaterialFunctionsHandleByVirtualName(GX_CSTR name) const
マテリアルで設定する関数のハンドルを仮想名から取得
Definition GxShaderPackage.cpp:709
u32 _shaderCodeSize
シェーダコードのサイズ
Definition GxShaderPackage.h:536
GX_FORCE_INLINE GX_CSTR getProgramParameterVirtualName(GX_HANDLE handle) const
プログラムで設定するパラメータの仮想名を取得
Definition GxShaderPackage.h:974
void freeShaderCode(GxShaderCode *pShaderCode)
シェーダコード解放
Definition GxShaderPackage.cpp:394
b32 initialize(void)
初期化関数
Definition GxShaderPackage.cpp:78
GX_FORCE_INLINE GX_CSTR getProgramParameterName(GX_HANDLE handle) const
プログラムで設定するパラメータの名前を取得
Definition GxShaderPackage.h:942
void terminate(void)
終了処理
Definition GxShaderPackage.cpp:330
GX_FORCE_INLINE u32 getProgramFunctionsValueCount(GX_HANDLE handle) const
プログラムで設定する関数の値数を取得
Definition GxShaderPackage.h:910
GX_FORCE_INLINE u32 getMaterialFunctionsValueCount(GX_HANDLE handle) const
マテリアルで設定する関数の値数を取得
Definition GxShaderPackage.h:926
GX_FORCE_INLINE void setPropertyProgramFunctionsCount(const void *const)
プログラムで設定する関数の数を設定
Definition GxShaderPackage.h:285
GX_FORCE_INLINE void getPropertyProgramFunctionsCount(void *const pValue)
プログラムで設定する関数の数を取得
Definition GxShaderPackage.h:287
void * _pShaderCodeBuffer
シェーダコードのバッファ
Definition GxShaderPackage.h:534
GX_HANDLE getMaterialParameterHandleByVirtualName(GX_CSTR name) const
マテリアルで設定する関数のハンドルを仮想名から取得
Definition GxShaderPackage.cpp:865
GX_FORCE_INLINE void setPropertyPixelShaderCount(const void *const)
ピクセルシェーダの数を設定
Definition GxShaderPackage.h:261
b32 _isUseOptimizedShaderVariation
最適化シェーダバリエーションを利用するか
Definition GxShaderPackage.h:554
static constexpr u32 CODE_COUNT_IN_NODE
ノード内のシェーダコード数
Definition GxShaderPackage.h:138
GX_HANDLE getProgramParameterHandleByVirtualName(GX_CSTR name) const
プログラムで設定する関数のハンドルを仮想名から取得
Definition GxShaderPackage.cpp:846
GX_FORCE_INLINE const GxShaderLanguage::GxParameterDefaultValue & getMaterialParameterDefaultValue(GX_HANDLE handle) const
マテリアルで設定するパラメータのデフォルト値を取得
Definition GxShaderPackage.h:1038
void setUseOptimizedShaderVariation(b32 isUse)
最適化シェーダバリエーションを利用するかを設定
Definition GxShaderPackage.cpp:3630
GX_FORCE_INLINE GX_CSTR getProgramFunctionsName(GX_HANDLE handle) const
プログラムで設定する関数の名前を取得
Definition GxShaderPackage.h:763
GX_FORCE_INLINE GX_CSTR getProgramFunctionsValueName(GX_HANDLE handle, u32 value) const
プログラムで設定する関数の値の名前を取得
Definition GxShaderPackage.h:828
GxRenderVertexShader * getVertexShader(GxShaderCode *pShaderCode)
頂点シェーダ取得
void setOptimizedMaterialFunctionsBits(u32 pass, u8 *pBits)
最適化シェーダバリエーションのマテリアル関数ビット列を設定
Definition GxShaderPackage.cpp:3660
GxShaderNode * addNode(GxShaderCode *pShaderCode)
ノード追加
Definition GxShaderPackage.cpp:2795
constexpr u32 getMaterialParameterCount(void) const
マテリアルで設定するパラメータの数を取得
Definition GxShaderPackage.h:336
constexpr u32 getProgramFunctionsCount(void) const
プログラムで設定する関数の数を取得
Definition GxShaderPackage.h:329
GX_HANDLE getMaterialParameterHandleByName(GX_CSTR name) const
マテリアルで設定するパラメータのハンドルを名前から取得
Definition GxShaderPackage.cpp:827
static constexpr u32 INVALID_INDEX
無効なインデックス
Definition GxShaderPackage.h:136
b32 load(GxStream &stream)
読み込み
Definition GxShaderPackage.cpp:884
GxFunction * _pFunction
関数情報
Definition GxShaderPackage.h:544
u32 getMaterialFunctionsValueByName(GX_HANDLE handle, GX_CSTR name) const
マテリアルで設定する関数の値を名前から取得
Definition GxShaderPackage.cpp:749
u8 * _pOptimizedProgramFunctionsBits[static_cast< s32 >(RENDER_PASS::MAX)]
最適化シェーダバリエーションのビット列(プログラム関数)
Definition GxShaderPackage.h:555
GX_FORCE_INLINE void getPropertyProgramParameterCount(void *const pValue)
プログラムで設定するパラメータの数を取得
Definition GxShaderPackage.h:297
GxShaderCode * getShaderCodeFromIndex(u32 index)
インデックスでシェーダコード取得
Definition GxShaderPackage.h:485
GX_HANDLE getProgramFunctionsHandleByName(GX_CSTR name) const
プログラムで設定する関数のハンドルを名前から取得
Definition GxShaderPackage.cpp:652
GX_FORCE_INLINE GxShaderLanguage::PARAMETER_TYPE getMaterialParameterType(GX_HANDLE handle) const
マテリアルで設定するパラメータのタイプを取得
Definition GxShaderPackage.h:1022
b32 _enableRuntimeCompile
実行時コンパイル有効
Definition GxShaderPackage.h:545
constexpr u32 getProgramParameterCount(void) const
プログラムで設定するパラメータの数を取得
Definition GxShaderPackage.h:334
GxRenderPixelShader * getPixelShader(GxShaderCode *pShaderCode)
ピクセルシェーダ取得
GX_FORCE_INLINE void setPropertyVertexShaderCount(const void *const)
頂点シェーダの数を設定
Definition GxShaderPackage.h:256
GX_FORCE_INLINE GxShaderLanguage::PARAMETER_TYPE getProgramParameterType(GX_HANDLE handle) const
プログラムで設定するパラメータのタイプを取得
Definition GxShaderPackage.h:1006
void setConstantRegisterSetInformation(GxRenderShader::GxRegisterSet *pConstantRegisterSet, void *pConstantRegisterParameterTable, const GxShaderInfo &shaderInfo)
定数レジスタセット情報設定
Definition GxShaderPackage.cpp:3562
u32 addShaderCode(GxShaderCode *pShaderCode)
シェーダコード追加
Definition GxShaderPackage.cpp:2884
u8 * _pOptimizedMaterialFunctionsBits[static_cast< s32 >(RENDER_PASS::MAX)]
最適化シェーダバリエーションのビット列(マテリアル関数)
Definition GxShaderPackage.h:556
void setOptimizedProgramFunctionsBits(u32 pass, u8 *pBits)
最適化シェーダバリエーションのプログラム関数ビット列を設定
Definition GxShaderPackage.cpp:3640
GX_FORCE_INLINE GX_CSTR getMaterialFunctionsName(GX_HANDLE handle) const
マテリアルで設定する関数の名前を取得
Definition GxShaderPackage.h:779
GxShaderNode * searchNode(GxShaderCode *pShaderCode)
ノード検索
Definition GxShaderPackage.cpp:2740
GX_FORCE_INLINE GX_CSTR getMaterialFunctionsVirtualName(GX_HANDLE handle) const
マテリアルで設定する関数の仮想名を取得
Definition GxShaderPackage.h:811
GX_FORCE_INLINE void getPropertyMaterialFunctionsCount(void *const pValue)
マテリアルで設定する関数の数を取得
Definition GxShaderPackage.h:292
constexpr u32 getMaterialFunctionsCount(void) const
マテリアルで設定する関数の数を取得
Definition GxShaderPackage.h:331
void * _pStringData
文字列データ
Definition GxShaderPackage.h:533
GX_FORCE_INLINE void setPropertyMaterialFunctionsCount(const void *const)
マテリアルで設定する関数の数を設定
Definition GxShaderPackage.h:290
void * _pParameterFunctionBuffer
パラメータ、関数バッファ
Definition GxShaderPackage.h:539
GX_FORCE_INLINE GX_CSTR getProgramFunctionsValueVirtualName(GX_HANDLE handle, u32 value) const
プログラムで設定する関数の値の仮想名を取得
Definition GxShaderPackage.h:872
GX_FORCE_INLINE GX_CSTR getMaterialFunctionsValueVirtualName(GX_HANDLE handle, u32 value) const
マテリアルで設定する関数の値の仮想名を取得
Definition GxShaderPackage.h:894
GxArrayClassBaseReference _shaderArray[static_cast< u32 >(RENDER_SHADER::MAX)]
シェーダ配列
Definition GxShaderPackage.h:537
constexpr u32 getPassCount(void) const
パス数を取得
Definition GxShaderPackage.h:339
GxParameter * _pProgramParameter
パラメータ情報
Definition GxShaderPackage.h:540
u32 getProgramFunctionsValueByVirtualName(GX_HANDLE handle, GX_CSTR name) const
プログラムで設定する関数の値を仮想名から取得
Definition GxShaderPackage.cpp:769
GxArray _shaderHashArray[static_cast< u32 >(RENDER_SHADER::MAX)]
シェーダハッシュ配列
Definition GxShaderPackage.h:538
GX_FORCE_INLINE GX_CSTR getProgramFunctionsVirtualName(GX_HANDLE handle) const
プログラムで設定する関数の仮想名を取得
Definition GxShaderPackage.h:795
GxShaderCode * allocateShaderCode(void)
シェーダコード作成
Definition GxShaderPackage.cpp:366
GX_FORCE_INLINE void getPropertyMaterialParameterCount(void *const pValue)
マテリアルで設定するパラメータの数を取得
Definition GxShaderPackage.h:302
GX_HANDLE getProgramParameterHandleByName(GX_CSTR name) const
プログラムで設定するパラメータのハンドルを名前から取得
Definition GxShaderPackage.cpp:808
GxParameter * _pMaterialParameter
パラメータ情報
Definition GxShaderPackage.h:542
GX_HANDLE getMaterialFunctionsHandleByName(GX_CSTR name) const
マテリアルで設定する関数のハンドルを名前から取得
Definition GxShaderPackage.cpp:671
GxFunctions * _pMaterialFunctions
関数情報
Definition GxShaderPackage.h:543
GxShaderCode * getOptimizedShaderCode(GxShaderCode *pShaderCode)
最適化されたシェーダコードを取得
Definition GxShaderPackage.cpp:468
GX_FORCE_INLINE GX_CSTR getMaterialParameterName(GX_HANDLE handle) const
マテリアルで設定するパラメータの名前を取得
Definition GxShaderPackage.h:958
u32 _nodeAllocateCount
ノードの確保数
Definition GxShaderPackage.h:532
ストリーム基礎クラス
Definition GxStream.h:20
シェーダシステムクラス
Definition GxSysShader.h:21
GUI用
Definition GxDefine.h:194
定数レジスタ情報
Definition GxRenderShader.h:85
デフォルト値構造体
Definition GxShaderLanguage.h:74
関数のファイル位置構造体
Definition GxShaderPackage.h:184
size_t _virtualNameOffset
仮想名のオフセット
Definition GxShaderPackage.h:186
size_t _nameOffset
名前のオフセット
Definition GxShaderPackage.h:185
関数情報構造体
Definition GxShaderPackage.h:177
GX_CSTR _virtualName
仮想名
Definition GxShaderPackage.h:179
GX_CSTR _name
名前
Definition GxShaderPackage.h:178
関数配列のファイル位置構造体
Definition GxShaderPackage.h:200
u32 _functionCount
関数の数
Definition GxShaderPackage.h:204
size_t _virtualNameOffset
仮想名のオフセット
Definition GxShaderPackage.h:202
size_t _functionIndex
関数インデックス
Definition GxShaderPackage.h:203
size_t _nameOffset
名前のオフセット
Definition GxShaderPackage.h:201
関数配列構造体
Definition GxShaderPackage.h:191
u32 _functionCount
関数の数
Definition GxShaderPackage.h:195
GX_CSTR _name
名前
Definition GxShaderPackage.h:192
GX_CSTR _virtualName
仮想名
Definition GxShaderPackage.h:193
GxFunction * _pFunction
関数
Definition GxShaderPackage.h:194
パラメータのファイル位置構造体
Definition GxShaderPackage.h:168
GxShaderLanguage::GxParameterDefaultValue _defaultValue
デフォルト値
Definition GxShaderPackage.h:172
GxShaderLanguage::PARAMETER_TYPE _type
Definition GxShaderPackage.h:171
size_t _virtualNameOffset
仮想名のオフセット
Definition GxShaderPackage.h:170
size_t _nameOffset
名前のオフセット
Definition GxShaderPackage.h:169
パラメータ構造体
Definition GxShaderPackage.h:159
GxShaderLanguage::PARAMETER_TYPE _type
Definition GxShaderPackage.h:162
GX_CSTR _virtualName
仮想名
Definition GxShaderPackage.h:161
GxShaderLanguage::GxParameterDefaultValue _defaultValue
デフォルト値
Definition GxShaderPackage.h:163
GX_CSTR _name
名前
Definition GxShaderPackage.h:160
シェーダコードヘッダー
Definition GxShaderPackage.h:42
GxShaderPackage * _pShaderPackage
関連付けられたシェーダパッケージ
Definition GxShaderPackage.h:44
u8 * _pProgramFunctions
プログラムで設定する関数
Definition GxShaderPackage.h:46
u8 * _pMaterialFunctions
マテリアルで設定する関数
Definition GxShaderPackage.h:47
u32 * _pPass
パス
Definition GxShaderPackage.h:45
u32 _hash
ハッシュ
Definition GxShaderPackage.h:43
シェーダコード
Definition GxShaderPackage.h:52
static GX_FORCE_INLINE void copy(GxShaderCode *pDst, const GxShaderCode *pSrc)
コピー
Definition GxShaderPackage.h:621
GX_FORCE_INLINE u32 getMaterialFunctions(GX_HANDLE handle)
マテリアルで設定する関数の取得
Definition GxShaderPackage.h:679
GX_FORCE_INLINE void * getCodeAddress(void) const
シェーダコード本体のアドレスを取得
Definition GxShaderPackage.h:733
GX_FORCE_INLINE void update(void)
シェーダコード更新
Definition GxShaderPackage.h:631
GX_FORCE_INLINE const void * getCodeAddressConst(void) const
シェーダコード本体のアドレスを取得
Definition GxShaderPackage.h:742
GX_FORCE_INLINE void setProgramFunctions(GX_HANDLE handle, u32 value)
プログラムで設定する関数の設定
Definition GxShaderPackage.h:657
GxShaderCodeHeader _header
ヘッダ
Definition GxShaderPackage.h:102
static GX_FORCE_INLINE b32 compare(const GxShaderCode *pShaderCode0, const GxShaderCode *pShaderCode1)
比較
Definition GxShaderPackage.h:575
static GX_FORCE_INLINE b32 compareWithOptimizedData(const GxShaderCode *pShaderCode0, const GxShaderCode *pShaderCode1, u32 hash, u8 *pCodeBuffer)
比較
Definition GxShaderPackage.h:599
GX_FORCE_INLINE void setMaterialFunctions(GX_HANDLE handle, u32 value)
マテリアルで設定する関数の設定
Definition GxShaderPackage.h:695
constexpr GxShaderPackage * getShaderPackage(void) const
関連付けられたシェーダパッケージを取得
Definition GxShaderPackage.h:76
GX_FORCE_INLINE u32 getSize(void) const
ヘッダを除くサイズを取得
Definition GxShaderPackage.h:751
GX_FORCE_INLINE void setPass(u32 pass)
パスの設定
Definition GxShaderPackage.h:717
GX_FORCE_INLINE u32 getProgramFunctions(GX_HANDLE handle)
プログラムで設定する関数の取得
Definition GxShaderPackage.h:641
シェーダ情報
Definition GxShaderPackage.h:125
u32 _registerTableCount[static_cast< s32 >(GxRenderShader::REGISTER_SET_TYPE::MAX)]
レジスタ情報個数 (タイプ別)
Definition GxShaderPackage.h:130
u32 _registerTableTotal
レジスタ情報個数(総数)
Definition GxShaderPackage.h:129
u32 _constantBufferSize
定数バッファサイズ
Definition GxShaderPackage.h:127
u32 _usageInputSemantics
使用する入力セマンティックス
Definition GxShaderPackage.h:128
u32 _shaderAssembledCodeSize
シェーダ命令コードサイズ
Definition GxShaderPackage.h:126
u32 _registerStart[static_cast< s32 >(GxRenderShader::REGISTER_SET_TYPE::MAX)]
レジスタ使用開始番号 (タイプ別)
Definition GxShaderPackage.h:131
u32 _registerCount[static_cast< s32 >(GxRenderShader::REGISTER_SET_TYPE::MAX)]
レジスタ使用個数 (タイプ別)
Definition GxShaderPackage.h:132
シェーダノード
Definition GxShaderPackage.h:142
u32 _largeIndex
ハッシュ値の大きいノードのインデックス
Definition GxShaderPackage.h:146
u32 _smallIndex
ハッシュ値の小さいノードのインデックス
Definition GxShaderPackage.h:145
u32 _shaderCodeIndex[CODE_COUNT_IN_NODE]
シェーダコードのインデックス
Definition GxShaderPackage.h:143
s32 _shaderIndex[static_cast< u32 >(RENDER_SHADER::MAX)][CODE_COUNT_IN_NODE]
シェーダのインデックス
Definition GxShaderPackage.h:144
シェーダオブジェクト
Definition GxShaderPackage.h:151
GxRenderShader * _pShader[static_cast< u32 >(RENDER_SHADER::MAX)]
シェーダ
Definition GxShaderPackage.h:153
GxShaderCode * _pShaderCode
シェーダコード
Definition GxShaderPackage.h:152
u32 _shaderHash[static_cast< u32 >(RENDER_SHADER::MAX)]
シェーダのハッシュ
Definition GxShaderPackage.h:154
パッケージ情報ヘッダー
Definition GxShaderPackage.h:110
u32 _functionCount
関数の数
Definition GxShaderPackage.h:115
u32 _programParameterCount
プログラムで設定するパラメータの数
Definition GxShaderPackage.h:113
u32 _materialParameterCount
マテリアルで設定するパラメータの数
Definition GxShaderPackage.h:114
u32 _shaderCodeCount
シェーダコード数
Definition GxShaderPackage.h:119
u32 _materialFunctionsCount
マテリアルで設定する関数の数
Definition GxShaderPackage.h:112
u32 _passCount
パス数
Definition GxShaderPackage.h:116
u32 _nodeCount
シェーダノード数
Definition GxShaderPackage.h:118
u32 _programFunctionsCount
プログラムで設定する関数の数
Definition GxShaderPackage.h:111
u32 _stringDataSize
文字列データサイズ
Definition GxShaderPackage.h:120
u32 _shaderCount[static_cast< u32 >(RENDER_SHADER::MAX)]
シェーダ数
Definition GxShaderPackage.h:117
32bitブーリアン
Definition GxDefine.h:173