On 11/07/2017 10:47 AM, Alex Smith wrote:
On 7 November 2017 at 09:28, Samuel Pitoiset <samuel.pitoi...@gmail.com <mailto:samuel.pitoi...@gmail.com>> wrote:



    On 11/07/2017 10:18 AM, Michel Dänzer wrote:

        On 07/11/17 10:08 AM, Samuel Pitoiset wrote:

            It seems safe and it improves performance by +4% (73->76).

            Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com
            <mailto:samuel.pitoi...@gmail.com>>
            ---
               src/amd/vulkan/radv_device.c | 20 ++++++++++++++++++++
               1 file changed, 20 insertions(+)

            diff --git a/src/amd/vulkan/radv_device.c
            b/src/amd/vulkan/radv_device.c
            index 1ecf70d4a9..29bbcc5a43 100644
            --- a/src/amd/vulkan/radv_device.c
            +++ b/src/amd/vulkan/radv_device.c
            @@ -341,6 +341,24 @@ radv_get_perftest_option_name(int id)
                     return radv_perftest_options[id].string;
               }
               +static void
            +radv_handle_per_app_options(struct radv_instance *instance,
            +                           const VkApplicationInfo *info)
            +{
            +       const char *name = info ? info->pApplicationName : NULL;
            +
            +       if (!name)
            +               return;
            +
            +       if (!strcmp(name, "Talos - Linux - 32bit") ||
            +           !strcmp(name, "Talos - Linux - 64bit")) {
            +               /* Force enable LLVM sisched for Talos
            because it looks safe
            +                * and it gives few more FPS.
            +                */
            +               instance->perftest_flags |=
            RADV_PERFTEST_SISCHED;
            +       }
            +}
            +
               VkResult radv_CreateInstance(
        const VkInstanceCreateInfo*  pCreateInfo,
                     const VkAllocationCallbacks*                pAllocator,
            @@ -400,6 +418,8 @@ VkResult radv_CreateInstance(
                     instance->perftest_flags =
            parse_debug_string(getenv("RADV_PERFTEST"),
 radv_perftest_options);
               +     radv_handle_per_app_options(instance,
            pCreateInfo->pApplicationInfo);
            +
                     *pInstance = radv_instance_to_handle(instance);
                     return VK_SUCCESS;


        There should probably be a way to explicitly disable sisched.


    mmh, yeah probably. RADV_DEBUG="nosisched" could be a thing then.


Can't this sort of app-specific stuff go to a drirc-style config file?

It's doable yes, but it will require a bit more effort. This solution is pretty simple for now.


Alex





    _______________________________________________
    mesa-dev mailing list
    mesa-dev@lists.freedesktop.org <mailto:mesa-dev@lists.freedesktop.org>
    https://lists.freedesktop.org/mailman/listinfo/mesa-dev
    <https://lists.freedesktop.org/mailman/listinfo/mesa-dev>


_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to