From patchwork Thu Oct 3 05:51:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lynne X-Patchwork-Id: 51989 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:b18c:0:b0:48e:c0f8:d0de with SMTP id q12csp145675vqn; Wed, 2 Oct 2024 22:51:55 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWMWkx9HhExlCGZIHoIPr3mJBfHEzkZZAB/MK2cjj+XkELnWhTQ4rHJZ7UdfkREj8dO21rHhnhyt675Xkfzz79X@gmail.com X-Google-Smtp-Source: AGHT+IE1CFR91oXNXSNWwGh9cc7d6IDumsSaxtt/ZfHWKNSLQGbbA3vwtSy+w9Di1dS/O/u/Lj8R X-Received: by 2002:a2e:be0d:0:b0:2fa:c396:1c36 with SMTP id 38308e7fff4ca-2fae1026b30mr34491441fa.20.1727934715428; Wed, 02 Oct 2024 22:51:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727934715; cv=none; d=google.com; s=arc-20240605; b=YBjo4Q2zjR1l9Ft2CXYr/HISXB1o6lC9ZLJhH8qG0rVy0gBuc3TGztSOfZ5JSz7tFT olA+2I4E64/bixmcrZjyNuqxUDaVroBBRJI0bdIuWZvSrbrmSnsvncV7rjBJ+MAeZ6Qk /vMMmlGIelrFsMp7HRsKkYOKvc0NmwY04IqfK6oSdxSsARf30ujm19SXsbSuiCPSN5y9 AtNvNOyHSAbzDhMoJWRVSSr+98wE1HJXD7WMfhqm9e64Xv2alLG7vIkgZNm1bt0yZhtM 5YyACwKSPIYiwvvT0IUpAfnkucoFgxXyPUUjW1spfurKtOyzR5tmhQtEsrQHuVs/F4hW 7deA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:cc:reply-to:from :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:message-id:date:to :delivered-to; bh=jnnSCtMhsxPB8/65eUnsrzzykygw4aTCsZNdKmnvosA=; fh=nenT92/WZoU6unXd3J6UhGUdod4piddKfVtctNBOh6k=; b=GtQZb6e/a2UoUMi586tubJowYBRZhnOu+aHW0dXIQQLWVlzFNoDe455ZB25H+YxqWy BDbPTgDN6EvC716H+OkeXPs6z8SBKwnA/3VwUP+eCqR76mSxlVr9d65QA5eIBVbbtXuE lWGJRDJ4b8UcSybiCxr1c4C/G7jaLsDubvgizqIFsE4TmRJBxzRTtTTRvetRQ8zfsPW3 PQhQEe/FgPmZX1iVtDSgTDyB0trHdh4F05r6ibwAxS2g85ylsmleuJDwSOajqCeo02VG i/1LQlr7ud/IX5MgEcMKiBbo3UWqTKpEH4KQRTuJZRd0TCYfYlrJ6HzqnR195xIvlLp0 qErw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 38308e7fff4ca-2faecc02bd4si2363251fa.156.2024.10.02.22.51.54; Wed, 02 Oct 2024 22:51:55 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 901A568D63C; Thu, 3 Oct 2024 08:51:50 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vidala.lynne.ee (vidala.pars.ee [116.203.72.101]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 45E5768C1B2 for ; Thu, 3 Oct 2024 08:51:44 +0300 (EEST) To: ffmpeg-devel@ffmpeg.org Date: Thu, 3 Oct 2024 07:51:28 +0200 Message-ID: <20241003055141.415483-1-dev@lynne.ee> X-Mailer: git-send-email 2.45.2.753.g447d99e1c3b MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/8] vulkan: always enable GL_EXT_scalar_block_layout X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Lynne via ffmpeg-devel From: Lynne Reply-To: FFmpeg development discussions and patches Cc: Lynne Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 6G9RZZsT3CuR This makes std430 (which we use everywhere already) fully match C layout. Extension was made mandatory in 1.2. --- libavutil/hwcontext_vulkan.c | 1 + libavutil/vulkan.c | 1 + 2 files changed, 2 insertions(+) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index f6d6ff6cb1..d6500de677 100644 --- a/libavutil/hwcontext_vulkan.c +++ b/libavutil/hwcontext_vulkan.c @@ -1501,6 +1501,7 @@ static int vulkan_device_create_internal(AVHWDeviceContext *ctx, p->device_features_1_1.uniformAndStorageBuffer16BitAccess = dev_features_1_1.uniformAndStorageBuffer16BitAccess; p->device_features_1_2.timelineSemaphore = 1; + p->device_features_1_2.scalarBlockLayout = dev_features_1_2.scalarBlockLayout; p->device_features_1_2.bufferDeviceAddress = dev_features_1_2.bufferDeviceAddress; p->device_features_1_2.hostQueryReset = dev_features_1_2.hostQueryReset; p->device_features_1_2.storagePushConstant8 = dev_features_1_2.storagePushConstant8; diff --git a/libavutil/vulkan.c b/libavutil/vulkan.c index 1dc168e645..c6aa6cdd10 100644 --- a/libavutil/vulkan.c +++ b/libavutil/vulkan.c @@ -1478,6 +1478,7 @@ int ff_vk_shader_init(FFVulkanContext *s, FFVulkanShader *shd, const char *name, /* Common utilities */ GLSLC(0, #define IS_WITHIN(v1, v2) ((v1.x < v2.x) && (v1.y < v2.y)) ); GLSLC(0, ); + GLSLC(0, #extension GL_EXT_scalar_block_layout : require ); GLSLC(0, #extension GL_EXT_buffer_reference : require ); GLSLC(0, #extension GL_EXT_buffer_reference2 : require );