From 50e830bba96c7571cd81f593583e867ffe2a9cf1 Mon Sep 17 00:00:00 2001 From: Gurchetan Singh Date: Fri, 15 Nov 2019 18:08:18 -0800 Subject: [PATCH] vrend: VIRGL_BIND_IMMUTABLE_STORAGE --> VREND_STORAGE_GL_IMMUTABLE This is internal to virglrenderer, so it should probably be here. Reviewed-by: Gert Wollny --- src/virgl_hw.h | 2 -- src/vrend_renderer.c | 4 ++-- src/vrend_renderer.h | 1 + 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/virgl_hw.h b/src/virgl_hw.h index 277877f..44ec63d 100644 --- a/src/virgl_hw.h +++ b/src/virgl_hw.h @@ -417,8 +417,6 @@ enum virgl_formats { #define VIRGL_BIND_LINEAR (1 << 22) -#define VIRGL_BIND_IMMUTABLE_STORAGE (1 << 23) - struct virgl_caps_bool_set1 { unsigned indep_blend_enable:1; unsigned indep_blend_func:1; diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index 5ead607..b8deb0e 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -6407,7 +6407,7 @@ static int vrend_renderer_resource_allocate_texture(struct vrend_resource *gr, format_can_texture_storage = has_feature(feat_texture_storage) && (tex_conv_table[format].flags & VIRGL_TEXTURE_CAN_TEXTURE_STORAGE); if (format_can_texture_storage) - gr->base.bind |= VIRGL_BIND_IMMUTABLE_STORAGE; + gr->storage_bits |= VREND_STORAGE_GL_IMMUTABLE; } gr->target = tgsitargettogltarget(pr->target, pr->nr_samples); @@ -8250,7 +8250,7 @@ static GLuint vrend_make_view(struct vrend_resource *res, enum virgl_formats for GLenum fmt = tex_conv_table[dst_fmt].internalformat; /* If the format doesn't support TextureStorage it is not immutable, so no TextureView*/ - if (!(res->base.bind & VIRGL_BIND_IMMUTABLE_STORAGE)) + if (!has_bit(res->storage_bits, VREND_STORAGE_GL_IMMUTABLE)) return res->id; VREND_DEBUG(dbg_blit, NULL, "Create texture view from %s%s as %s%s\n", diff --git a/src/vrend_renderer.h b/src/vrend_renderer.h index 3d2669d..3ca604e 100644 --- a/src/vrend_renderer.h +++ b/src/vrend_renderer.h @@ -57,6 +57,7 @@ struct vrend_context; #define VREND_STORAGE_EGL_IMAGE BIT(3) #define VREND_STORAGE_GBM_BUFFER BIT(4) #define VREND_STORAGE_HOST_SYSTEM_MEMORY BIT(5) +#define VREND_STORAGE_GL_IMMUTABLE BIT(6) enum { CONTEXT_NONE,