From fa3a72c63a4435e015baa706cc7150a8224c2997 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Thu, 2 Sep 2010 19:25:03 +0200 Subject: [PATCH] wined3d: Add a handler for WINED3DRS_SRGBWRITEENABLE to the atifs fragment pipe. --- dlls/wined3d/ati_fragment_shader.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dlls/wined3d/ati_fragment_shader.c b/dlls/wined3d/ati_fragment_shader.c index 993ece0be8d..5aaac3bd720 100644 --- a/dlls/wined3d/ati_fragment_shader.c +++ b/dlls/wined3d/ati_fragment_shader.c @@ -912,6 +912,12 @@ static void atifs_apply_pixelshader(DWORD state, IWineD3DStateBlockImpl *statebl } } +static void atifs_srgbwriteenable(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) +{ + if (stateblock->renderState[WINED3DRS_SRGBWRITEENABLE]) + WARN("sRGB writes are not supported by this fragment pipe.\n"); +} + static const struct StateEntryTemplate atifs_fragmentstate_template[] = { {STATE_RENDER(WINED3DRS_TEXTUREFACTOR), { STATE_RENDER(WINED3DRS_TEXTUREFACTOR), state_texfactor_atifs }, WINED3D_GL_EXT_NONE }, {STATE_RENDER(WINED3DRS_FOGCOLOR), { STATE_RENDER(WINED3DRS_FOGCOLOR), state_fogcolor }, WINED3D_GL_EXT_NONE }, @@ -921,6 +927,7 @@ static const struct StateEntryTemplate atifs_fragmentstate_template[] = { {STATE_RENDER(WINED3DRS_FOGVERTEXMODE), { STATE_RENDER(WINED3DRS_FOGENABLE), NULL }, WINED3D_GL_EXT_NONE }, {STATE_RENDER(WINED3DRS_FOGSTART), { STATE_RENDER(WINED3DRS_FOGSTART), state_fogstartend }, WINED3D_GL_EXT_NONE }, {STATE_RENDER(WINED3DRS_FOGEND), { STATE_RENDER(WINED3DRS_FOGSTART), NULL }, WINED3D_GL_EXT_NONE }, + {STATE_RENDER(WINED3DRS_SRGBWRITEENABLE), { STATE_RENDER(WINED3DRS_SRGBWRITEENABLE), atifs_srgbwriteenable }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(0, WINED3DTSS_COLOROP), { STATE_TEXTURESTAGE(0, WINED3DTSS_COLOROP), set_tex_op_atifs }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(0, WINED3DTSS_COLORARG1), { STATE_TEXTURESTAGE(0, WINED3DTSS_COLOROP), NULL }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(0, WINED3DTSS_COLORARG2), { STATE_TEXTURESTAGE(0, WINED3DTSS_COLOROP), NULL }, WINED3D_GL_EXT_NONE },