3/2 wined3d: move palette uploading code over to blit_shader
Henri Verbeet
hverbeet at gmail.com
Wed Mar 3 07:20:04 CST 2010
On 3 March 2010 13:51, Roderick Colenbrander <thunderbird2k at gmail.com> wrote:
> - HRESULT (*set_shader)(IWineD3DDevice *iface, const struct GlPixelFormatDesc *format_desc,
> + HRESULT (*set_shader)(IWineD3DDevice *iface, IWineD3DSurfaceImpl *surface,
> GLenum textype, UINT width, UINT height);
If you're passing the surface, you don't need textype, width and height either.
> +void d3dfmt_p8_init_palette(IWineD3DSurfaceImpl *This, BYTE table[256][4], BOOL colorkey);
This is wined3d internal, it should be DECLSPEC_HIDDEN.
> context = context_acquire(device, NULL, CTXUSAGE_RESOURCELOAD);
> - d3dfmt_p8_upload_palette(iface, convert);
> + IWineD3DSurface_LoadLocation(iface, SFLAG_INDRAWABLE, NULL);
> context_release(context);
LoadLocation() will acquire its own context.
> +static void upload_palette(IWineD3DSurfaceImpl *surface)
>+void d3dfmt_p8_init_palette(IWineD3DSurfaceImpl *This, BYTE table[256][4], BOOL colorkey)
These require an active context, please document that in a comment.
> + glBindTexture(GL_TEXTURE_1D, device->palette_texture);
> +
> + GL_EXTCALL(glActiveTextureARB(GL_TEXTURE1));
Is that right, binding the texture before switching to GL_TEXTURE1?
Also, what happens to any previous textures bound on that unit?
More information about the wine-devel
mailing list