Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- v2: Move setting feature_level to the end of d3d_info initialization, pass a struct wined3d_d3d_limits around instead of the whole d3d_info.
dlls/d3d9/device.c | 4 ++-- dlls/wined3d/adapter_gl.c | 20 +++++++++++++++----- dlls/wined3d/directx.c | 10 +++++----- dlls/wined3d/shader.c | 4 ++-- dlls/wined3d/utils.c | 4 ++-- include/wine/wined3d.h | 4 ++-- 6 files changed, 28 insertions(+), 18 deletions(-)
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index bef01a477f9..9fbdcebf075 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -4443,8 +4443,8 @@ HRESULT device_init(struct d3d9_device *device, struct d3d9 *parent, struct wine
static const enum wined3d_feature_level feature_levels[] = { - WINED3D_FEATURE_LEVEL_9_SM3, - WINED3D_FEATURE_LEVEL_9_SM2, + WINED3D_FEATURE_LEVEL_9_3, + WINED3D_FEATURE_LEVEL_9_2, WINED3D_FEATURE_LEVEL_9_1, WINED3D_FEATURE_LEVEL_8, WINED3D_FEATURE_LEVEL_7, diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index 5524f948c62..818fa8407aa 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -1241,7 +1241,8 @@ static enum wined3d_pci_vendor wined3d_guess_card_vendor(const char *gl_vendor_s }
static enum wined3d_feature_level feature_level_from_caps(const struct wined3d_gl_info *gl_info, - const struct shader_caps *shader_caps, const struct fragment_caps *fragment_caps) + const struct wined3d_d3d_limits *d3d_limits, const struct shader_caps *shader_caps, + const struct fragment_caps *fragment_caps) { unsigned int shader_model;
@@ -1267,10 +1268,18 @@ static enum wined3d_feature_level feature_level_from_caps(const struct wined3d_g } }
- if (shader_model >= 3) - return WINED3D_FEATURE_LEVEL_9_SM3; + if (shader_model >= 3 && d3d_limits->texture_size >= 4096 && d3d_limits->max_rt_count >= 4) + return WINED3D_FEATURE_LEVEL_9_3; if (shader_model >= 2) - return WINED3D_FEATURE_LEVEL_9_SM2; + { + if (gl_info->supported[ARB_OCCLUSION_QUERY] + && gl_info->supported[ARB_TEXTURE_MIRROR_CLAMP_TO_EDGE] + && gl_info->supported[EXT_BLEND_EQUATION_SEPARATE] + && gl_info->supported[EXT_BLEND_FUNC_SEPARATE]) + return WINED3D_FEATURE_LEVEL_9_2; + + return WINED3D_FEATURE_LEVEL_9_1; + } if (shader_model >= 1) return WINED3D_FEATURE_LEVEL_8;
@@ -3722,7 +3731,6 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter, d3d_info->limits.ffp_textures = fragment_caps.MaxSimultaneousTextures; d3d_info->shader_color_key = !!(fragment_caps.wined3d_caps & WINED3D_FRAGMENT_CAP_COLOR_KEY); d3d_info->wined3d_creation_flags = wined3d_creation_flags; - d3d_info->feature_level = feature_level_from_caps(gl_info, &shader_caps, &fragment_caps);
d3d_info->texture_npot = !!gl_info->supported[ARB_TEXTURE_NON_POWER_OF_TWO]; d3d_info->texture_npot_conditional = gl_info->supported[WINED3D_GL_NORMALIZED_TEXRECT] @@ -3737,6 +3745,8 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter, else d3d_info->multisample_draw_location = WINED3D_LOCATION_RB_MULTISAMPLE;
+ d3d_info->feature_level = feature_level_from_caps(gl_info, &d3d_info->limits, &shader_caps, &fragment_caps); + TRACE("Max texture stages: %u.\n", d3d_info->limits.ffp_blend_stages);
if (!d3d_info->shader_color_key) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 12c83bb2cd9..39dd13a9292 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -691,8 +691,8 @@ enum wined3d_pci_device wined3d_gpu_from_feature_level(enum wined3d_pci_vendor * {WINED3D_FEATURE_LEVEL_6, CARD_NVIDIA_RIVA_TNT}, {WINED3D_FEATURE_LEVEL_7, CARD_NVIDIA_GEFORCE}, {WINED3D_FEATURE_LEVEL_8, CARD_NVIDIA_GEFORCE3}, - {WINED3D_FEATURE_LEVEL_9_SM2, CARD_NVIDIA_GEFORCEFX_5800}, - {WINED3D_FEATURE_LEVEL_9_SM3, CARD_NVIDIA_GEFORCE_6800}, + {WINED3D_FEATURE_LEVEL_9_2, CARD_NVIDIA_GEFORCEFX_5800}, + {WINED3D_FEATURE_LEVEL_9_3, CARD_NVIDIA_GEFORCE_6800}, {WINED3D_FEATURE_LEVEL_10, CARD_NVIDIA_GEFORCE_8800GTX}, {WINED3D_FEATURE_LEVEL_11, CARD_NVIDIA_GEFORCE_GTX470}, {WINED3D_FEATURE_LEVEL_NONE}, @@ -702,8 +702,8 @@ enum wined3d_pci_device wined3d_gpu_from_feature_level(enum wined3d_pci_vendor * {WINED3D_FEATURE_LEVEL_5, CARD_AMD_RAGE_128PRO}, {WINED3D_FEATURE_LEVEL_7, CARD_AMD_RADEON_7200}, {WINED3D_FEATURE_LEVEL_8, CARD_AMD_RADEON_8500}, - {WINED3D_FEATURE_LEVEL_9_SM2, CARD_AMD_RADEON_9500}, - {WINED3D_FEATURE_LEVEL_9_SM3, CARD_AMD_RADEON_X1600}, + {WINED3D_FEATURE_LEVEL_9_1, CARD_AMD_RADEON_9500}, + {WINED3D_FEATURE_LEVEL_9_3, CARD_AMD_RADEON_X1600}, {WINED3D_FEATURE_LEVEL_10, CARD_AMD_RADEON_HD2900}, {WINED3D_FEATURE_LEVEL_11, CARD_AMD_RADEON_HD5600}, {WINED3D_FEATURE_LEVEL_NONE}, @@ -712,7 +712,7 @@ enum wined3d_pci_device wined3d_gpu_from_feature_level(enum wined3d_pci_vendor * { {WINED3D_FEATURE_LEVEL_5, CARD_INTEL_845G}, {WINED3D_FEATURE_LEVEL_8, CARD_INTEL_915G}, - {WINED3D_FEATURE_LEVEL_9_SM3, CARD_INTEL_945G}, + {WINED3D_FEATURE_LEVEL_9_3, CARD_INTEL_945G}, {WINED3D_FEATURE_LEVEL_10, CARD_INTEL_G45}, {WINED3D_FEATURE_LEVEL_11, CARD_INTEL_IVBD}, {WINED3D_FEATURE_LEVEL_NONE}, diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c index 609b574d461..a8fee07c6c3 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -3311,9 +3311,9 @@ static unsigned int shader_max_version_from_feature_level(enum wined3d_feature_l case WINED3D_FEATURE_LEVEL_10_1: case WINED3D_FEATURE_LEVEL_10: return 4; - case WINED3D_FEATURE_LEVEL_9_SM3: + case WINED3D_FEATURE_LEVEL_9_3: return 3; - case WINED3D_FEATURE_LEVEL_9_SM2: + case WINED3D_FEATURE_LEVEL_9_2: case WINED3D_FEATURE_LEVEL_9_1: return 2; default: diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index ef469100fdc..6a880bb2d70 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -6573,8 +6573,8 @@ const char *wined3d_debug_feature_level(enum wined3d_feature_level level) LEVEL_TO_STR(WINED3D_FEATURE_LEVEL_7); LEVEL_TO_STR(WINED3D_FEATURE_LEVEL_8); LEVEL_TO_STR(WINED3D_FEATURE_LEVEL_9_1); - LEVEL_TO_STR(WINED3D_FEATURE_LEVEL_9_SM2); - LEVEL_TO_STR(WINED3D_FEATURE_LEVEL_9_SM3); + LEVEL_TO_STR(WINED3D_FEATURE_LEVEL_9_2); + LEVEL_TO_STR(WINED3D_FEATURE_LEVEL_9_3); LEVEL_TO_STR(WINED3D_FEATURE_LEVEL_10); LEVEL_TO_STR(WINED3D_FEATURE_LEVEL_10_1); LEVEL_TO_STR(WINED3D_FEATURE_LEVEL_11); diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 958ade166c0..31afa46623f 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -96,8 +96,8 @@ enum wined3d_feature_level WINED3D_FEATURE_LEVEL_7 = 0x7000, WINED3D_FEATURE_LEVEL_8 = 0x8000, WINED3D_FEATURE_LEVEL_9_1 = 0x9100, - WINED3D_FEATURE_LEVEL_9_SM2 = 0x9200, - WINED3D_FEATURE_LEVEL_9_SM3 = 0x9300, + WINED3D_FEATURE_LEVEL_9_2 = 0x9200, + WINED3D_FEATURE_LEVEL_9_3 = 0x9300, WINED3D_FEATURE_LEVEL_10 = 0xa000, WINED3D_FEATURE_LEVEL_10_1 = 0xa100, WINED3D_FEATURE_LEVEL_11 = 0xb000,
Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- Preparation to removing WINED3DPRASTERCAPS_ZBIAS.
dlls/d3d8/device.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 974764cdf51..e57e01e42ba 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -389,10 +389,12 @@ void d3dcaps_from_wined3dcaps(D3DCAPS8 *caps, const struct wined3d_caps *wined3d | D3DPMISCCAPS_NULLREFERENCE; caps->RasterCaps &= D3DPRASTERCAPS_DITHER | D3DPRASTERCAPS_PAT | D3DPRASTERCAPS_ZTEST | D3DPRASTERCAPS_FOGVERTEX | D3DPRASTERCAPS_FOGTABLE | D3DPRASTERCAPS_ANTIALIASEDGES - | D3DPRASTERCAPS_MIPMAPLODBIAS | D3DPRASTERCAPS_ZBIAS | D3DPRASTERCAPS_ZBUFFERLESSHSR + | D3DPRASTERCAPS_MIPMAPLODBIAS | D3DPRASTERCAPS_ZBUFFERLESSHSR | D3DPRASTERCAPS_FOGRANGE | D3DPRASTERCAPS_ANISOTROPY | D3DPRASTERCAPS_WBUFFER | D3DPRASTERCAPS_WFOG | D3DPRASTERCAPS_ZFOG | D3DPRASTERCAPS_COLORPERSPECTIVE - | D3DPRASTERCAPS_STRETCHBLTMULTISAMPLE; + | D3DPRASTERCAPS_STRETCHBLTMULTISAMPLE | WINED3DPRASTERCAPS_DEPTHBIAS; + if (caps->RasterCaps & WINED3DPRASTERCAPS_DEPTHBIAS) + caps->RasterCaps = (caps->RasterCaps | D3DPRASTERCAPS_ZBIAS) & ~WINED3DPRASTERCAPS_DEPTHBIAS; caps->SrcBlendCaps &= D3DPBLENDCAPS_ZERO | D3DPBLENDCAPS_ONE | D3DPBLENDCAPS_SRCCOLOR | D3DPBLENDCAPS_INVSRCCOLOR | D3DPBLENDCAPS_SRCALPHA | D3DPBLENDCAPS_INVSRCALPHA | D3DPBLENDCAPS_DESTALPHA | D3DPBLENDCAPS_INVDESTALPHA | D3DPBLENDCAPS_DESTCOLOR
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=52544
Your paranoid android.
=== debian9 (32 bit WoW report) ===
d3d9: d3d9ex.c:3133: Test failed: Expected message 0x46 for window 0x1, but didn't receive it, i=0.
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- dlls/ddraw/ddraw.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c index b005f10826d..04a94b6978f 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c @@ -1326,10 +1326,13 @@ HRESULT ddraw_get_d3dcaps(const struct ddraw *ddraw, D3DDEVICEDESC7 *caps) D3DPRASTERCAPS_PAT | D3DPRASTERCAPS_ZTEST | D3DPRASTERCAPS_SUBPIXEL | D3DPRASTERCAPS_SUBPIXELX | D3DPRASTERCAPS_FOGVERTEX | D3DPRASTERCAPS_FOGTABLE | D3DPRASTERCAPS_STIPPLE | D3DPRASTERCAPS_ANTIALIASSORTDEPENDENT | D3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT | - D3DPRASTERCAPS_ANTIALIASEDGES | D3DPRASTERCAPS_MIPMAPLODBIAS | D3DPRASTERCAPS_ZBIAS | + D3DPRASTERCAPS_ANTIALIASEDGES | D3DPRASTERCAPS_MIPMAPLODBIAS | D3DPRASTERCAPS_ZBUFFERLESSHSR | D3DPRASTERCAPS_FOGRANGE | D3DPRASTERCAPS_ANISOTROPY | D3DPRASTERCAPS_WBUFFER | D3DPRASTERCAPS_TRANSLUCENTSORTINDEPENDENT | D3DPRASTERCAPS_WFOG | - D3DPRASTERCAPS_ZFOG); + D3DPRASTERCAPS_ZFOG | WINED3DPRASTERCAPS_DEPTHBIAS); + if (caps->dpcLineCaps.dwRasterCaps & WINED3DPRASTERCAPS_DEPTHBIAS) + caps->dpcLineCaps.dwRasterCaps = (caps->dpcLineCaps.dwRasterCaps | D3DPRASTERCAPS_ZBIAS) + & ~WINED3DPRASTERCAPS_DEPTHBIAS;
caps->dpcLineCaps.dwZCmpCaps &= ( D3DPCMPCAPS_NEVER | D3DPCMPCAPS_LESS | D3DPCMPCAPS_EQUAL |
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=52545
Your paranoid android.
=== debian9 (32 bit WoW report) ===
d3d9: d3d9ex.c:3133: Test failed: Expected message 0x46 for window 0x1, but didn't receive it, i=0.
=== debian9 (64 bit WoW report) ===
d3d9: d3d9ex.c:3133: Test failed: Expected message 0x46 for window 0x1, but didn't receive it, i=0.
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- dlls/wined3d/adapter_gl.c | 3 +-- dlls/wined3d/adapter_vk.c | 2 +- include/wine/wined3d.h | 1 - 3 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index 818fa8407aa..d471785d8d8 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -4360,8 +4360,7 @@ static void adapter_gl_get_wined3d_caps(const struct wined3d_adapter *adapter, s
if (gl_info->supported[ARB_TEXTURE_FILTER_ANISOTROPIC]) { - caps->RasterCaps |= WINED3DPRASTERCAPS_ANISOTROPY - | WINED3DPRASTERCAPS_ZBIAS; + caps->RasterCaps |= WINED3DPRASTERCAPS_ANISOTROPY;
caps->TextureFilterCaps |= WINED3DPTFILTERCAPS_MAGFANISOTROPIC | WINED3DPTFILTERCAPS_MINFANISOTROPIC; diff --git a/dlls/wined3d/adapter_vk.c b/dlls/wined3d/adapter_vk.c index 57235bb2b58..e0fd68fa9cb 100644 --- a/dlls/wined3d/adapter_vk.c +++ b/dlls/wined3d/adapter_vk.c @@ -337,7 +337,7 @@ static void adapter_vk_get_wined3d_caps(const struct wined3d_adapter *adapter, s | WINED3DPMISCCAPS_INDEPENDENTWRITEMASKS | WINED3DPMISCCAPS_POSTBLENDSRGBCONVERT;
- caps->RasterCaps |= WINED3DPRASTERCAPS_ZBIAS | WINED3DPRASTERCAPS_MIPMAPLODBIAS; + caps->RasterCaps |= WINED3DPRASTERCAPS_MIPMAPLODBIAS;
if (sampler_anisotropy) { diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 31afa46623f..ada56365505 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -1210,7 +1210,6 @@ enum wined3d_shader_type #define WINED3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT 0x00000800 #define WINED3DPRASTERCAPS_ANTIALIASEDGES 0x00001000 #define WINED3DPRASTERCAPS_MIPMAPLODBIAS 0x00002000 -#define WINED3DPRASTERCAPS_ZBIAS 0x00004000 #define WINED3DPRASTERCAPS_ZBUFFERLESSHSR 0x00008000 #define WINED3DPRASTERCAPS_FOGRANGE 0x00010000 #define WINED3DPRASTERCAPS_ANISOTROPY 0x00020000
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=52546
Your paranoid android.
=== debian9 (32 bit report) ===
d3d8: device.c:3165: Test failed: Expected message 0x1c for window 0x1, but didn't receive it
=== debian9 (32 bit WoW report) ===
d3d9: d3d9ex.c:3133: Test failed: Expected message 0x46 for window 0x1, but didn't receive it, i=0.
=== debian9 (64 bit WoW report) ===
ddraw: ddraw4.c:2942: Test failed: Expected message 0x46, but didn't receive it. ddraw4.c:2944: Test failed: Expected screen size 1920x1200, got 0x0. ddraw4.c:2949: Test failed: Expected (0,0)-(1920,1200), got (0,0)-(1920,1080).
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- Might help with bug 47010.
dlls/wined3d/adapter_gl.c | 55 ++++++++++++++++++++++++++++++++++ dlls/wined3d/adapter_vk.c | 5 ++-- dlls/wined3d/directx.c | 1 - dlls/wined3d/wined3d_private.h | 1 + 4 files changed, 59 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index d471785d8d8..110771f8ea9 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -834,6 +834,49 @@ static BOOL match_broken_viewport_subpixel_bits(const struct wined3d_gl_info *gl return !wined3d_caps_gl_ctx_test_viewport_subpixel_bits(ctx); }
+static BOOL match_no_independent_bit_depths(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) +{ + GLuint tex[2], fbo; + GLenum status; + + /* ARB_framebuffer_object allows implementation-dependent internal format + * restrictions. The EXT extension explicitly calls out an error in the + * relevant case. */ + if (!gl_info->supported[ARB_FRAMEBUFFER_OBJECT]) + return TRUE; + if (wined3d_settings.offscreen_rendering_mode != ORM_FBO) + return TRUE; + + gl_info->gl_ops.gl.p_glGenTextures(2, tex); + + gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D, tex[0]); + gl_info->gl_ops.gl.p_glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + gl_info->gl_ops.gl.p_glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + gl_info->gl_ops.gl.p_glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 4, 1, 0, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, NULL); + + gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D, tex[1]); + gl_info->gl_ops.gl.p_glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + gl_info->gl_ops.gl.p_glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + gl_info->gl_ops.gl.p_glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB5, 4, 1, 0, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, NULL); + gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D, 0); + + gl_info->fbo_ops.glGenFramebuffers(1, &fbo); + gl_info->fbo_ops.glBindFramebuffer(GL_DRAW_FRAMEBUFFER, fbo); + gl_info->fbo_ops.glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, tex[0], 0); + gl_info->fbo_ops.glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT1, GL_TEXTURE_2D, tex[1], 0); + + status = gl_info->fbo_ops.glCheckFramebufferStatus(GL_DRAW_FRAMEBUFFER); + + gl_info->fbo_ops.glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); + gl_info->fbo_ops.glDeleteFramebuffers(1, &fbo); + gl_info->gl_ops.gl.p_glDeleteTextures(2, tex); + checkGLcall("testing multiple framebuffer attachments with different bit depths"); + + return status != GL_FRAMEBUFFER_COMPLETE; +} + static void quirk_apple_glsl_constants(struct wined3d_gl_info *gl_info) { /* MacOS needs uniforms for relative addressing offsets. This can @@ -988,6 +1031,11 @@ static void quirk_broken_viewport_subpixel_bits(struct wined3d_gl_info *gl_info) } }
+static void quirk_no_independent_bit_depths(struct wined3d_gl_info *gl_info) +{ + gl_info->quirks |= WINED3D_QUIRK_NO_INDEPENDENT_BIT_DEPTHS; +} + static const struct wined3d_gpu_description *query_gpu_description(const struct wined3d_gl_info *gl_info, UINT64 *vram_bytes) { @@ -1119,6 +1167,11 @@ static void fixup_extensions(struct wined3d_gl_info *gl_info, struct wined3d_cap quirk_broken_viewport_subpixel_bits, "NVIDIA viewport subpixel bits bug" }, + { + match_no_independent_bit_depths, + quirk_no_independent_bit_depths, + "No support for MRT with independent bit depths" + }, };
for (i = 0; i < ARRAY_SIZE(quirk_table); ++i) @@ -4354,6 +4407,8 @@ static void adapter_gl_get_wined3d_caps(const struct wined3d_adapter *adapter, s caps->PrimitiveMiscCaps |= WINED3DPMISCCAPS_INDEPENDENTWRITEMASKS; if (gl_info->supported[ARB_FRAMEBUFFER_SRGB]) caps->PrimitiveMiscCaps |= WINED3DPMISCCAPS_POSTBLENDSRGBCONVERT; + if (~gl_info->quirks & WINED3D_QUIRK_NO_INDEPENDENT_BIT_DEPTHS) + caps->PrimitiveMiscCaps |= WINED3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS;
if (gl_info->supported[ARB_SAMPLER_OBJECTS] || gl_info->supported[EXT_TEXTURE_LOD_BIAS]) caps->RasterCaps |= WINED3DPRASTERCAPS_MIPMAPLODBIAS; diff --git a/dlls/wined3d/adapter_vk.c b/dlls/wined3d/adapter_vk.c index e0fd68fa9cb..b944b2fb32a 100644 --- a/dlls/wined3d/adapter_vk.c +++ b/dlls/wined3d/adapter_vk.c @@ -333,9 +333,10 @@ static void adapter_vk_get_wined3d_caps(const struct wined3d_adapter *adapter, s caps->Caps2 |= WINED3DCAPS2_CANGENMIPMAP;
caps->PrimitiveMiscCaps |= WINED3DPMISCCAPS_BLENDOP - | WINED3DPMISCCAPS_SEPARATEALPHABLEND | WINED3DPMISCCAPS_INDEPENDENTWRITEMASKS - | WINED3DPMISCCAPS_POSTBLENDSRGBCONVERT; + | WINED3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS + | WINED3DPMISCCAPS_POSTBLENDSRGBCONVERT + | WINED3DPMISCCAPS_SEPARATEALPHABLEND;
caps->RasterCaps |= WINED3DPRASTERCAPS_MIPMAPLODBIAS;
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 39dd13a9292..49fa3a35f74 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -1826,7 +1826,6 @@ HRESULT CDECL wined3d_get_device_caps(const struct wined3d *wined3d, unsigned in /* TODO: WINED3DPMISCCAPS_NULLREFERENCE WINED3DPMISCCAPS_FOGANDSPECULARALPHA - WINED3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS WINED3DPMISCCAPS_FOGVERTEXCLAMPED */
caps->RasterCaps = WINED3DPRASTERCAPS_DITHER | diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 0fc56462b0c..8451e9c2892 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -72,6 +72,7 @@ #define WINED3D_QUIRK_INFO_LOG_SPAM 0x00000080 #define WINED3D_QUIRK_LIMITED_TEX_FILTERING 0x00000100 #define WINED3D_QUIRK_BROKEN_ARB_FOG 0x00000200 +#define WINED3D_QUIRK_NO_INDEPENDENT_BIT_DEPTHS 0x00000400
struct fragment_pipeline; struct wined3d_adapter;
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=52547
Your paranoid android.
=== debian9 (32 bit report) ===
d3d8: device.c:3165: Test failed: Expected message 0x1c for window 0x1, but didn't receive it
=== debian9 (32 bit WoW report) ===
d3d9: d3d9ex.c:3133: Test failed: Expected message 0x46 for window 0x1, but didn't receive it, i=0.
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=52543
Your paranoid android.
=== debian9 (64 bit WoW report) ===
d3d9: d3d9ex.c:3133: Test failed: Expected message 0x46 for window 0x1, but didn't receive it, i=0.