@@ -779,16 +779,6 @@ void CRender::DumpStatistics(IGameFont& font, IPerformanceAlert* alert)
779779 Sectors_xrc.DumpStatistics (font, alert);
780780}
781781
782- // ///////
783- #pragma comment(lib, "d3dx9.lib")
784- /*
785- extern "C"
786- {
787- LPCSTR WINAPI D3DXGetPixelShaderProfile (LPDIRECT3DDEVICE9 pDevice);
788- LPCSTR WINAPI D3DXGetVertexShaderProfile (LPDIRECT3DDEVICE9 pDevice);
789- };
790- */
791-
792782void CRender::addShaderOption (const char * name, const char * value)
793783{
794784 D3D_SHADER_MACRO macro = {name, value};
@@ -803,7 +793,7 @@ static HRESULT create_shader(LPCSTR const pTarget, DWORD const* buffer, u32 cons
803793
804794 ID3DShaderReflection* pReflection = 0 ;
805795
806- HRESULT const _hr = D3DReflect (buffer, buffer_size, IID_ID3D11ShaderReflection , (void **)&pReflection);
796+ HRESULT const _hr = D3DReflect (buffer, buffer_size, IID_ID3DShaderReflection , (void **)&pReflection);
807797 if (SUCCEEDED (_hr) && pReflection)
808798 {
809799 // Parse constant table data
@@ -819,8 +809,7 @@ static HRESULT create_shader(LPCSTR const pTarget, DWORD const* buffer, u32 cons
819809 return _hr;
820810}
821811
822- static HRESULT create_shader (LPCSTR const pTarget, DWORD const * buffer, u32 const buffer_size, LPCSTR const file_name,
823- void *& result, bool const disasm)
812+ static HRESULT create_shader (LPCSTR const pTarget, DWORD const * buffer, u32 const buffer_size, LPCSTR const file_name, void *& result, bool const disasm)
824813{
825814 HRESULT _result = E_FAIL;
826815 if (pTarget[0 ] == ' p' )
@@ -841,7 +830,7 @@ static HRESULT create_shader(LPCSTR const pTarget, DWORD const* buffer, u32 cons
841830 ID3DShaderReflection* pReflection = 0 ;
842831
843832#ifdef USE_DX11
844- _result = D3DReflect (buffer, buffer_size, IID_ID3D11ShaderReflection , (void **)&pReflection);
833+ _result = D3DReflect (buffer, buffer_size, IID_ID3DShaderReflection , (void **)&pReflection);
845834#else
846835 _result = D3D10ReflectShader (buffer, buffer_size, &pReflection);
847836#endif
@@ -879,7 +868,7 @@ static HRESULT create_shader(LPCSTR const pTarget, DWORD const* buffer, u32 cons
879868
880869 ID3DShaderReflection* pReflection = 0 ;
881870#ifdef USE_DX11
882- _result = D3DReflect (buffer, buffer_size, IID_ID3D11ShaderReflection , (void **)&pReflection);
871+ _result = D3DReflect (buffer, buffer_size, IID_ID3DShaderReflection , (void **)&pReflection);
883872#else
884873 _result = D3D10ReflectShader (buffer, buffer_size, &pReflection);
885874#endif
@@ -930,7 +919,7 @@ static HRESULT create_shader(LPCSTR const pTarget, DWORD const* buffer, u32 cons
930919 ID3DShaderReflection* pReflection = 0 ;
931920
932921#ifdef USE_DX11
933- _result = D3DReflect (buffer, buffer_size, IID_ID3D11ShaderReflection , (void **)&pReflection);
922+ _result = D3DReflect (buffer, buffer_size, IID_ID3DShaderReflection , (void **)&pReflection);
934923#else
935924 _result = D3D10ReflectShader (buffer, buffer_size, &pReflection);
936925#endif
@@ -950,42 +939,6 @@ static HRESULT create_shader(LPCSTR const pTarget, DWORD const* buffer, u32 cons
950939 Msg (" ! D3DReflectShader hr == 0x%08x" , _result);
951940 }
952941 }
953- // else if (pTarget[0] == 'c') {
954- // SCS* scs_result = (SCS*)result;
955- // #ifdef USE_DX11
956- // _result = HW.pDevice->CreateComputeShader(buffer, buffer_size, 0, &scs_result->sh);
957- // #else // #ifdef USE_DX11
958- // _result = HW.pDevice->CreateComputeShader(buffer, buffer_size, &scs_result->sh);
959- // #endif // #ifdef USE_DX11
960- // if ( !SUCCEEDED(_result) ) {
961- // Log ("! CS: ", file_name);
962- // Msg ("! CreateComputeShaderhr == 0x%08x", _result);
963- // return E_FAIL;
964- // }
965- //
966- // ID3DShaderReflection *pReflection = 0;
967- //
968- // #ifdef USE_DX11
969- // _result = D3DReflect( buffer, buffer_size, IID_ID3DShaderReflection, (void**)&pReflection);
970- // #else
971- // _result = D3D10ReflectShader( buffer, buffer_size, &pReflection);
972- // #endif
973- //
974- // // Parse constant, texture, sampler binding
975- // // Store input signature blob
976- // if (SUCCEEDED(_result) && pReflection)
977- // {
978- // // Let constant table parse it's data
979- // scs_result->constants.parse(pReflection,RC_dest_pixel);
980- //
981- // _RELEASE(pReflection);
982- // }
983- // else
984- // {
985- // Log ("! PS: ", file_name);
986- // Msg ("! D3DReflectShader hr == 0x%08x", _result);
987- // }
988- // }
989942 else if (pTarget[0 ] == ' c' )
990943 {
991944 _result = create_shader (pTarget, buffer, buffer_size, file_name, (SCS*&)result, disasm);
@@ -1576,7 +1529,7 @@ HRESULT CRender::shader_compile(LPCSTR name, DWORD const* pSrcData, UINT SrcData
15761529 ++len;
15771530 }
15781531
1579- sh_name[len] = 0 ;
1532+ sh_name[len] = ' \0 ' ;
15801533
15811534 // finish
15821535 defines[def_it].Name = 0 ;
0 commit comments