vrend: VIRGL_BIND_IMMUTABLE_STORAGE --> VREND_STORAGE_GL_IMMUTABLE

This is internal to virglrenderer, so it should probably be here.

Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
macos/master
Gurchetan Singh 5 years ago
parent 98d2b366db
commit 50e830bba9
  1. 2
      src/virgl_hw.h
  2. 4
      src/vrend_renderer.c
  3. 1
      src/vrend_renderer.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;

@ -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",

@ -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,

Loading…
Cancel
Save