forked from Mirrors/wine-wine
wined3d: Get rid of WINED3D_QUIRK_SET_TEXCOORD_W.
This quirk only affects fixed-function fragment processing, which hasn't been a supported configuration on the affected hardware for a while now. Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>feature/deterministic
parent
422e05d844
commit
a4cedbe86d
|
@ -525,23 +525,6 @@ static void test_pbo_functionality(struct wined3d_gl_info *gl_info)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL match_apple_intel(const struct wined3d_gl_info *gl_info, struct wined3d_caps_gl_ctx *ctx,
|
|
||||||
const char *gl_renderer, enum wined3d_gl_vendor gl_vendor,
|
|
||||||
enum wined3d_pci_vendor card_vendor, enum wined3d_pci_device device)
|
|
||||||
{
|
|
||||||
return (card_vendor == HW_VENDOR_INTEL) && (gl_vendor == GL_VENDOR_APPLE);
|
|
||||||
}
|
|
||||||
|
|
||||||
static BOOL match_apple_nonr500ati(const struct wined3d_gl_info *gl_info, struct wined3d_caps_gl_ctx *ctx,
|
|
||||||
const char *gl_renderer, enum wined3d_gl_vendor gl_vendor,
|
|
||||||
enum wined3d_pci_vendor card_vendor, enum wined3d_pci_device device)
|
|
||||||
{
|
|
||||||
if (gl_vendor != GL_VENDOR_APPLE) return FALSE;
|
|
||||||
if (card_vendor != HW_VENDOR_AMD) return FALSE;
|
|
||||||
if (device == CARD_AMD_RADEON_X1600) return FALSE;
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static BOOL match_dx10_capable(const struct wined3d_gl_info *gl_info, struct wined3d_caps_gl_ctx *ctx,
|
static BOOL match_dx10_capable(const struct wined3d_gl_info *gl_info, struct wined3d_caps_gl_ctx *ctx,
|
||||||
const char *gl_renderer, enum wined3d_gl_vendor gl_vendor,
|
const char *gl_renderer, enum wined3d_gl_vendor gl_vendor,
|
||||||
enum wined3d_pci_vendor card_vendor, enum wined3d_pci_device device)
|
enum wined3d_pci_vendor card_vendor, enum wined3d_pci_device device)
|
||||||
|
@ -948,30 +931,6 @@ static void quirk_no_np2(struct wined3d_gl_info *gl_info)
|
||||||
gl_info->supported[ARB_TEXTURE_RECTANGLE] = TRUE;
|
gl_info->supported[ARB_TEXTURE_RECTANGLE] = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void quirk_texcoord_w(struct wined3d_gl_info *gl_info)
|
|
||||||
{
|
|
||||||
/* The Intel GPUs on macOS set the .w register of texcoords to 0.0 by
|
|
||||||
* default, which causes problems with fixed-function fragment processing.
|
|
||||||
* Ideally this flag should be detected with a test shader and OpenGL
|
|
||||||
* feedback mode, but some OpenGL implementations (macOS ATI at least,
|
|
||||||
* probably all macOS ones) do not like vertex shaders in feedback mode
|
|
||||||
* and return an error, even though it should be valid according to the
|
|
||||||
* spec.
|
|
||||||
*
|
|
||||||
* We don't want to enable this on all cards, as it adds an extra
|
|
||||||
* instruction per texcoord used. This makes the shader slower and eats
|
|
||||||
* instruction slots which should be available to the Direct3D
|
|
||||||
* application.
|
|
||||||
*
|
|
||||||
* ATI Radeon HD 2xxx cards on macOS have the issue. Instead of checking
|
|
||||||
* for the buggy cards, blacklist all Radeon cards on macOS and whitelist
|
|
||||||
* the good ones. That way we're prepared for the future. If this
|
|
||||||
* workaround is activated on cards that do not need it, it won't break
|
|
||||||
* things, just affect performance negatively. */
|
|
||||||
TRACE("Enabling vertex texture coord fixes in vertex shaders.\n");
|
|
||||||
gl_info->quirks |= WINED3D_QUIRK_SET_TEXCOORD_W;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void quirk_clip_varying(struct wined3d_gl_info *gl_info)
|
static void quirk_clip_varying(struct wined3d_gl_info *gl_info)
|
||||||
{
|
{
|
||||||
gl_info->quirks |= WINED3D_QUIRK_GLSL_CLIP_VARYING;
|
gl_info->quirks |= WINED3D_QUIRK_GLSL_CLIP_VARYING;
|
||||||
|
@ -1105,16 +1064,6 @@ static void fixup_extensions(struct wined3d_gl_info *gl_info, struct wined3d_cap
|
||||||
quirk_no_np2,
|
quirk_no_np2,
|
||||||
"Geforce 5 NP2 disable"
|
"Geforce 5 NP2 disable"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
match_apple_intel,
|
|
||||||
quirk_texcoord_w,
|
|
||||||
"Init texcoord .w for Apple Intel GPU driver"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
match_apple_nonr500ati,
|
|
||||||
quirk_texcoord_w,
|
|
||||||
"Init texcoord .w for Apple ATI >= r600 GPU driver"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
match_dx10_capable,
|
match_dx10_capable,
|
||||||
quirk_clip_varying,
|
quirk_clip_varying,
|
||||||
|
|
|
@ -332,7 +332,6 @@ static BOOL need_helper_const(const struct arb_vshader_private *shader_data,
|
||||||
if (need_rel_addr_const(shader_data, reg_maps, gl_info)) return TRUE;
|
if (need_rel_addr_const(shader_data, reg_maps, gl_info)) return TRUE;
|
||||||
if (!gl_info->supported[NV_VERTEX_PROGRAM]) return TRUE; /* Need to init colors. */
|
if (!gl_info->supported[NV_VERTEX_PROGRAM]) return TRUE; /* Need to init colors. */
|
||||||
if (gl_info->quirks & WINED3D_QUIRK_ARB_VS_OFFSET_LIMIT) return TRUE; /* Load the immval offset. */
|
if (gl_info->quirks & WINED3D_QUIRK_ARB_VS_OFFSET_LIMIT) return TRUE; /* Load the immval offset. */
|
||||||
if (gl_info->quirks & WINED3D_QUIRK_SET_TEXCOORD_W) return TRUE; /* Have to init texcoords. */
|
|
||||||
if (!use_nv_clip(gl_info)) return TRUE; /* Init the clip texcoord */
|
if (!use_nv_clip(gl_info)) return TRUE; /* Init the clip texcoord */
|
||||||
if (reg_maps->usesnrm) return TRUE; /* 0.0 */
|
if (reg_maps->usesnrm) return TRUE; /* 0.0 */
|
||||||
if (reg_maps->usespow) return TRUE; /* EPS, 0.0 and 1.0 */
|
if (reg_maps->usespow) return TRUE; /* EPS, 0.0 and 1.0 */
|
||||||
|
@ -4106,7 +4105,6 @@ static GLuint shader_arb_generate_vshader(const struct wined3d_shader *shader,
|
||||||
{
|
{
|
||||||
const struct arb_vshader_private *shader_data = shader->backend_data;
|
const struct arb_vshader_private *shader_data = shader->backend_data;
|
||||||
const struct wined3d_shader_reg_maps *reg_maps = &shader->reg_maps;
|
const struct wined3d_shader_reg_maps *reg_maps = &shader->reg_maps;
|
||||||
struct shader_arb_priv *priv = shader->device->shader_priv;
|
|
||||||
GLuint ret;
|
GLuint ret;
|
||||||
DWORD next_local = 0;
|
DWORD next_local = 0;
|
||||||
struct shader_arb_ctx_priv priv_ctx;
|
struct shader_arb_ctx_priv priv_ctx;
|
||||||
|
@ -4201,17 +4199,6 @@ static GLuint shader_arb_generate_vshader(const struct wined3d_shader *shader,
|
||||||
{
|
{
|
||||||
const char *color_init = arb_get_helper_value(WINED3D_SHADER_TYPE_VERTEX, ARB_0001);
|
const char *color_init = arb_get_helper_value(WINED3D_SHADER_TYPE_VERTEX, ARB_0001);
|
||||||
shader_addline(buffer, "MOV result.color.secondary, %s;\n", color_init);
|
shader_addline(buffer, "MOV result.color.secondary, %s;\n", color_init);
|
||||||
|
|
||||||
if (gl_info->quirks & WINED3D_QUIRK_SET_TEXCOORD_W && !priv->ffp_proj_control)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
const char *one = arb_get_helper_value(WINED3D_SHADER_TYPE_VERTEX, ARB_ONE);
|
|
||||||
for(i = 0; i < MAX_REG_TEXCRD; i++)
|
|
||||||
{
|
|
||||||
if (reg_maps->u.texcoord_mask[i] && reg_maps->u.texcoord_mask[i] != WINED3DSP_WRITEMASK_ALL)
|
|
||||||
shader_addline(buffer, "MOV result.texcoord[%u].w, %s\n", i, one);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The shader starts with the main function */
|
/* The shader starts with the main function */
|
||||||
|
|
|
@ -64,7 +64,6 @@
|
||||||
|
|
||||||
/* Driver quirks */
|
/* Driver quirks */
|
||||||
#define WINED3D_QUIRK_ARB_VS_OFFSET_LIMIT 0x00000001
|
#define WINED3D_QUIRK_ARB_VS_OFFSET_LIMIT 0x00000001
|
||||||
#define WINED3D_QUIRK_SET_TEXCOORD_W 0x00000002
|
|
||||||
#define WINED3D_QUIRK_GLSL_CLIP_VARYING 0x00000004
|
#define WINED3D_QUIRK_GLSL_CLIP_VARYING 0x00000004
|
||||||
#define WINED3D_QUIRK_ALLOWS_SPECULAR_ALPHA 0x00000008
|
#define WINED3D_QUIRK_ALLOWS_SPECULAR_ALPHA 0x00000008
|
||||||
#define WINED3D_QUIRK_NV_CLIP_BROKEN 0x00000010
|
#define WINED3D_QUIRK_NV_CLIP_BROKEN 0x00000010
|
||||||
|
|
Loading…
Reference in New Issue