mesa/st: add a flags param to st_texture_create()
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36634>
This commit is contained in:
committed by
Marge Bot
parent
e4e806503f
commit
fe499db5b5
@@ -140,7 +140,7 @@ st_make_bitmap_texture(struct gl_context *ctx, GLsizei width, GLsizei height,
|
||||
* Create texture to hold bitmap pattern.
|
||||
*/
|
||||
pt = st_texture_create(st, st->internal_target, st->bitmap.tex_format,
|
||||
0, width, height, 1, 1, 0,
|
||||
0, width, height, 1, 1, 0, 0,
|
||||
PIPE_BIND_SAMPLER_VIEW, false,
|
||||
PIPE_COMPRESSION_FIXED_RATE_NONE);
|
||||
if (!pt) {
|
||||
@@ -373,7 +373,7 @@ reset_cache(struct st_context *st)
|
||||
cache->texture = st_texture_create(st, st->internal_target,
|
||||
st->bitmap.tex_format, 0,
|
||||
BITMAP_CACHE_WIDTH, BITMAP_CACHE_HEIGHT,
|
||||
1, 1, 0,
|
||||
1, 1, 0, 0,
|
||||
PIPE_BIND_SAMPLER_VIEW,
|
||||
false,
|
||||
PIPE_COMPRESSION_FIXED_RATE_NONE);
|
||||
|
||||
@@ -444,7 +444,7 @@ alloc_texture(struct st_context *st, GLsizei width, GLsizei height,
|
||||
struct pipe_resource *pt;
|
||||
|
||||
pt = st_texture_create(st, st->internal_target, texFormat, 0,
|
||||
width, height, 1, 1, 0, bind, false,
|
||||
width, height, 1, 1, 0, 0, bind, false,
|
||||
PIPE_COMPRESSION_FIXED_RATE_NONE);
|
||||
|
||||
return pt;
|
||||
|
||||
@@ -1155,7 +1155,7 @@ guess_and_alloc_texture(struct st_context *st,
|
||||
ptWidth,
|
||||
ptHeight,
|
||||
ptDepth,
|
||||
ptLayers, nr_samples,
|
||||
ptLayers, nr_samples, 0,
|
||||
bindings,
|
||||
false,
|
||||
PIPE_COMPRESSION_FIXED_RATE_NONE);
|
||||
@@ -1253,7 +1253,7 @@ st_AllocTextureImageBuffer(struct gl_context *ctx,
|
||||
ptWidth,
|
||||
ptHeight,
|
||||
ptDepth,
|
||||
ptLayers, 0,
|
||||
ptLayers, 0, 0,
|
||||
bindings,
|
||||
false,
|
||||
PIPE_COMPRESSION_FIXED_RATE_NONE);
|
||||
@@ -3299,7 +3299,7 @@ st_finalize_texture(struct gl_context *ctx,
|
||||
ptWidth,
|
||||
ptHeight,
|
||||
ptDepth,
|
||||
ptLayers, ptNumSamples,
|
||||
ptLayers, ptNumSamples, 0,
|
||||
bindings,
|
||||
false,
|
||||
PIPE_COMPRESSION_FIXED_RATE_NONE);
|
||||
@@ -3518,7 +3518,7 @@ st_texture_storage(struct gl_context *ctx,
|
||||
ptWidth,
|
||||
ptHeight,
|
||||
ptDepth,
|
||||
ptLayers, num_samples,
|
||||
ptLayers, num_samples, 0,
|
||||
bindings,
|
||||
texObj->IsSparse,
|
||||
rate);
|
||||
|
||||
@@ -291,7 +291,7 @@ cs_encode_bc1(struct st_context *st,
|
||||
struct pipe_resource *bc1_tex =
|
||||
st_texture_create(st, PIPE_TEXTURE_2D, PIPE_FORMAT_R32G32_UINT, 0,
|
||||
DIV_ROUND_UP(rgba8_tex->width0, 4),
|
||||
DIV_ROUND_UP(rgba8_tex->height0, 4), 1, 1, 0,
|
||||
DIV_ROUND_UP(rgba8_tex->height0, 4), 1, 1, 0, 0,
|
||||
PIPE_BIND_SHADER_IMAGE |
|
||||
PIPE_BIND_SAMPLER_VIEW, false,
|
||||
PIPE_COMPRESSION_FIXED_RATE_NONE);
|
||||
@@ -352,7 +352,7 @@ cs_encode_bc4(struct st_context *st,
|
||||
struct pipe_resource *bc4_tex =
|
||||
st_texture_create(st, PIPE_TEXTURE_2D, PIPE_FORMAT_R32G32_UINT, 0,
|
||||
DIV_ROUND_UP(rgba8_tex->width0, 4),
|
||||
DIV_ROUND_UP(rgba8_tex->height0, 4), 1, 1, 0,
|
||||
DIV_ROUND_UP(rgba8_tex->height0, 4), 1, 1, 0, 0,
|
||||
PIPE_BIND_SHADER_IMAGE |
|
||||
PIPE_BIND_SAMPLER_VIEW, false,
|
||||
PIPE_COMPRESSION_FIXED_RATE_NONE);
|
||||
@@ -414,7 +414,7 @@ cs_stitch_64bpb_textures(struct st_context *st,
|
||||
stitched_tex =
|
||||
st_texture_create(st, PIPE_TEXTURE_2D, PIPE_FORMAT_R32G32B32A32_UINT, 0,
|
||||
tex_hi->width0,
|
||||
tex_hi->height0, 1, 1, 0,
|
||||
tex_hi->height0, 1, 1, 0, 0,
|
||||
PIPE_BIND_SHADER_IMAGE |
|
||||
PIPE_BIND_SAMPLER_VIEW, false,
|
||||
PIPE_COMPRESSION_FIXED_RATE_NONE);
|
||||
@@ -481,7 +481,7 @@ sw_decode_astc(struct st_context *st,
|
||||
/* Create the destination */
|
||||
struct pipe_resource *rgba8_tex =
|
||||
st_texture_create(st, PIPE_TEXTURE_2D, PIPE_FORMAT_R8G8B8A8_UNORM, 0,
|
||||
width_px, height_px, 1, 1, 0,
|
||||
width_px, height_px, 1, 1, 0, 0,
|
||||
PIPE_BIND_SAMPLER_VIEW, false,
|
||||
PIPE_COMPRESSION_FIXED_RATE_NONE);
|
||||
if (!rgba8_tex)
|
||||
@@ -576,7 +576,7 @@ get_astc_partition_table_view(struct st_context *st,
|
||||
struct pipe_resource *res =
|
||||
st_texture_create(st, PIPE_TEXTURE_2D, PIPE_FORMAT_R8_UINT, 0,
|
||||
ptable_box.width, ptable_box.height,
|
||||
1, 1, 0,
|
||||
1, 1, 0, 0,
|
||||
PIPE_BIND_SAMPLER_VIEW, false,
|
||||
PIPE_COMPRESSION_FIXED_RATE_NONE);
|
||||
if (!res)
|
||||
@@ -649,7 +649,7 @@ cs_decode_astc(struct st_context *st,
|
||||
/* Create the destination */
|
||||
struct pipe_resource *rgba8_tex =
|
||||
st_texture_create(st, PIPE_TEXTURE_2D, PIPE_FORMAT_R8G8B8A8_UNORM, 0,
|
||||
width_px, height_px, 1, 1, 0,
|
||||
width_px, height_px, 1, 1, 0, 0,
|
||||
PIPE_BIND_SAMPLER_VIEW, false,
|
||||
PIPE_COMPRESSION_FIXED_RATE_NONE);
|
||||
|
||||
|
||||
@@ -62,6 +62,7 @@ st_texture_create(struct st_context *st,
|
||||
GLuint depth0,
|
||||
GLuint layers,
|
||||
GLuint nr_samples,
|
||||
unsigned flags,
|
||||
GLuint bind,
|
||||
bool sparse,
|
||||
uint32_t compression)
|
||||
@@ -445,7 +446,7 @@ st_create_color_map_texture(struct gl_context *ctx)
|
||||
|
||||
/* create texture for color map/table */
|
||||
pt = st_texture_create(st, PIPE_TEXTURE_2D, format, 0,
|
||||
texSize, texSize, 1, 1, 0, PIPE_BIND_SAMPLER_VIEW, false,
|
||||
texSize, texSize, 1, 1, 0, 0, PIPE_BIND_SAMPLER_VIEW, false,
|
||||
PIPE_COMPRESSION_FIXED_RATE_NONE);
|
||||
return pt;
|
||||
}
|
||||
|
||||
@@ -139,6 +139,7 @@ st_texture_create(struct st_context *st,
|
||||
GLuint depth0,
|
||||
GLuint layers,
|
||||
GLuint nr_samples,
|
||||
unsigned flags,
|
||||
GLuint tex_usage,
|
||||
bool sparse,
|
||||
uint32_t compression);
|
||||
|
||||
Reference in New Issue
Block a user