[PATCH 4/6] wined3d: Create texture views for shader resource views.

Henri Verbeet hverbeet at gmail.com
Mon Jun 6 07:59:59 CDT 2016


On 6 June 2016 at 11:39, Józef Kucia <jkucia at codeweavers.com> wrote:
> +static BOOL gl_internal_format_equal(const struct wined3d_format *format1,
> +        const struct wined3d_format *format2)
> +{
> +    return format1->id == format2->id
> +            || (format1->glInternal == format2->glInternal
> +            && format1->glGammaInternal == format2->glGammaInternal
> +            && format1->rtInternal == format2->rtInternal);
> +}
When would you use this? I was under the impression that Direct3D
views were a bit more restricted then OpenGL views and only work
between formats based on the same typeless format.

> +static void wined3d_shader_resource_view_create_texture_view(struct wined3d_shader_resource_view *view,
> +        const struct wined3d_shader_resource_view_desc *desc, const struct wined3d_format *view_format,
> +        struct wined3d_texture *texture)
> +{
> +    struct wined3d_context *context = context_acquire(texture->resource.device, NULL);
> +    const struct wined3d_gl_info *gl_info = context->gl_info;
> +    struct gl_texture *gl_texture;
This is fairly minor, but context_acquire() potentially does real
work. It seems somewhat inappropriate to "hide" it in the
declarations.



More information about the wine-devel mailing list