mirror of
https://github.com/RPCS3/glslang.git
synced 2024-12-21 10:48:14 +00:00
1868b14435
This PR adds handling of the numthreads attribute for compute shaders, as well as a general infrastructure for returning attribute values from acceptAttributes, which may be needed in other cases, e.g, unroll(x), or merely to know if some attribute without params was given. A map of enum values from TAttributeType to TIntermAggregate nodes is built and returned. It can be queried with operator[] on the map. In the future there may be a need to also handle strings (e.g, for patchconstantfunc), and those can be easily added into the class if needed. New test is in hlsl.numthreads.comp.
15 lines
236 B
Plaintext
15 lines
236 B
Plaintext
|
|
[numthreads(8,8,1)]
|
|
void main(uint3 tid : SV_DispatchThreadID )
|
|
{
|
|
}
|
|
|
|
[numTHreaDs(4,4,2)] // case insensitive
|
|
void main_aux1(uint3 tid : SV_DispatchThreadID )
|
|
{
|
|
}
|
|
|
|
[numthreads(1,4,8)]
|
|
void main_aux2(uint3 tid : SV_DispatchThreadID );
|
|
|