mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-10-24 02:09:03 +03:00
vulkan/prores_ks_trellis_node: size the per-subgroup totals for the smallest subgroups
The driver may run the shader with subgroups smaller than the maximum, and the extra subgroups then wrote past the array.
This commit is contained in:
@@ -293,7 +293,8 @@ static int init_trellis_node_pipeline(ProresVulkanContext *pv, FFVulkanShader* s
|
||||
int err = 0;
|
||||
FFVulkanContext *vkctx = &pv->vkctx;
|
||||
FFVulkanDescriptorSetBinding *desc;
|
||||
int subgroup_size = vkctx->subgroup_props.maxSubgroupSize;
|
||||
/* The driver picks the subgroup size; size for the most it may use */
|
||||
int subgroup_size = vkctx->subgroup_props.minSubgroupSize;
|
||||
int num_subgroups = FFALIGN(pv->ctx.mb_height, subgroup_size) / subgroup_size;
|
||||
|
||||
SPEC_LIST_CREATE(sl, 8, 8 * sizeof(uint32_t))
|
||||
|
||||
@@ -172,7 +172,8 @@ void main() [[maximally_reconverges]]
|
||||
slice_row_size = force_slice_row_quants();
|
||||
|
||||
int subgroup_sum = subgroupAdd(slice_row_size);
|
||||
subgroup_sizes[gl_SubgroupID] = subgroup_sum;
|
||||
if (subgroupElect())
|
||||
subgroup_sizes[gl_SubgroupID] = subgroup_sum;
|
||||
barrier();
|
||||
|
||||
int buf_start = subgroupExclusiveAdd(slice_row_size);
|
||||
|
||||
Reference in New Issue
Block a user