freedreno: honor FD_MESA_DEBUG=nogrow
Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3989>
This commit is contained in:
parent
bab9db6c02
commit
2fa64729db
|
@ -39,6 +39,7 @@ static void
|
||||||
batch_init(struct fd_batch *batch)
|
batch_init(struct fd_batch *batch)
|
||||||
{
|
{
|
||||||
struct fd_context *ctx = batch->ctx;
|
struct fd_context *ctx = batch->ctx;
|
||||||
|
enum fd_ringbuffer_flags flags = 0;
|
||||||
unsigned size = 0;
|
unsigned size = 0;
|
||||||
|
|
||||||
/* if kernel is too old to support unlimited # of cmd buffers, we
|
/* if kernel is too old to support unlimited # of cmd buffers, we
|
||||||
|
@ -51,21 +52,23 @@ batch_init(struct fd_batch *batch)
|
||||||
if ((fd_device_version(ctx->screen->dev) < FD_VERSION_UNLIMITED_CMDS) ||
|
if ((fd_device_version(ctx->screen->dev) < FD_VERSION_UNLIMITED_CMDS) ||
|
||||||
(fd_mesa_debug & FD_DBG_NOGROW)){
|
(fd_mesa_debug & FD_DBG_NOGROW)){
|
||||||
size = 0x100000;
|
size = 0x100000;
|
||||||
|
} else {
|
||||||
|
flags = FD_RINGBUFFER_GROWABLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
batch->submit = fd_submit_new(ctx->pipe);
|
batch->submit = fd_submit_new(ctx->pipe);
|
||||||
if (batch->nondraw) {
|
if (batch->nondraw) {
|
||||||
batch->draw = fd_submit_new_ringbuffer(batch->submit, size,
|
batch->draw = fd_submit_new_ringbuffer(batch->submit, size,
|
||||||
FD_RINGBUFFER_PRIMARY | FD_RINGBUFFER_GROWABLE);
|
FD_RINGBUFFER_PRIMARY | flags);
|
||||||
} else {
|
} else {
|
||||||
batch->gmem = fd_submit_new_ringbuffer(batch->submit, size,
|
batch->gmem = fd_submit_new_ringbuffer(batch->submit, size,
|
||||||
FD_RINGBUFFER_PRIMARY | FD_RINGBUFFER_GROWABLE);
|
FD_RINGBUFFER_PRIMARY | flags);
|
||||||
batch->draw = fd_submit_new_ringbuffer(batch->submit, size,
|
batch->draw = fd_submit_new_ringbuffer(batch->submit, size,
|
||||||
FD_RINGBUFFER_GROWABLE);
|
flags);
|
||||||
|
|
||||||
if (ctx->screen->gpu_id < 600) {
|
if (ctx->screen->gpu_id < 600) {
|
||||||
batch->binning = fd_submit_new_ringbuffer(batch->submit,
|
batch->binning = fd_submit_new_ringbuffer(batch->submit,
|
||||||
size, FD_RINGBUFFER_GROWABLE);
|
size, flags);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue