Commit 2384bdde authored by H. Verbeet's avatar H. Verbeet Committed by Alexandre Julliard

wined3d: Remove broken software shaders.

parent 318fb298
......@@ -246,27 +246,18 @@ static void select_shader_mode(
int* ps_selected,
int* vs_selected) {
/* Give priority to user disable/emulation request.
* Then respect REF device for software.
* Then check capabilities for hardware, and fallback to software */
if (wined3d_settings.vs_mode == VS_NONE) {
*vs_selected = SHADER_NONE;
} else if (DeviceType == WINED3DDEVTYPE_REF || wined3d_settings.vs_mode == VS_SW) {
*vs_selected = SHADER_SW;
} else if (gl_info->supported[ARB_VERTEX_SHADER] && wined3d_settings.glslRequested) {
*vs_selected = SHADER_GLSL;
} else if (gl_info->supported[ARB_VERTEX_PROGRAM]) {
*vs_selected = SHADER_ARB;
} else {
*vs_selected = SHADER_SW;
*vs_selected = SHADER_NONE;
}
/* Fallback to SHADER_NONE where software pixel shaders should be used */
if (wined3d_settings.ps_mode == PS_NONE) {
*ps_selected = SHADER_NONE;
} else if (DeviceType == WINED3DDEVTYPE_REF) {
*ps_selected = SHADER_NONE;
} else if (gl_info->supported[ARB_FRAGMENT_SHADER] && wined3d_settings.glslRequested) {
*ps_selected = SHADER_GLSL;
} else if (gl_info->supported[ARB_FRAGMENT_PROGRAM]) {
......@@ -293,9 +284,6 @@ void select_shader_max_constants(
* and we reference one row of the PROJECTION matrix which counts as 1 PARAM. */
gl_info->max_vshader_constantsF = gl_info->vs_arb_constantsF - 3;
break;
case SHADER_SW:
gl_info->max_vshader_constantsF = 96; /* TODO: Fixup software shaders */
break;
default:
gl_info->max_vshader_constantsF = 0;
break;
......@@ -316,9 +304,6 @@ void select_shader_max_constants(
*/
gl_info->max_pshader_constantsF = gl_info->ps_arb_constantsF;
break;
case SHADER_SW:
gl_info->max_pshader_constantsF = 96; /* TODO: Fixup software shaders */
break;
default:
gl_info->max_pshader_constantsF = 0;
break;
......@@ -2263,9 +2248,6 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter,
} else if (vs_selected_mode == SHADER_ARB) {
*pCaps->VertexShaderVersion = WINED3DVS_VERSION(1,1);
TRACE_(d3d_caps)("Hardware vertex shader version 1.1 enabled (ARB_PROGRAM)\n");
} else if (vs_selected_mode == SHADER_SW) {
*pCaps->VertexShaderVersion = WINED3DVS_VERSION(3,0);
TRACE_(d3d_caps)("Software vertex shader version 3.0 enabled\n");
} else {
*pCaps->VertexShaderVersion = 0;
TRACE_(d3d_caps)("Vertex shader functionality not available\n");
......@@ -2287,11 +2269,6 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter,
*pCaps->PixelShaderVersion = WINED3DPS_VERSION(1,4);
*pCaps->PixelShader1xMaxValue = 1.0;
TRACE_(d3d_caps)("Hardware pixel shader version 1.4 enabled (ARB_PROGRAM)\n");
/* FIXME: Uncomment this when there is support for software Pixel Shader 3.0 and PS_SW is defined
} else if (ps_selected_mode = SHADER_SW) {
*pCaps->PixelShaderVersion = WINED3DPS_VERSION(3,0);
*pCaps->PixelShader1xMaxValue = 1.0;
TRACE_(d3d_caps)("Software pixel shader version 3.0 enabled\n"); */
} else {
*pCaps->PixelShaderVersion = 0;
*pCaps->PixelShader1xMaxValue = 0.0;
......
......@@ -143,11 +143,6 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
TRACE("Disable vertex shaders\n");
wined3d_settings.vs_mode = VS_NONE;
}
else if (!strcmp(buffer,"emulation"))
{
TRACE("Force SW vertex shaders\n");
wined3d_settings.vs_mode = VS_SW;
}
}
if ( !get_config_key( hkey, appkey, "PixelShaderMode", buffer, size) )
{
......
......@@ -152,7 +152,6 @@ static WINED3DGLTYPE const glTypeLookup[WINED3DDECLTYPE_UNUSED] = {
*/
#define VS_NONE 0
#define VS_HW 1
#define VS_SW 2
#define PS_NONE 0
#define PS_HW 1
......@@ -168,7 +167,6 @@ static WINED3DGLTYPE const glTypeLookup[WINED3DDECLTYPE_UNUSED] = {
#define ORM_PBUFFER 1
#define ORM_FBO 2
#define SHADER_SW 0
#define SHADER_ARB 1
#define SHADER_GLSL 2
#define SHADER_NONE 3
......@@ -1461,7 +1459,6 @@ void multiply_matrix(WINED3DMATRIX *dest, const WINED3DMATRIX *src1, const WINED
void IWineD3DBaseTextureImpl_CleanUp(IWineD3DBaseTexture *iface);
struct SHADER_OPCODE_ARG;
typedef void (*shader_fct_t)();
typedef void (*SHADER_HANDLER) (struct SHADER_OPCODE_ARG*);
/* Struct to maintain a list of GLSL shader programs and their associated pixel and
......@@ -1557,7 +1554,6 @@ typedef struct SHADER_OPCODE {
const char* glname;
char dst_token;
CONST UINT num_params;
shader_fct_t soft_fct;
SHADER_HANDLER hw_fct;
SHADER_HANDLER hw_glsl_fct;
DWORD min_version;
......
......@@ -244,7 +244,6 @@ STRINGTABLE DISCARDABLE
BEGIN
IDS_SHADER_MODE_HARDWARE "Hardware"
IDS_SHADER_MODE_NONE "None"
IDS_SHADER_MODE_EMULATION "Emulated"
END
STRINGTABLE DISCARDABLE
......
......@@ -242,7 +242,6 @@ STRINGTABLE DISCARDABLE
BEGIN
IDS_SHADER_MODE_HARDWARE "Hardware"
IDS_SHADER_MODE_NONE "Aus"
IDS_SHADER_MODE_EMULATION "Emuliert"
END
STRINGTABLE DISCARDABLE
......
......@@ -243,7 +243,6 @@ STRINGTABLE DISCARDABLE
BEGIN
IDS_SHADER_MODE_HARDWARE "Hardware"
IDS_SHADER_MODE_NONE "None"
IDS_SHADER_MODE_EMULATION "Emulated"
END
STRINGTABLE DISCARDABLE
......
......@@ -238,7 +238,6 @@ STRINGTABLE DISCARDABLE
BEGIN
IDS_SHADER_MODE_HARDWARE "Hardware"
IDS_SHADER_MODE_NONE "None"
IDS_SHADER_MODE_EMULATION "Emulated"
END
STRINGTABLE DISCARDABLE
......
......@@ -241,7 +241,6 @@ STRINGTABLE DISCARDABLE
BEGIN
IDS_SHADER_MODE_HARDWARE "Hardware"
IDS_SHADER_MODE_NONE "None"
IDS_SHADER_MODE_EMULATION "Emulated"
END
STRINGTABLE DISCARDABLE
......
......@@ -242,7 +242,6 @@ STRINGTABLE DISCARDABLE
BEGIN
IDS_SHADER_MODE_HARDWARE "Matriel"
IDS_SHADER_MODE_NONE "Aucun"
IDS_SHADER_MODE_EMULATION "mulation"
END
STRINGTABLE DISCARDABLE
......
......@@ -238,7 +238,6 @@ STRINGTABLE DISCARDABLE
BEGIN
IDS_SHADER_MODE_HARDWARE "Hardware"
IDS_SHADER_MODE_NONE "None"
IDS_SHADER_MODE_EMULATION "Emulated"
END
STRINGTABLE DISCARDABLE
......
......@@ -236,7 +236,6 @@ STRINGTABLE DISCARDABLE
BEGIN
IDS_SHADER_MODE_HARDWARE "Hardware"
IDS_SHADER_MODE_NONE "None"
IDS_SHADER_MODE_EMULATION "Emulated"
END
STRINGTABLE DISCARDABLE
......
......@@ -245,7 +245,6 @@ STRINGTABLE DISCARDABLE
BEGIN
IDS_SHADER_MODE_HARDWARE "하드웨어"
IDS_SHADER_MODE_NONE "없음"
IDS_SHADER_MODE_EMULATION "애뮬레이트"
END
STRINGTABLE DISCARDABLE
......
......@@ -243,7 +243,6 @@ STRINGTABLE DISCARDABLE
BEGIN
IDS_SHADER_MODE_HARDWARE "Hardware"
IDS_SHADER_MODE_NONE "Geen"
IDS_SHADER_MODE_EMULATION "Emulatie"
END
STRINGTABLE DISCARDABLE
......
......@@ -241,7 +241,6 @@ STRINGTABLE DISCARDABLE
BEGIN
IDS_SHADER_MODE_HARDWARE "Maskinvare"
IDS_SHADER_MODE_NONE "Ingen"
IDS_SHADER_MODE_EMULATION "Emulering"
END
STRINGTABLE DISCARDABLE
......
......@@ -243,7 +243,6 @@ STRINGTABLE DISCARDABLE
BEGIN
IDS_SHADER_MODE_HARDWARE ""
IDS_SHADER_MODE_NONE ""
IDS_SHADER_MODE_EMULATION ""
END
STRINGTABLE DISCARDABLE
......
......@@ -241,7 +241,6 @@ STRINGTABLE DISCARDABLE
BEGIN
IDS_SHADER_MODE_HARDWARE "Donanm"
IDS_SHADER_MODE_NONE "Hibiri"
IDS_SHADER_MODE_EMULATION "Taklit"
END
STRINGTABLE DISCARDABLE
......
......@@ -151,7 +151,6 @@
#define IDC_D3D_PSHADER_MODE 1106
#define IDS_SHADER_MODE_HARDWARE 8100
#define IDS_SHADER_MODE_NONE 8101
#define IDS_SHADER_MODE_EMULATION 8102
/* applications tab */
#define IDC_APP_LISTVIEW 1200
......
......@@ -44,7 +44,6 @@ static struct SHADERMODE
const char* settingStr;
} const D3D_VS_Modes[] = {
{IDS_SHADER_MODE_HARDWARE, "hardware"},
{IDS_SHADER_MODE_EMULATION, "emulation"},
{IDS_SHADER_MODE_NONE, "none"},
{0, 0}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment