#include "lima_bo.h"
#include "lima_fence.h"
#include "lima_format.h"
-#include "lima_util.h"
#include "ir/lima_ir.h"
#include "xf86drm.h"
int lima_plb_max_blk = 0;
+int lima_plb_pp_stream_cache_size = 0;
static void
lima_screen_destroy(struct pipe_screen *pscreen)
{
struct lima_screen *screen = lima_screen(pscreen);
- lima_dump_file_close();
-
slab_destroy_parent(&screen->transfer_pool);
if (screen->ro)
case PIPE_CAP_CLIP_PLANES:
return 0;
+ case PIPE_CAP_FRAGMENT_SHADER_DERIVATIVES:
+ return 1;
+
default:
return u_pipe_screen_get_param_defaults(pscreen, param);
}
if (usage & PIPE_BIND_DEPTH_STENCIL) {
switch (format) {
- case PIPE_FORMAT_Z16_UNORM:
case PIPE_FORMAT_Z24_UNORM_S8_UINT:
case PIPE_FORMAT_Z24X8_UNORM:
break;
"don't use tiled buffers" },
{ "nogrowheap", LIMA_DEBUG_NO_GROW_HEAP,
"disable growable heap buffer" },
+ { "singlejob", LIMA_DEBUG_SINGLE_JOB,
+ "disable multi job optimization" },
{ NULL }
};
{
lima_debug = debug_get_option_lima_debug();
- if (lima_debug & LIMA_DEBUG_DUMP)
- lima_dump_file_open();
-
lima_ctx_num_plb = debug_get_num_option("LIMA_CTX_NUM_PLB", LIMA_CTX_PLB_DEF_NUM);
if (lima_ctx_num_plb > LIMA_CTX_PLB_MAX_NUM ||
lima_ctx_num_plb < LIMA_CTX_PLB_MIN_NUM) {
"reset to default 0\n", lima_ppir_force_spilling);
lima_ppir_force_spilling = 0;
}
+
+ lima_plb_pp_stream_cache_size = debug_get_num_option("LIMA_PLB_PP_STREAM_CACHE_SIZE", 0);
+ if (lima_plb_pp_stream_cache_size < 0) {
+ fprintf(stderr, "lima: LIMA_PLB_PP_STREAM_CACHE_SIZE %d less than 0, "
+ "reset to default 0\n", lima_plb_pp_stream_cache_size);
+ lima_plb_pp_stream_cache_size = 0;
+ }
}
struct pipe_screen *
lima_screen_create(int fd, struct renderonly *ro)
{
+ uint64_t system_memory;
struct lima_screen *screen;
screen = rzalloc(NULL, struct lima_screen);
lima_screen_parse_env();
+ /* Limit PP PLB stream cache size to 0.1% of system memory */
+ if (!lima_plb_pp_stream_cache_size &&
+ os_get_total_physical_memory(&system_memory))
+ lima_plb_pp_stream_cache_size = system_memory >> 10;
+
+ /* Set lower limit on PP PLB cache size */
+ lima_plb_pp_stream_cache_size = MAX2(128 * 1024 * lima_ctx_num_plb,
+ lima_plb_pp_stream_cache_size);
+
if (!lima_screen_query_info(screen))
goto err_out0;