mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
MSAA: Store samples in ini files.
This commit is contained in:
@ -287,7 +287,7 @@ const char reint_rgb8_to_rgba6_msaa[] = {
|
||||
|
||||
ID3D11PixelShader* PixelShaderCache::ReinterpRGBA6ToRGB8(bool multisampled)
|
||||
{
|
||||
if (!multisampled || D3D::GetAAMode(g_ActiveConfig.iMultisampleMode).Count == 1)
|
||||
if (!multisampled || g_ActiveConfig.iMultisamples <= 1)
|
||||
{
|
||||
if (!s_rgba6_to_rgb8[0])
|
||||
{
|
||||
@ -300,7 +300,7 @@ ID3D11PixelShader* PixelShaderCache::ReinterpRGBA6ToRGB8(bool multisampled)
|
||||
else if (!s_rgba6_to_rgb8[1])
|
||||
{
|
||||
// create MSAA shader for current AA mode
|
||||
std::string buf = StringFromFormat(reint_rgba6_to_rgb8_msaa, D3D::GetAAMode(g_ActiveConfig.iMultisampleMode).Count);
|
||||
std::string buf = StringFromFormat(reint_rgba6_to_rgb8_msaa, g_ActiveConfig.iMultisamples);
|
||||
s_rgba6_to_rgb8[1] = D3D::CompileAndCreatePixelShader(buf);
|
||||
|
||||
CHECK(s_rgba6_to_rgb8[1], "Create RGBA6 to RGB8 MSAA pixel shader");
|
||||
@ -311,7 +311,7 @@ ID3D11PixelShader* PixelShaderCache::ReinterpRGBA6ToRGB8(bool multisampled)
|
||||
|
||||
ID3D11PixelShader* PixelShaderCache::ReinterpRGB8ToRGBA6(bool multisampled)
|
||||
{
|
||||
if (!multisampled || D3D::GetAAMode(g_ActiveConfig.iMultisampleMode).Count == 1)
|
||||
if (!multisampled || g_ActiveConfig.iMultisamples <= 1)
|
||||
{
|
||||
if (!s_rgb8_to_rgba6[0])
|
||||
{
|
||||
@ -324,7 +324,7 @@ ID3D11PixelShader* PixelShaderCache::ReinterpRGB8ToRGBA6(bool multisampled)
|
||||
else if (!s_rgb8_to_rgba6[1])
|
||||
{
|
||||
// create MSAA shader for current AA mode
|
||||
std::string buf = StringFromFormat(reint_rgb8_to_rgba6_msaa, D3D::GetAAMode(g_ActiveConfig.iMultisampleMode).Count);
|
||||
std::string buf = StringFromFormat(reint_rgb8_to_rgba6_msaa, g_ActiveConfig.iMultisamples);
|
||||
s_rgb8_to_rgba6[1] = D3D::CompileAndCreatePixelShader(buf);
|
||||
|
||||
CHECK(s_rgb8_to_rgba6[1], "Create RGB8 to RGBA6 MSAA pixel shader");
|
||||
@ -335,7 +335,7 @@ ID3D11PixelShader* PixelShaderCache::ReinterpRGB8ToRGBA6(bool multisampled)
|
||||
|
||||
ID3D11PixelShader* PixelShaderCache::GetColorCopyProgram(bool multisampled)
|
||||
{
|
||||
if (!multisampled || D3D::GetAAMode(g_ActiveConfig.iMultisampleMode).Count == 1)
|
||||
if (!multisampled || g_ActiveConfig.iMultisamples <= 1)
|
||||
{
|
||||
return s_ColorCopyProgram[0];
|
||||
}
|
||||
@ -346,7 +346,7 @@ ID3D11PixelShader* PixelShaderCache::GetColorCopyProgram(bool multisampled)
|
||||
else
|
||||
{
|
||||
// create MSAA shader for current AA mode
|
||||
std::string buf = StringFromFormat(color_copy_program_code_msaa, D3D::GetAAMode(g_ActiveConfig.iMultisampleMode).Count);
|
||||
std::string buf = StringFromFormat(color_copy_program_code_msaa, g_ActiveConfig.iMultisamples);
|
||||
s_ColorCopyProgram[1] = D3D::CompileAndCreatePixelShader(buf);
|
||||
CHECK(s_ColorCopyProgram[1]!=nullptr, "Create color copy MSAA pixel shader");
|
||||
D3D::SetDebugObjectName((ID3D11DeviceChild*)s_ColorCopyProgram[1], "color copy MSAA pixel shader");
|
||||
@ -356,7 +356,7 @@ ID3D11PixelShader* PixelShaderCache::GetColorCopyProgram(bool multisampled)
|
||||
|
||||
ID3D11PixelShader* PixelShaderCache::GetColorMatrixProgram(bool multisampled)
|
||||
{
|
||||
if (!multisampled || D3D::GetAAMode(g_ActiveConfig.iMultisampleMode).Count == 1)
|
||||
if (!multisampled || g_ActiveConfig.iMultisamples <= 1)
|
||||
{
|
||||
return s_ColorMatrixProgram[0];
|
||||
}
|
||||
@ -367,7 +367,7 @@ ID3D11PixelShader* PixelShaderCache::GetColorMatrixProgram(bool multisampled)
|
||||
else
|
||||
{
|
||||
// create MSAA shader for current AA mode
|
||||
std::string buf = StringFromFormat(color_matrix_program_code_msaa, D3D::GetAAMode(g_ActiveConfig.iMultisampleMode).Count);
|
||||
std::string buf = StringFromFormat(color_matrix_program_code_msaa, g_ActiveConfig.iMultisamples);
|
||||
s_ColorMatrixProgram[1] = D3D::CompileAndCreatePixelShader(buf);
|
||||
CHECK(s_ColorMatrixProgram[1]!=nullptr, "Create color matrix MSAA pixel shader");
|
||||
D3D::SetDebugObjectName((ID3D11DeviceChild*)s_ColorMatrixProgram[1], "color matrix MSAA pixel shader");
|
||||
@ -377,7 +377,7 @@ ID3D11PixelShader* PixelShaderCache::GetColorMatrixProgram(bool multisampled)
|
||||
|
||||
ID3D11PixelShader* PixelShaderCache::GetDepthMatrixProgram(bool multisampled)
|
||||
{
|
||||
if (!multisampled || D3D::GetAAMode(g_ActiveConfig.iMultisampleMode).Count == 1)
|
||||
if (!multisampled || g_ActiveConfig.iMultisamples <= 1)
|
||||
{
|
||||
return s_DepthMatrixProgram[0];
|
||||
}
|
||||
@ -388,7 +388,7 @@ ID3D11PixelShader* PixelShaderCache::GetDepthMatrixProgram(bool multisampled)
|
||||
else
|
||||
{
|
||||
// create MSAA shader for current AA mode
|
||||
std::string buf = StringFromFormat(depth_matrix_program_msaa, D3D::GetAAMode(g_ActiveConfig.iMultisampleMode).Count);
|
||||
std::string buf = StringFromFormat(depth_matrix_program_msaa, g_ActiveConfig.iMultisamples);
|
||||
s_DepthMatrixProgram[1] = D3D::CompileAndCreatePixelShader(buf);
|
||||
CHECK(s_DepthMatrixProgram[1]!=nullptr, "Create depth matrix MSAA pixel shader");
|
||||
D3D::SetDebugObjectName((ID3D11DeviceChild*)s_DepthMatrixProgram[1], "depth matrix MSAA pixel shader");
|
||||
|
Reference in New Issue
Block a user