Signed-off-by: Józef Kucia jkucia@codeweavers.com --- dlls/wined3d/adapter_gl.c | 1 + dlls/wined3d/directx.c | 2 +- dlls/wined3d/wined3d_private.h | 6 +++++- 3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index 8c1cce457ed0..39671f2f30cf 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -3657,6 +3657,7 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter, adapter->vertex_pipe = select_vertex_implementation(gl_info, adapter->shader_backend); adapter->fragment_pipe = select_fragment_implementation(gl_info, adapter->shader_backend);
+ d3d_info->shadow_sampler = gl_info->supported[ARB_SHADOW]; d3d_info->limits.pointsize_max = gl_info->limits.pointsize_max;
adapter->shader_backend->shader_get_caps(gl_info, &shader_caps); diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 774cd48caec6..d2229c20b2eb 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -1607,7 +1607,7 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, UINT ad } else if ((usage & WINED3DUSAGE_DEPTHSTENCIL) && (format->flags[WINED3D_GL_RES_TYPE_TEX_2D] & WINED3DFMT_FLAG_SHADOW) - && !adapter->gl_info.supported[ARB_SHADOW]) + && !adapter->d3d_info.shadow_sampler) { TRACE("[FAILED] - No shadow sampler support.\n"); return WINED3DERR_NOTAVAILABLE; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index de0b4867de79..834ca151cf6a 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -193,7 +193,11 @@ struct wined3d_d3d_info BOOL shader_color_key; DWORD valid_rt_mask; DWORD wined3d_creation_flags; - BOOL shader_double_precision; + + DWORD shadow_sampler : 1; + DWORD shader_double_precision : 1; + DWORD padding : 30; + enum wined3d_feature_level feature_level; };
On 23 August 2018 at 17:04, Józef Kucia jkucia@codeweavers.com wrote:
Signed-off-by: Józef Kucia jkucia@codeweavers.com
dlls/wined3d/adapter_gl.c | 1 + dlls/wined3d/directx.c | 2 +- dlls/wined3d/wined3d_private.h | 6 +++++- 3 files changed, 7 insertions(+), 2 deletions(-)
I'm not necessarily against this, but strictly speaking the "shadow_sampler" field is somewhat superfluous. I think we simply shouldn't be setting the WINED3DFMT_FLAG_TEXTURE flag if ARB_shadow isn't supported, in which case wined3d_check_device_format() could lose the special case.
On Thu, Aug 23, 2018 at 7:42 PM Henri Verbeet hverbeet@gmail.com wrote:
On 23 August 2018 at 17:04, Józef Kucia jkucia@codeweavers.com wrote:
Signed-off-by: Józef Kucia jkucia@codeweavers.com
dlls/wined3d/adapter_gl.c | 1 + dlls/wined3d/directx.c | 2 +- dlls/wined3d/wined3d_private.h | 6 +++++- 3 files changed, 7 insertions(+), 2 deletions(-)
I'm not necessarily against this, but strictly speaking the "shadow_sampler" field is somewhat superfluous. I think we simply shouldn't be setting the WINED3DFMT_FLAG_TEXTURE flag if ARB_shadow isn't supported, in which case wined3d_check_device_format() could lose the special case.
It should be possible to not set the WINED3DFMT_FLAG_TEXTURE flag, but it's a bit more invasive change. I'll take a look.