• Need for start up and shutdown user scripts?

    6
    0 Votes
    6 Posts
    567 Views
    LolonoisL

    @rincewind said in Need for start up and shutdown user scripts?:

    Also more fundametally, would it not make sense to have a frontend agnostic hooks?

    No need to reinvent the wheel: Systemd (service type oneshot) is most likely your friend.

    https://wiki.archlinux.org/title/Systemd#Service_types

  • HBMame Libretro

    22
    0 Votes
    22 Posts
    4k Views
    B

    @jimmyfromthebay "Vector Breakout" added :)

  • 1 Votes
    11 Posts
    760 Views
    roslofR

    @pjft said in [ES-dev Bug Report] "Hidden" filter fails at system level after entering a subfolder and returning:

    @roslof Well, check fps as well

    I can create a new thread if desired, since this work is a bit off topic -- but for now, here we go:

    First off, my theme is heavy, leveraging (among other things) one large 1160x1080 .jpg per system, and using roughly 80-90 systems.

    VRAM LIMIT is set to 200Mb

    I ran through the flow again (UI MODE from FULL --> KIOSK --> FULL) using the ES flow, and there is definitely a major performance hit during and after each subsequent load for the duration of the session.

    Most notable side affects:

    Load times increase dramatically Navigation through the systems UI* eventually becomes uncontrollable, as the system continues to move through games, and player input is ignored FPS tanks during step #2 above

    At idle, ES reports Tex Max increases dramatically:

    At Boot: 626.99 After two (2) Swaps: 930.43

    All other stats remain the same after swaps.

    Also, at idle, using htop, some stats increase:

    VIRT: 899M --> 937M RES: 653M --> 687M CPU: 25.7% --> 32.2% MEM: 38.6% --> 40.6%

    However, when hitting F4 to exit ES, then typing "exit" at console to re-launch ES, everything going back to original values. I believe using QUIT | RESTART EMULATIONSTATION also clears the performance problem.

    Lastly, an early check indicates a similar, if not identical issue when switching ES Themes back and forth.

    Again, hope this information is helpful.

  • UTF-8 support for word-wrap

    5
    2 Votes
    5 Posts
    725 Views
    mituM

    @waitingmoon I've adapted the changes submitted by @Zigurana and eagle0wl and submitted a new PR, which was accepted recently.

    If you're using RetroPie, you can install the emulationstation-dev package (from the experimental packages section) and try it out.

  • 0 Votes
    6 Posts
    964 Views
    dankcushionsD

    bear in mind that even audiodriver=alsa causes a noticeable performance loss vs audio_driver=alsathread on a pi4. if jack is more demanding that either, it would be a non-starter.

  • 1 Votes
    4 Posts
    2k Views
    P

    @lolonois I am really sorry. I finally got back to playing with the Pi today. I was all set to try out your hard work here. I thought I should begin with an updated ScummVM release, so I did that first. Lo and behold, TLJ works! I was able to boot and play the prologue scene.

    I definitely appreciate your help, though!

  • lr-scummvm: request for comments and testing

    189
    9 Votes
    189 Posts
    47k Views
    LolonoisL

    @paradoxgbb thanks for reporting back verbatim. Did I get it right that the retropie provided binary does work well? (I assume yes, as the binary [1] relates to the lr-scummvm git from 2021-12-27, it runs ScummVM 2.1.1 IIRC)

    [1] https://files.retropie.org.uk/binaries/buster/rpi4/kms/libretrocores/lr-scummvm.tar.gz

    The diablodiab hit-and-miss results leave me somewhat unsatisfied, but I can not put research at this atm. FTR: I am on RA 1.9.7, GCC 8.3 and for me (as stated earlier) the build of 9703372cc8 runs fine on a RetroPie 4.7.19/Rpi4.

  • PSX Cue file maker script

    2
    4 Votes
    2 Posts
    740 Views
    lostlessL

    @juanzt that cool. I have also found that just changing .bin to .iso works on psx emulators. Doesn’t seem to effect anything unless a game uses CDDA. It just won’t play the cdda.

  • 13 Votes
    88 Posts
    44k Views
    mituM

    @meleu said in ES devs and testers, this tool is for you!:

    but if EmulationStation development is still hot

    Not so much these days.

    The script could probably be simplified, since there is branch support in RetroPie-Setup scriptmodules directly and RetroPie-Setup automatically checks for new changes to the branches (letting you know if you should update from source or have the latest source version).

    P.S. Happy New Year !

  • RetroPie into a docker container

    Locked
    8
    0 Votes
    8 Posts
    20k Views
    mituM

    @iwanttobefreak If your image contains ROMs, please remove the link.

  • -10 Votes
    20 Posts
    4k Views
    K

    @benmclean
    That's awesome! However, what I've really wanted (and can't believe is not there) is an OSK built into ES. Like when ES throws up a dialog that requires text input...see Kodi for examples. It should be pretty easy. I can program but I haven't programmed in 15+ years. It would take me about 6 months to figure out to get an environment setup to start working on it, then another month to familiarize myself with ES code, then maybe a week to actually code it. I've created an OSK in a script before.

    It's just an array of characters. Display the array. 'Earmark' the current position in the array onscreen. Get left/right/up/down input. Move earmark in the array and onscreen. Get 'enter' input. Copy content of current position in the array to the text field.

    It would be so nice to be able to edit game metadata from within ES without a keyboard.

  • Sharp X68000 Multi-Disk games questions

    26
    2 Votes
    26 Posts
    12k Views
    mituM

    @krinasam Please don't bump old topics, you should open a separate topic for your question.

  • Scraper UI development

    2
    0 Votes
    2 Posts
    415 Views
    mituM

    There are no plans to 'retire' the built-in scraper, improvements are always welcomed.

  • 2 Votes
    14 Posts
    2k Views
    T

    @ziggurat I've managed to install ok, but login doesn't seem to work. Could you advise on how to login with usr/pqd or with code? Thank you!

  • Retropie 2screen on multiplayer??

    3
    0 Votes
    3 Posts
    520 Views
    O

    no news??

  • Automatic Controller Pairing

    1
    0 Votes
    1 Posts
    273 Views
    No one has replied
  • 1 Votes
    12 Posts
    6k Views
    jajalobritJ

    @brummy you can set the path for your usb drive in /home/pi/.stepmania-5.3/Save/Preferences.ini . To see the directory you need to enable the display of hidden folders (in winscp the shortcut is ctrl+alt+H)

  • RetroPie Wifi Manager

    25
    0 Votes
    25 Posts
    4k Views
    P

    @philcomm First off, I'm sorry that your OSK as originally engineered looks like it won't be accepted --- but I wanted to thank you for really moving the ball forward on this, because it looks like the python-based one will make it through as per recent comments on the PR. This is going to save a lot of people time and frustration and you should get a large chunk of the credit.

    For fun last week as I was setting up my Zero2W I connected via SSH to it and attempted to enter Wifi via my phone using the existing infrastructure by executing RetroPie-Setup directly. Although in theory this seemed like a good idea, the WiFi won't drop and reconnect to a new network when you're using that connection for the terminal session, turns out. So, still very clunky.

    Will check out your music suggestion, and also the new OSK coming down the pike. Thanks so much.

    I think I might have found some quirks around the safe shutdown script with the Zero2W around pin allocation and interaction with WiFi but I want to do some more testing this week before making further topics or inquiries about it here. I also will share some additional script suggestions / observations too.

  • Consider XU4 Development

    Locked
    5
    0 Votes
    5 Posts
    7k Views
    ExarKunIvE

    @jackbrook1

    OGST is built on jessy. it is a old os. OGST is still good just old

    there is also ARES. it is more current then OGST.

    just letting you know whats out there

  • Add Vulkan Support to RetroPie for Pi 4?

    97
    3 Votes
    97 Posts
    25k Views
    B

    Updating this thread for informational purposes:

    If you want to run the latest MESA git, there are several patches that are needed based on the 20.3.5 diff file from the RPiOS repository: (I kept the relevant changes that are not already upstreamed)

    Without it, I ran into some display issues which I presume are the modifiers utilized in the newer libdrm pkgs.

    Note: you must compile libdrm, libglvnd, and mesa for it to work.

    diff --git a/src/gallium/drivers/v3d/driinfo_v3d.h b/src/gallium/drivers/v3d/driinfo_v3d.h index 147ad0b49bd..a524a03e7e5 100644 --- a/src/gallium/drivers/v3d/driinfo_v3d.h +++ b/src/gallium/drivers/v3d/driinfo_v3d.h @@ -2,4 +2,6 @@ DRI_CONF_SECTION_MISCELLANEOUS DRI_CONF_V3D_NONMSAA_TEXTURE_SIZE_LIMIT(false) + DRI_CONF_V3D_MAINTAIN_IGNORABLE_SCANOUT(false) + DRI_CONF_V3D_IGNORE_SCANOUT_USAGES_WITH_MODIFIERS(false) DRI_CONF_SECTION_END diff --git a/src/gallium/drivers/v3d/meson.build b/src/gallium/drivers/v3d/meson.build index b760ca5c025..1a537637b03 100644 --- a/src/gallium/drivers/v3d/meson.build +++ b/src/gallium/drivers/v3d/meson.build @@ -59,6 +59,16 @@ endif v3d_versions = ['33', '41'] +v3d_deps = [dep_v3dv3, dep_libdrm, dep_valgrind, idep_nir_headers] + +if with_platform_x11 + v3d_deps += dep_xcb +endif + +if with_platform_wayland + v3d_deps += dep_wayland_client +endif + per_version_libs = [] foreach ver : v3d_versions per_version_libs += static_library( @@ -70,7 +80,7 @@ foreach ver : v3d_versions ], c_args : [v3d_args, '-DV3D_VERSION=' + ver], gnu_symbol_visibility : 'hidden', - dependencies : [dep_v3dv3, dep_libdrm, dep_valgrind, idep_nir_headers], + dependencies : v3d_deps, ) endforeach @@ -93,7 +103,7 @@ libv3d = static_library( c_args : [v3d_args], cpp_args : [v3d_args], gnu_symbol_visibility : 'hidden', - dependencies : [dep_v3dv3, dep_libdrm, dep_valgrind, idep_nir_headers], + dependencies : v3d_deps, link_with: [per_version_libs], ) diff --git a/src/gallium/drivers/v3d/v3d_resource.c b/src/gallium/drivers/v3d/v3d_resource.c index 0885a2cb80f..36b6ab34d71 100644 --- a/src/gallium/drivers/v3d/v3d_resource.c +++ b/src/gallium/drivers/v3d/v3d_resource.c @@ -436,7 +436,7 @@ v3d_resource_get_handle(struct pipe_screen *pscreen, case WINSYS_HANDLE_TYPE_SHARED: return v3d_bo_flink(bo, &whandle->handle); case WINSYS_HANDLE_TYPE_KMS: - if (screen->ro) { + if (screen->ro && rsc->scanout) { if (renderonly_get_handle(rsc->scanout, whandle)) { whandle->stride = rsc->slices[0].stride; return true; @@ -750,6 +750,30 @@ v3d_resource_setup(struct pipe_screen *pscreen, return rsc; } +static bool +v3d_resource_should_scanout(struct pipe_screen *pscreen, + const struct pipe_resource *tmpl, + const uint64_t *modifiers, + int count) +{ + struct v3d_screen *screen = v3d_screen(pscreen); + + if (tmpl->bind & PIPE_BIND_SCANOUT) { + if (screen->maintain_ignorable_scanout) + return true; + if (screen->has_x_session && screen->ignore_scanout_usages) + return false; + return true; + } + + if (tmpl->bind & PIPE_BIND_SHARED) { + if (screen->ignore_scanout_usages_with_modifiers) + return false; + return true; + } + return false; +} + static struct pipe_resource * v3d_resource_create_with_modifiers(struct pipe_screen *pscreen, const struct pipe_resource *tmpl, @@ -763,6 +787,8 @@ v3d_resource_create_with_modifiers(struct pipe_screen *pscreen, struct pipe_resource *prsc = &rsc->base; /* Use a tiled layout if we can, for better 3D performance. */ bool should_tile = true; + bool should_scanout = v3d_resource_should_scanout(pscreen, tmpl, + modifiers, count); /* VBOs/PBOs are untiled (and 1 height). */ if (tmpl->target == PIPE_BUFFER) @@ -788,8 +814,8 @@ v3d_resource_create_with_modifiers(struct pipe_screen *pscreen, /* If using the old-school SCANOUT flag, we don't know what the screen * might support other than linear. Just force linear. */ - if (tmpl->bind & PIPE_BIND_SCANOUT) - should_tile = false; + if ((tmpl->bind & PIPE_BIND_SCANOUT) && should_scanout) + should_tile = false; /* No user-specified modifier; determine our own. */ if (count == 1 && modifiers[0] == DRM_FORMAT_MOD_INVALID) { @@ -818,8 +844,8 @@ v3d_resource_create_with_modifiers(struct pipe_screen *pscreen, * We always allocate this way for SHARED, because get_handle will * need a resource on the display fd. */ - if (screen->ro && (tmpl->bind & (PIPE_BIND_SCANOUT | - PIPE_BIND_SHARED))) { + + if (screen->ro && should_scanout) { struct winsys_handle handle; struct pipe_resource scanout_tmpl = { .target = prsc->target, @@ -949,7 +975,7 @@ v3d_resource_from_handle(struct pipe_screen *pscreen, } } - if (screen->ro) { + if (screen->ro && !rsc->tiled) { /* Make sure that renderonly has a handle to our buffer in the * display's fd, so that a later renderonly_get_handle() * returns correct handles or GEM names. @@ -995,7 +1021,9 @@ v3d_update_shadow_texture(struct pipe_context *pctx, assert(view->texture != pview->texture); - if (shadow->writes == orig->writes && orig->bo->private) + if (shadow->writes == orig->writes && + orig->base.sync_status == 0 && + (orig->bo->private || orig->base.sync_condition)) return; perf_debug("Updating %dx%d@%d shadow for linear texture\n", @@ -1038,6 +1066,7 @@ v3d_update_shadow_texture(struct pipe_context *pctx, } shadow->writes = orig->writes; + orig->base.sync_status = 0; } static struct pipe_surface * diff --git a/src/gallium/drivers/v3d/v3d_screen.c b/src/gallium/drivers/v3d/v3d_screen.c index 1c72dc4af0d..1ac9e8fc1d9 100644 --- a/src/gallium/drivers/v3d/v3d_screen.c +++ b/src/gallium/drivers/v3d/v3d_screen.c @@ -47,6 +47,42 @@ #include "compiler/v3d_compiler.h" #include "drm-uapi/drm_fourcc.h" +#ifdef HAVE_WAYLAND_PLATFORM +#include <wayland-client.h> +#endif + +#ifdef HAVE_X11_PLATFORM +#include <xcb/xcb.h> +#endif + +static bool +check_x_session() +{ + bool xcb_connection = false; + +#ifdef HAVE_WAYLAND_PLATFORM + struct wl_display *display; + + display = wl_display_connect(NULL); + + if (display) { + wl_display_disconnect(display); + return xcb_connection; + } +#endif + +#ifdef HAVE_X11_PLATFORM + xcb_connection_t *conn; + + conn = xcb_connect(NULL, NULL); + + if (!xcb_connection_has_error(conn)) + xcb_connection = true; + xcb_disconnect(conn); +#endif + return xcb_connection; +} + static const char * v3d_screen_get_name(struct pipe_screen *pscreen) { @@ -828,6 +864,28 @@ v3d_screen_create(int fd, const struct pipe_screen_config *config, screen->has_cache_flush = v3d_has_feature(screen, DRM_V3D_PARAM_SUPPORTS_CACHE_FLUSH); screen->has_perfmon = v3d_has_feature(screen, DRM_V3D_PARAM_SUPPORTS_PERFMON); + + screen->has_x_session = check_x_session(); + + screen->ignore_scanout_usages = getenv("V3D_IGNORE_SCANOUT_USAGES"); + + const char *ignore_scanout_usages_with_modifiers_name = + "v3d_ignore_scanout_usages_with_modifiers"; + screen->ignore_scanout_usages_with_modifiers = + driCheckOption(config->options, + ignore_scanout_usages_with_modifiers_name, + DRI_BOOL) && + driQueryOptionb(config->options, + ignore_scanout_usages_with_modifiers_name); + + const char *maintain_ignorable_scanout_name = + "v3d_maintain_ignorable_scanout"; + screen->maintain_ignorable_scanout = + driCheckOption(config->options, + maintain_ignorable_scanout_name, + DRI_BOOL) && + driQueryOptionb(config->options, + maintain_ignorable_scanout_name); v3d_fence_init(screen); diff --git a/src/gallium/drivers/v3d/v3d_screen.h b/src/gallium/drivers/v3d/v3d_screen.h index 9bf2a065487..afdce3f3c73 100644 --- a/src/gallium/drivers/v3d/v3d_screen.h +++ b/src/gallium/drivers/v3d/v3d_screen.h @@ -82,6 +82,12 @@ struct v3d_screen { bool has_cache_flush; bool has_perfmon; bool nonmsaa_texture_size_limit; + bool ignore_scanout_usages; + bool ignore_scanout_usages_with_modifiers; + bool maintain_ignorable_scanout; + + /* Are we running in an X session? */ + bool has_x_session; struct v3d_simulator_file *sim_file; }; diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h index c96a387bab8..708bb2fad4f 100644 --- a/src/gallium/include/pipe/p_state.h +++ b/src/gallium/include/pipe/p_state.h @@ -572,6 +572,10 @@ struct pipe_resource unsigned usage:8; /**< PIPE_USAGE_x (not a bitmask) */ unsigned bind; /**< bitmask of PIPE_BIND_x */ unsigned flags; /**< bitmask of PIPE_RESOURCE_FLAG_x */ + + /* Hack for avoiding sync on v3d */ + unsigned sync_condition; + unsigned sync_status; /** * For planar images, ie. YUV EGLImage external, etc, pointer to the diff --git a/src/glx/dri_common.h b/src/glx/dri_common.h index 455e8541ed8..1fe78e73b75 100644 --- a/src/glx/dri_common.h +++ b/src/glx/dri_common.h @@ -56,6 +56,10 @@ extern struct glx_config *driConvertConfigs(const __DRIcoreExtension * core, const __DRIconfig ** configs); extern void driDestroyConfigs(const __DRIconfig **configs); + +#ifndef __GLXDRIdrawable +typedef struct __GLXDRIdrawableRec __GLXDRIdrawable; +#endif extern __GLXDRIdrawable * driFetchDrawable(struct glx_context *gc, GLXDrawable glxDrawable); diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 6de28f39112..ece789148d8 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -1021,6 +1021,9 @@ struct gl_texture_object /** GL_ARB_bindless_texture */ struct util_dynarray SamplerHandles; struct util_dynarray ImageHandles; + + /* Hack for avoiding sync on v3d */ + GLboolean SyncCondition; }; diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index 3a3ea8aae94..eb1cb561012 100644 --- a/src/mesa/main/texparam.c +++ b/src/mesa/main/texparam.c @@ -275,6 +275,13 @@ set_tex_parameteri(struct gl_context *ctx, } switch (pname) { + case GL_SYNC_CONDITION: + if (!!texObj->SyncCondition == !!params[0]) + return GL_FALSE; + texObj->SyncCondition = !!params[0]; + return GL_TRUE; + case GL_SYNC_STATUS: + return GL_TRUE; case GL_TEXTURE_MIN_FILTER: if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target)) goto invalid_dsa; diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 599d2099d6f..9fbab50c1d7 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -3620,6 +3620,12 @@ st_TexParameter(struct gl_context *ctx, */ st_texture_release_all_sampler_views(st, stObj); break; + case GL_SYNC_CONDITION: + stObj->pt->sync_condition = texObj->SyncCondition; + break; + case GL_SYNC_STATUS: + stObj->pt->sync_status = 1; + break; default: ; /* nothing */ } diff --git a/src/util/00-mesa-defaults.conf b/src/util/00-mesa-defaults.conf index 7e155d3e690..f0f3cadfb02 100644 --- a/src/util/00-mesa-defaults.conf +++ b/src/util/00-mesa-defaults.conf @@ -625,6 +625,7 @@ TODO: document the other workarounds. <application name="mutter" executable="mutter"> <option name="adaptive_sync" value="false" /> <option name="v3d_nonmsaa_texture_size_limit" value="true" /> + <option name="v3d_maintain_ignorable_scanout" value="true" /> </application> <application name="muffin" executable="muffin"> <option name="adaptive_sync" value="false" /> @@ -676,6 +677,7 @@ TODO: document the other workarounds. </application> <application name="Xorg" executable="Xorg"> <option name="v3d_nonmsaa_texture_size_limit" value="true" /> + <option name="v3d_ignore_scanout_usages_with_modifiers" value="true" /> </application> <application name="gfxbench" executable="testfw_app"> diff --git a/src/util/driconf.h b/src/util/driconf.h index 24726e04bd3..9f2ab7581c6 100644 --- a/src/util/driconf.h +++ b/src/util/driconf.h @@ -480,6 +480,14 @@ DRI_CONF_OPT_B(v3d_nonmsaa_texture_size_limit, def, \ "Report the non-MSAA-only texture size limit") +#define DRI_CONF_V3D_IGNORE_SCANOUT_USAGES_WITH_MODIFIERS(def) \ + DRI_CONF_OPT_B(v3d_ignore_scanout_usages_with_modifiers, def, \ + "Ignore SCANOUT usage on resource allocations with modifiers.") + +#define DRI_CONF_V3D_MAINTAIN_IGNORABLE_SCANOUT(def) \ + DRI_CONF_OPT_B(v3d_maintain_ignorable_scanout, def, \ + "Maintain SCANOUT usage on resource allocations when the environment allows ignoring SCANOUT usage.") + /** * \brief virgl specific configuration options */

Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.