mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
zink: delete/simplify some bindless descriptor resource accesss
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
This commit is contained in:
parent
8805afd291
commit
76e2b61a2f
3 changed files with 3 additions and 12 deletions
|
|
@ -2425,7 +2425,7 @@ zink_make_texture_handle_resident(struct pipe_context *pctx, uint64_t handle, bo
|
|||
assert(he);
|
||||
struct zink_bindless_descriptor *bd = he->data;
|
||||
struct zink_descriptor_surface *ds = &bd->ds;
|
||||
struct zink_resource *res = zink_descriptor_surface_resource(ds);
|
||||
struct zink_resource *res = zink_resource(bd->pres);
|
||||
if (is_buffer)
|
||||
handle -= ZINK_MAX_BINDLESS_HANDLES;
|
||||
if (resident) {
|
||||
|
|
@ -2546,7 +2546,7 @@ zink_make_image_handle_resident(struct pipe_context *pctx, uint64_t handle, unsi
|
|||
struct zink_bindless_descriptor *bd = he->data;
|
||||
struct zink_descriptor_surface *ds = &bd->ds;
|
||||
bd->access = paccess;
|
||||
struct zink_resource *res = zink_descriptor_surface_resource(ds);
|
||||
struct zink_resource *res = zink_resource(bd->pres);
|
||||
VkAccessFlags access = 0;
|
||||
if (paccess & PIPE_IMAGE_ACCESS_WRITE) {
|
||||
if (resident) {
|
||||
|
|
@ -3501,7 +3501,7 @@ zink_update_descriptor_refs(struct zink_context *ctx, bool compute)
|
|||
ctx->di.bindless_refs_dirty = false;
|
||||
for (unsigned i = 0; i < 2; i++) {
|
||||
util_dynarray_foreach(&ctx->di.bindless[i].resident, struct zink_bindless_descriptor*, bd) {
|
||||
struct zink_resource *res = zink_descriptor_surface_resource(&(*bd)->ds);
|
||||
struct zink_resource *res = zink_resource((*bd)->pres);
|
||||
zink_batch_resource_usage_set(ctx->bs, res, (*bd)->access & PIPE_IMAGE_ACCESS_WRITE, res->obj->is_buffer);
|
||||
if (!ctx->unordered_blitting) {
|
||||
if ((*bd)->access & PIPE_IMAGE_ACCESS_WRITE || !res->obj->is_buffer)
|
||||
|
|
|
|||
|
|
@ -54,14 +54,6 @@ struct zink_vertex_elements_state;
|
|||
util_debug_message(&ctx->dbg, PERF_INFO, __VA_ARGS__); \
|
||||
} while(0)
|
||||
|
||||
static inline struct zink_resource *
|
||||
zink_descriptor_surface_resource(struct zink_descriptor_surface *ds)
|
||||
{
|
||||
return ds->is_buffer ?
|
||||
zink_descriptor_mode == ZINK_DESCRIPTOR_MODE_DB ? zink_resource(ds->db.pres) : zink_resource(ds->bufferview->pres) :
|
||||
(struct zink_resource*)ds->surface->base.texture;
|
||||
}
|
||||
|
||||
static inline bool
|
||||
zink_fb_clear_enabled(const struct zink_context *ctx, unsigned idx)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1610,7 +1610,6 @@ struct zink_descriptor_db_info {
|
|||
unsigned offset;
|
||||
unsigned size;
|
||||
enum pipe_format format;
|
||||
struct pipe_resource *pres;
|
||||
};
|
||||
|
||||
struct zink_descriptor_surface {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue