US 12,014,208 B2
Techniques for reducing serialization in divergent control flow
Skyler Jonathon Saleh, La Jolla, CA (US); and Maxim V. Kazakov, La Jolla, CA (US)
Assigned to Advanced Micro Devices, Inc., Santa Clara, CA (US)
Filed by Advanced Micro Devices, Inc., Santa Clara, CA (US)
Filed on Jun. 29, 2018, as Appl. No. 16/023,897.
Prior Publication US 2020/0004585 A1, Jan. 2, 2020
Int. Cl. G06F 9/46 (2006.01); G06F 9/38 (2018.01); G06F 9/48 (2006.01); G06F 9/52 (2006.01); G06T 15/00 (2011.01); G06T 15/80 (2011.01)
CPC G06F 9/4881 (2013.01) [G06F 9/3887 (2013.01); G06T 15/005 (2013.01); G06T 15/80 (2013.01); G06F 9/4843 (2013.01); G06F 9/52 (2013.01)] 20 Claims
OG exemplary drawing
 
1. A method for improving execution of a shader program, having divergent control flow, the method comprising:
as a result of calling a function pointer having a target function that differs for two or more work-items of a first wavefront of the shader program, detecting entry of the first wavefront into a divergent section, wherein, in the divergent section, a first set of one or more work-items is slated to execute a first function and additional work-items are slated to execute a second function different from the first function;
selecting a plurality of work-items that target the first function for execution as a second wavefront, wherein the plurality of work-items include work-items from the first wavefront and one or more work-items from an additional wavefront; and
executing the second wavefront.