"Pohjolainen, Topi" <topi.pohjolai...@intel.com> writes: > Oh, I didn't realize that. Should we fix and put this into > _mesa_meta_begin/_mesa_meta_end instead?
Yes, perhaps that would be a good idea. I will try writing a separate patch for that. Thinking about it a bit more I also realised I'm not handling sRGB textures correctly. I need to ensure that GL_FRAMEBUFFER_SRGB is disabled otherwise it will apply the sRGB conversion when doing the clear. I also now realise that _mesa_unpack_uint_rgba_row unapplies the sRGB conversion. I am using that to calculate the value to give to glClearColor so I need to stop it from doing that too. I was wondering whether we should also ensure that GL_DITHER is disabled because it affects glClear. For example if we were rendering to a 16-bit texture with a clear color that is in-between values we would want it to pick a single value for all the texels instead of dithering. However in practice I don't think this matters because the clear value is first converted to the same format as the texture before being passed to the driver so it should be impossible to end up with a clear value that would cause dithering. It might be nice to disable it anyway though just to be on the safe side. Regards, - Neil _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev