mirror of
https://github.com/libretro/glslang.git
synced 2024-11-23 07:39:44 +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.
29 lines
573 B
CMake
Executable File
29 lines
573 B
CMake
Executable File
set(SOURCES
|
|
hlslAttributes.cpp
|
|
hlslParseHelper.cpp
|
|
hlslScanContext.cpp
|
|
hlslOpMap.cpp
|
|
hlslTokenStream.cpp
|
|
hlslGrammar.cpp
|
|
hlslParseables.cpp)
|
|
|
|
set(HEADERS
|
|
hlslAttributes.h
|
|
hlslParseHelper.h
|
|
hlslTokens.h
|
|
hlslScanContext.h
|
|
hlslOpMap.h
|
|
hlslTokenStream.h
|
|
hlslGrammar.h
|
|
hlslParseables.h)
|
|
|
|
add_library(HLSL STATIC ${SOURCES} ${HEADERS})
|
|
set_property(TARGET HLSL PROPERTY FOLDER hlsl)
|
|
|
|
if(WIN32)
|
|
source_group("Source" FILES ${SOURCES} ${HEADERS})
|
|
endif(WIN32)
|
|
|
|
install(TARGETS HLSL
|
|
ARCHIVE DESTINATION lib)
|