(360) Add constant table for fragment shader too

This commit is contained in:
TwinAphex51224 2012-03-10 20:55:55 +01:00
parent c2cc7a278f
commit c5d8e1a75c
3 changed files with 12 additions and 11 deletions

View File

@ -214,7 +214,6 @@ void xdk360_set_aspect_ratio(uint32_t aspectratio_index)
set_viewport(false);
}
static void *xdk360_gfx_init(const video_info_t *video, const input_driver_t **input, void **input_data)
{
HRESULT ret;
@ -272,7 +271,7 @@ static void *xdk360_gfx_init(const video_info_t *video, const input_driver_t **i
0, // flags
&pShaderCodeV, // compiled operations
&pErrorMsg, // errors
&vid->constantTable); // constants
&vid->vertex_constant_table); // constants
if (SUCCEEDED(ret))
{
@ -286,7 +285,7 @@ static void *xdk360_gfx_init(const video_info_t *video, const input_driver_t **i
0, // flags
&pShaderCodeP, // compiled operations
&pErrorMsg, // errors
NULL); // constants
&vid->fragment_constant_table); // constants
}
if (FAILED(ret))
@ -396,7 +395,8 @@ static bool xdk360_gfx_frame(void *data, const void *frame,
vid->xdk360_render_device->SetVertexShaderConstantF(0, (FLOAT*)&hlsl_program.modelViewProj, 4);
vid->constantTable->SetDefaults(vid->xdk360_render_device);
vid->vertex_constant_table->SetDefaults(vid->xdk360_render_device);
vid->fragment_constant_table->SetDefaults(vid->xdk360_render_device);
//TODO: Update the shader constants

View File

@ -53,7 +53,8 @@ typedef struct xdk360_video
IDirect3DVertexBuffer9* vertex_buf;
IDirect3DTexture9* font_texture;
IDirect3DTexture9* lpTexture;
LPD3DXCONSTANTTABLE constantTable;
LPD3DXCONSTANTTABLE vertex_constant_table;
LPD3DXCONSTANTTABLE fragment_constant_table;
D3DPRESENT_PARAMETERS d3dpp;
XVIDEO_MODE video_mode;
} xdk360_video_t;

View File

@ -112,7 +112,7 @@
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PreprocessorDefinitions>_DEBUG;_XBOX;PACKAGE_VERSION="0.9.4.1";%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;main=ssnes_main;SSNES_CONSOLE;HAVE_CONFIGFILE;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;_XBOX;PACKAGE_VERSION="0.9.4.1";%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;main=ssnes_main;SSNES_CONSOLE;HAVE_CONFIGFILE;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;D3DCOMPILE_USEVOIDS</PreprocessorDefinitions>
<CallAttributedProfiling>Callcap</CallAttributedProfiling>
</ClCompile>
<Link>
@ -149,7 +149,7 @@
<PREfast>AnalyzeOnly</PREfast>
<BufferSecurityCheck>false</BufferSecurityCheck>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PreprocessorDefinitions>_DEBUG;_XBOX;%(PreprocessorDefinitions);PACKAGE_VERSION="0.9.4.1";_CRT_SECURE_NO_WARNINGS;main=ssnes_main;HAVE_CONFIGFILE;SSNES_CONSOLE;HAVE_ZLIB</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;_XBOX;%(PreprocessorDefinitions);PACKAGE_VERSION="0.9.4.1";_CRT_SECURE_NO_WARNINGS;main=ssnes_main;HAVE_CONFIGFILE;SSNES_CONSOLE;HAVE_ZLIB;D3DCOMPILE_USEVOIDS</PreprocessorDefinitions>
<CallAttributedProfiling>Callcap</CallAttributedProfiling>
</ClCompile>
<Link>
@ -187,7 +187,7 @@
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<BufferSecurityCheck>false</BufferSecurityCheck>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PreprocessorDefinitions>NDEBUG;_XBOX;PROFILE;%(PreprocessorDefinitions);PACKAGE_VERSION="0.9.4.1";_CRT_SECURE_NO_WARNINGS;SSNES_CONSOLE;main=ssnes_main;HAVE_CONFIGFILE;HAVE_ZLIB</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;_XBOX;PROFILE;%(PreprocessorDefinitions);PACKAGE_VERSION="0.9.4.1";_CRT_SECURE_NO_WARNINGS;SSNES_CONSOLE;main=ssnes_main;HAVE_CONFIGFILE;HAVE_ZLIB;D3DCOMPILE_USEVOIDS</PreprocessorDefinitions>
<CallAttributedProfiling>Callcap</CallAttributedProfiling>
</ClCompile>
<Link>
@ -230,7 +230,7 @@
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<BufferSecurityCheck>false</BufferSecurityCheck>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PreprocessorDefinitions>NDEBUG;_XBOX;PROFILE;FASTCAP;%(PreprocessorDefinitions);PACKAGE_VERSION="0.9.4.1";_CRT_SECURE_NO_WARNINGS;main=ssnes_main;HAVE_CONFIGFILE;HAVE_ZLIB</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;_XBOX;PROFILE;FASTCAP;%(PreprocessorDefinitions);PACKAGE_VERSION="0.9.4.1";_CRT_SECURE_NO_WARNINGS;main=ssnes_main;HAVE_CONFIGFILE;HAVE_ZLIB;D3DCOMPILE_USEVOIDS</PreprocessorDefinitions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
@ -270,7 +270,7 @@
<ExceptionHandling>false</ExceptionHandling>
<BufferSecurityCheck>false</BufferSecurityCheck>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PreprocessorDefinitions>NDEBUG;_XBOX;%(PreprocessorDefinitions);PACKAGE_VERSION="0.9.4.1";_CRT_SECURE_NO_WARNINGS;main=ssnes_main;SSNES_CONSOLE=1;HAVE_CONFIGFILE;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;_XBOX;%(PreprocessorDefinitions);PACKAGE_VERSION="0.9.4.1";_CRT_SECURE_NO_WARNINGS;main=ssnes_main;SSNES_CONSOLE=1;HAVE_CONFIGFILE;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;D3DCOMPILE_USEVOIDS</PreprocessorDefinitions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
@ -310,7 +310,7 @@
<ExceptionHandling>false</ExceptionHandling>
<BufferSecurityCheck>false</BufferSecurityCheck>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PreprocessorDefinitions>NDEBUG;_XBOX;LTCG;%(PreprocessorDefinitions);PACKAGE_VERSION="0.9.4.1";_CRT_SECURE_NO_WARNINGS;SSNES_CONSOLE;main=ssnes_main;HAVE_CONFIGFILE;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;_XBOX;LTCG;%(PreprocessorDefinitions);PACKAGE_VERSION="0.9.4.1";_CRT_SECURE_NO_WARNINGS;SSNES_CONSOLE;main=ssnes_main;HAVE_CONFIGFILE;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;D3DCOMPILE_USEVOIDS</PreprocessorDefinitions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>