Module: wine
Branch: master
Commit: 5f2c6b3c8289bb71ad3baf62c66b56b776adb671
URL: http://source.winehq.org/git/wine.git/?a=commit;h=5f2c6b3c8289bb71ad3baf62c…
Author: Matteo Bruni <mbruni(a)codeweavers.com>
Date: Tue Oct 25 16:58:45 2011 +0200
wined3d: Enable SM4 support in the GLSL shader backend when possible.
---
dlls/wined3d/directx.c | 4 ++--
dlls/wined3d/glsl_shader.c | 8 +++++++-
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 5d6eef9..f6228eb 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -4750,7 +4750,7 @@ HRESULT CDECL wined3d_get_device_caps(const struct wined3d *wined3d, UINT adapte
* are the same among all shader models. So to avoid code duplication set the shader version
* specific, but otherwise constant caps here
*/
- if (caps->VertexShaderVersion == 3)
+ if (caps->VertexShaderVersion >= 3)
{
/* Where possible set the caps based on OpenGL extensions and if they
* aren't set (in case of software rendering) use the VS 3.0 from
@@ -4787,7 +4787,7 @@ HRESULT CDECL wined3d_get_device_caps(const struct wined3d *wined3d, UINT adapte
caps->MaxVertexShader30InstructionSlots = 0;
}
- if (caps->PixelShaderVersion == 3)
+ if (caps->PixelShaderVersion >= 3)
{
/* Where possible set the caps based on OpenGL extensions and if they
* aren't set (in case of software rendering) use the PS 3.0 from
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 3092ce3..2c7cfe9 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -4913,9 +4913,15 @@ static void shader_glsl_context_destroyed(void *shader_priv, const struct wined3
static void shader_glsl_get_caps(const struct wined3d_gl_info *gl_info, struct shader_caps *caps)
{
+ if (gl_info->supported[EXT_GPU_SHADER4] && gl_info->supported[ARB_GEOMETRY_SHADER4]
+ && gl_info->glsl_version >= MAKEDWORD_VERSION(1, 50))
+ {
+ caps->VertexShaderVersion = 4;
+ caps->PixelShaderVersion = 4;
+ }
/* ARB_shader_texture_lod or EXT_gpu_shader4 is required for the SM3
* texldd and texldl instructions. */
- if (gl_info->supported[ARB_SHADER_TEXTURE_LOD] || gl_info->supported[EXT_GPU_SHADER4])
+ else if (gl_info->supported[ARB_SHADER_TEXTURE_LOD] || gl_info->supported[EXT_GPU_SHADER4])
{
caps->VertexShaderVersion = 3;
caps->PixelShaderVersion = 3;
Module: wine
Branch: master
Commit: bc3c72f2cc6e71f7f4bcd8fdfc3ea924af3d9a7d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=bc3c72f2cc6e71f7f4bcd8fdf…
Author: Henri Verbeet <hverbeet(a)codeweavers.com>
Date: Tue Oct 25 21:20:25 2011 +0200
wined3d: Mark a format as sRGB attachable if the internal format is the same for RGB and sRGB.
---
dlls/wined3d/utils.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index 9661eb4..f374967 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -1105,6 +1105,8 @@ static void check_fbo_compat(const struct wined3d_gl_info *gl_info, struct wined
WARN("Format %s's sRGB format is not FBO attachable.\n", debug_d3dformat(format->id));
}
}
+ else if (status == GL_FRAMEBUFFER_COMPLETE)
+ format->flags |= WINED3DFMT_FLAG_FBO_ATTACHABLE_SRGB;
glDeleteTextures(1, &tex);