HLSL: implement numthreads for compute shaders
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.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
set(SOURCES
|
||||
hlslAttributes.cpp
|
||||
hlslParseHelper.cpp
|
||||
hlslScanContext.cpp
|
||||
hlslOpMap.cpp
|
||||
@@ -6,7 +7,8 @@ set(SOURCES
|
||||
hlslGrammar.cpp
|
||||
hlslParseables.cpp)
|
||||
|
||||
set(HEADERS
|
||||
set(HEADERS
|
||||
hlslAttributes.h
|
||||
hlslParseHelper.h
|
||||
hlslTokens.h
|
||||
hlslScanContext.h
|
||||
|
||||
Reference in New Issue
Block a user