'pan_blending.c',
'pan_blend_shaders.c',
'pan_wallpaper.c',
- 'pan_pretty_print.c'
+ 'pan_pretty_print.c',
)
inc_panfrost = [
include_directories('midgard'),
]
+compile_args_panfrost = [
+ '-DGALLIUM_PANFROST',
+ '-Wno-pointer-arith'
+]
+
+overlay = join_paths(meson.source_root(), meson.current_source_dir(), 'nondrm/pan_nondrm.c')
+nondrm_overlay_check = run_command('ls', overlay)
+has_nondrm_overlay = nondrm_overlay_check.returncode() == 0
+
+if has_nondrm_overlay
+ files_panfrost += files('nondrm/pan_nondrm.c')
+ inc_panfrost += include_directories('nondrm/include')
+ compile_args_panfrost += '-DPAN_NONDRM_OVERLAY'
+endif
+
midgard_nir_algebraic_c = custom_target(
'midgard_nir_algebraic.c',
input : 'midgard/midgard_nir_algebraic.py',
idep_nir
],
include_directories : inc_panfrost,
- c_args : [c_vis_args, c_msvc_compat_args],
+ c_args : [c_vis_args, c_msvc_compat_args, compile_args_panfrost],
)
driver_panfrost = declare_dependency(
- compile_args : ['-DGALLIUM_PANFROST', '-Wno-pointer-arith'],
+ compile_args : compile_args_panfrost,
link_with : [libpanfrost, libpanfrostwinsys],
)
#ifndef DRY_RUN
- int fragment_id = screen->driver->submit_vs_fs_job(ctx, has_draws);
+ bool is_scanout = panfrost_is_scanout(ctx);
+ int fragment_id = screen->driver->submit_vs_fs_job(ctx, has_draws, is_scanout);
/* If visual, we can stall a frame */
#include "pan_context.h"
#include "midgard/midgard_compile.h"
-#include "pan_drm.h"
+struct panfrost_driver *panfrost_create_drm_driver(int fd);
+struct panfrost_driver *panfrost_create_nondrm_driver(int fd);
static const char *
panfrost_get_name(struct pipe_screen *screen)
if (is_drm) {
screen->driver = panfrost_create_drm_driver(fd);
} else {
- fprintf(stderr, "Legacy (non-DRM) drivers are not supported in upstream Mesa\n");
+#ifdef PAN_NONDRM_OVERLAY
+ screen->driver = panfrost_create_nondrm_driver(fd);
+#else
+ fprintf(stderr, "Legacy (non-DRM) operation requires out-of-tree overlay\n");
return NULL;
+#endif
}
#ifdef DUMP_PERFORMANCE_COUNTERS
void (*unmap_bo) (struct panfrost_context *ctx, struct pipe_transfer *transfer);
void (*destroy_bo) (struct panfrost_screen *screen, struct panfrost_bo *bo);
- int (*submit_vs_fs_job) (struct panfrost_context *ctx, bool has_draws);
+ int (*submit_vs_fs_job) (struct panfrost_context *ctx, bool has_draws, bool is_scanout);
void (*force_flush_fragment) (struct panfrost_context *ctx);
void (*allocate_slab) (struct panfrost_screen *screen,
struct panfrost_memory *mem,