mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 11:28:05 +02:00
radeonsi: replace radeon_cmdbuf_chunk by ac_cmdbuf
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36292>
This commit is contained in:
parent
9ff4750eaf
commit
377f50129b
3 changed files with 7 additions and 12 deletions
|
|
@ -352,7 +352,7 @@ static void si_parse_current_ib(FILE *f, struct radeon_cmdbuf *cs, unsigned begi
|
|||
fprintf(f, "------------------ %s begin (dw = %u) ------------------\n", ip_name, begin);
|
||||
|
||||
for (unsigned prev_idx = 0; prev_idx < cs->num_prev; ++prev_idx) {
|
||||
struct radeon_cmdbuf_chunk *chunk = &cs->prev[prev_idx];
|
||||
struct ac_cmdbuf *chunk = &cs->prev[prev_idx];
|
||||
|
||||
if (begin < chunk->cdw) {
|
||||
struct ac_ib_parser ib_parser = {
|
||||
|
|
@ -1125,7 +1125,7 @@ void si_gather_context_rolls(struct si_context *sctx)
|
|||
uint32_t *ib_dw_sizes = alloca(sizeof(ib_dw_sizes[0]) * (cs->num_prev + 1));
|
||||
|
||||
for (unsigned i = 0; i < cs->num_prev; i++) {
|
||||
struct radeon_cmdbuf_chunk *chunk = &cs->prev[i];
|
||||
struct ac_cmdbuf *chunk = &cs->prev[i];
|
||||
|
||||
ibs[i] = chunk->buf;
|
||||
ib_dw_sizes[i] = chunk->cdw;
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
#define RADEON_FLUSH_ASYNC_START_NEXT_GFX_IB_NOW \
|
||||
(PIPE_FLUSH_ASYNC | RADEON_FLUSH_START_NEXT_GFX_IB_NOW)
|
||||
|
||||
#include "amd/common/ac_cmdbuf.h"
|
||||
#include "amd/common/ac_gpu_info.h"
|
||||
#include "amd/common/ac_surface.h"
|
||||
#include "amd/common/ac_pm4.h"
|
||||
|
|
@ -208,15 +209,9 @@ enum radeon_ctx_pstate
|
|||
struct winsys_handle;
|
||||
struct radeon_winsys_ctx;
|
||||
|
||||
struct radeon_cmdbuf_chunk {
|
||||
unsigned cdw; /* Number of used dwords. */
|
||||
unsigned max_dw; /* Maximum number of dwords. */
|
||||
uint32_t *buf; /* The base pointer of the chunk. */
|
||||
};
|
||||
|
||||
struct radeon_cmdbuf {
|
||||
struct radeon_cmdbuf_chunk current;
|
||||
struct radeon_cmdbuf_chunk *prev;
|
||||
struct ac_cmdbuf current;
|
||||
struct ac_cmdbuf *prev;
|
||||
uint16_t num_prev; /* Number of previous chunks. */
|
||||
uint16_t max_prev; /* Space in array pointed to by prev. */
|
||||
unsigned prev_dw; /* Total number of dwords in previous chunks. */
|
||||
|
|
|
|||
|
|
@ -1087,9 +1087,9 @@ static bool amdgpu_cs_check_space(struct radeon_cmdbuf *rcs, unsigned dw)
|
|||
/* Allocate a new chunk */
|
||||
if (rcs->num_prev >= rcs->max_prev) {
|
||||
unsigned new_max_prev = MAX2(1, 2 * rcs->max_prev);
|
||||
struct radeon_cmdbuf_chunk *new_prev;
|
||||
struct ac_cmdbuf *new_prev;
|
||||
|
||||
new_prev = (struct radeon_cmdbuf_chunk*)
|
||||
new_prev = (struct ac_cmdbuf*)
|
||||
REALLOC(rcs->prev, sizeof(*new_prev) * rcs->max_prev,
|
||||
sizeof(*new_prev) * new_max_prev);
|
||||
if (!new_prev)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue