1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

vulkan/ffv1: fix sync issue in cached bitstream reader/writer

The issue is that there is an explicit lack of synchronization as only the very
first invocation writes symbols and updates the state, which other invocations
then store.
This commit is contained in:
Lynne
2025-05-23 05:11:07 +09:00
parent b9b44e15b5
commit 977d1a24bc
2 changed files with 3 additions and 0 deletions

View File

@ -110,6 +110,8 @@ void decode_line(inout SliceContext sc, ivec2 sp, int w,
#ifdef CACHED_SYMBOL_READER #ifdef CACHED_SYMBOL_READER
} }
barrier();
sb.v = state[gl_LocalInvocationID.x]; sb.v = state[gl_LocalInvocationID.x];
#endif #endif
} }

View File

@ -107,6 +107,7 @@ void encode_line(inout SliceContext sc, readonly uimage2D img, uint state_off,
put_symbol(sc.c, context_off, d[1]); put_symbol(sc.c, context_off, d[1]);
#ifdef CACHED_SYMBOL_READER #ifdef CACHED_SYMBOL_READER
barrier();
sb.v = state[gl_LocalInvocationID.x]; sb.v = state[gl_LocalInvocationID.x];
#endif #endif
} }