diff --git a/include/mbgl/shaders/gl/shader_info.hpp b/include/mbgl/shaders/gl/shader_info.hpp index 7d9228a2d..1d9c6c969 100644 --- a/include/mbgl/shaders/gl/shader_info.hpp +++ b/include/mbgl/shaders/gl/shader_info.hpp @@ -220,7 +220,7 @@ struct ShaderInfo { }; template <> -struct ShaderInfo { +struct ShaderInfo { static const std::vector attributes; static const std::vector uniformBlocks; static const std::vector textures; diff --git a/include/mbgl/shaders/gl/symbol_sdf.hpp b/include/mbgl/shaders/gl/symbol_sdf.hpp index 12d88136a..1329676bd 100644 --- a/include/mbgl/shaders/gl/symbol_sdf.hpp +++ b/include/mbgl/shaders/gl/symbol_sdf.hpp @@ -6,8 +6,8 @@ namespace mbgl { namespace shaders { template <> -struct ShaderSource { - static constexpr const char* name = "SymbolSDFIconShader"; +struct ShaderSource { + static constexpr const char* name = "SymbolSDFShader"; static constexpr const char* vertex = R"(layout (location = 0) in vec4 a_pos_offset; layout (location = 1) in vec4 a_data; layout (location = 2) in vec4 a_pixeloffset; diff --git a/include/mbgl/shaders/mtl/symbol.hpp b/include/mbgl/shaders/mtl/symbol.hpp index 997f569b0..118eb5b61 100644 --- a/include/mbgl/shaders/mtl/symbol.hpp +++ b/include/mbgl/shaders/mtl/symbol.hpp @@ -211,8 +211,8 @@ half4 fragment fragmentMain(FragmentStage in [[stage_in]], }; template <> -struct ShaderSource { - static constexpr auto name = "SymbolSDFIconShader"; +struct ShaderSource { + static constexpr auto name = "SymbolSDFShader"; static constexpr auto vertexMainFunction = "vertexMain"; static constexpr auto fragmentMainFunction = "fragmentMain"; diff --git a/include/mbgl/shaders/shader_source.hpp b/include/mbgl/shaders/shader_source.hpp index 5e387d186..6f3e3111b 100644 --- a/include/mbgl/shaders/shader_source.hpp +++ b/include/mbgl/shaders/shader_source.hpp @@ -38,7 +38,7 @@ enum class BuiltIn { LineSDFShader, RasterShader, SymbolIconShader, - SymbolSDFIconShader, + SymbolSDFShader, SymbolTextAndIconShader, WideVectorShader }; diff --git a/include/mbgl/shaders/vulkan/symbol.hpp b/include/mbgl/shaders/vulkan/symbol.hpp index 75be0c266..31664b14f 100644 --- a/include/mbgl/shaders/vulkan/symbol.hpp +++ b/include/mbgl/shaders/vulkan/symbol.hpp @@ -203,8 +203,8 @@ void main() { }; template <> -struct ShaderSource { - static constexpr const char* name = "SymbolSDFIconShader"; +struct ShaderSource { + static constexpr const char* name = "SymbolSDFShader"; static const std::array attributes; static constexpr std::array instanceAttributes{}; diff --git a/shaders/manifest.json b/shaders/manifest.json index 7a6e3d3f6..8ea7f8c5b 100644 --- a/shaders/manifest.json +++ b/shaders/manifest.json @@ -201,7 +201,7 @@ "uses_ubos": true }, { - "name": "SymbolSDFIconShader", + "name": "SymbolSDFShader", "header": "symbol_sdf", "glsl_vert": "symbol_sdf.vertex.glsl", "glsl_frag": "symbol_sdf.fragment.glsl", diff --git a/src/mbgl/gl/renderer_backend.cpp b/src/mbgl/gl/renderer_backend.cpp index 4f04687c6..a11c799a6 100644 --- a/src/mbgl/gl/renderer_backend.cpp +++ b/src/mbgl/gl/renderer_backend.cpp @@ -144,7 +144,7 @@ void RendererBackend::initShaders(gfx::ShaderRegistry& shaders, const ProgramPar shaders::BuiltIn::LocationIndicatorTexturedShader, shaders::BuiltIn::RasterShader, shaders::BuiltIn::SymbolIconShader, - shaders::BuiltIn::SymbolSDFIconShader, + shaders::BuiltIn::SymbolSDFShader, shaders::BuiltIn::SymbolTextAndIconShader>(shaders, programParameters); } diff --git a/src/mbgl/mtl/renderer_backend.cpp b/src/mbgl/mtl/renderer_backend.cpp index 3fc14b25a..0511768f4 100644 --- a/src/mbgl/mtl/renderer_backend.cpp +++ b/src/mbgl/mtl/renderer_backend.cpp @@ -129,7 +129,7 @@ void RendererBackend::initShaders(gfx::ShaderRegistry& shaders, const ProgramPar shaders::BuiltIn::LocationIndicatorTexturedShader, shaders::BuiltIn::RasterShader, shaders::BuiltIn::SymbolIconShader, - shaders::BuiltIn::SymbolSDFIconShader, + shaders::BuiltIn::SymbolSDFShader, shaders::BuiltIn::SymbolTextAndIconShader, shaders::BuiltIn::WideVectorShader>(shaders, programParameters); } diff --git a/src/mbgl/renderer/layers/render_symbol_layer.cpp b/src/mbgl/renderer/layers/render_symbol_layer.cpp index 40ec6d7ea..a6abe183b 100644 --- a/src/mbgl/renderer/layers/render_symbol_layer.cpp +++ b/src/mbgl/renderer/layers/render_symbol_layer.cpp @@ -40,7 +40,7 @@ using namespace shaders; namespace { constexpr std::string_view SymbolIconShaderName = "SymbolIconShader"; -constexpr std::string_view SymbolSDFIconShaderName = "SymbolSDFIconShader"; +constexpr std::string_view SymbolSDFShaderName = "SymbolSDFShader"; constexpr std::string_view SymbolTextAndIconShaderName = "SymbolTextAndIconShader"; constexpr std::string_view CollisionBoxShaderName = "CollisionBoxShader"; constexpr std::string_view CollisionCircleShaderName = "CollisionCircleShader"; @@ -475,7 +475,7 @@ void RenderSymbolLayer::update(gfx::ShaderRegistry& shaders, symbolIconGroup = shaders.getShaderGroup(std::string(SymbolIconShaderName)); } if (!symbolSDFGroup) { - symbolSDFGroup = shaders.getShaderGroup(std::string(SymbolSDFIconShaderName)); + symbolSDFGroup = shaders.getShaderGroup(std::string(SymbolSDFShaderName)); } if (!symbolTextAndIconGroup) { symbolTextAndIconGroup = shaders.getShaderGroup(std::string(SymbolTextAndIconShaderName)); diff --git a/src/mbgl/shaders/gl/shader_info.cpp b/src/mbgl/shaders/gl/shader_info.cpp index 7e9e28a5c..03643e4a0 100644 --- a/src/mbgl/shaders/gl/shader_info.cpp +++ b/src/mbgl/shaders/gl/shader_info.cpp @@ -467,15 +467,15 @@ const std::vector SymbolIconShaderInfo::textures = { }; // Symbol SDF -using SymbolSDFIconShaderInfo = ShaderInfo; +using SymbolSDFShaderInfo = ShaderInfo; -const std::vector SymbolSDFIconShaderInfo::uniformBlocks = { +const std::vector SymbolSDFShaderInfo::uniformBlocks = { UniformBlockInfo{"GlobalPaintParamsUBO", idGlobalPaintParamsUBO}, UniformBlockInfo{"SymbolDrawableUBO", idSymbolDrawableUBO}, UniformBlockInfo{"SymbolTilePropsUBO", idSymbolTilePropsUBO}, UniformBlockInfo{"SymbolEvaluatedPropsUBO", idSymbolEvaluatedPropsUBO}, }; -const std::vector SymbolSDFIconShaderInfo::attributes = { +const std::vector SymbolSDFShaderInfo::attributes = { AttributeInfo{"a_pos_offset", idSymbolPosOffsetVertexAttribute}, AttributeInfo{"a_data", idSymbolDataVertexAttribute}, AttributeInfo{"a_pixeloffset", idSymbolPixelOffsetVertexAttribute}, @@ -487,7 +487,7 @@ const std::vector SymbolSDFIconShaderInfo::attributes = { AttributeInfo{"a_halo_width", idSymbolHaloWidthVertexAttribute}, AttributeInfo{"a_halo_blur", idSymbolHaloBlurVertexAttribute}, }; -const std::vector SymbolSDFIconShaderInfo::textures = { +const std::vector SymbolSDFShaderInfo::textures = { TextureInfo{"u_texture", idSymbolImageTexture}, }; diff --git a/src/mbgl/shaders/mtl/symbol.cpp b/src/mbgl/shaders/mtl/symbol.cpp index 2d1d51e6a..67d1a2be6 100644 --- a/src/mbgl/shaders/mtl/symbol.cpp +++ b/src/mbgl/shaders/mtl/symbol.cpp @@ -27,9 +27,9 @@ const std::array SymbolIconShaderSource::textures = { // // Symbol sdf -using SymbolSDFIconShaderSource = ShaderSource; +using SymbolSDFShaderSource = ShaderSource; -const std::array SymbolSDFIconShaderSource::attributes = { +const std::array SymbolSDFShaderSource::attributes = { // always attributes AttributeInfo{symbolUBOCount + 0, gfx::AttributeDataType::Short4, idSymbolPosOffsetVertexAttribute}, AttributeInfo{symbolUBOCount + 1, gfx::AttributeDataType::UShort4, idSymbolDataVertexAttribute}, @@ -44,7 +44,7 @@ const std::array SymbolSDFIconShaderSource::attributes = { AttributeInfo{symbolUBOCount + 8, gfx::AttributeDataType::Float, idSymbolHaloWidthVertexAttribute}, AttributeInfo{symbolUBOCount + 9, gfx::AttributeDataType::Float, idSymbolHaloBlurVertexAttribute}, }; -const std::array SymbolSDFIconShaderSource::textures = { +const std::array SymbolSDFShaderSource::textures = { TextureInfo{0, idSymbolImageTexture}, }; diff --git a/src/mbgl/shaders/vulkan/symbol.cpp b/src/mbgl/shaders/vulkan/symbol.cpp index b2a398071..c938145d0 100644 --- a/src/mbgl/shaders/vulkan/symbol.cpp +++ b/src/mbgl/shaders/vulkan/symbol.cpp @@ -28,9 +28,9 @@ const std::array SymbolIconShaderSource::textures = { // // Symbol sdf -using SymbolSDFIconShaderSource = ShaderSource; +using SymbolSDFShaderSource = ShaderSource; -const std::array SymbolSDFIconShaderSource::attributes = { +const std::array SymbolSDFShaderSource::attributes = { // always attributes AttributeInfo{0, gfx::AttributeDataType::Short4, idSymbolPosOffsetVertexAttribute}, AttributeInfo{1, gfx::AttributeDataType::UShort4, idSymbolDataVertexAttribute}, @@ -45,7 +45,7 @@ const std::array SymbolSDFIconShaderSource::attributes = { AttributeInfo{8, gfx::AttributeDataType::Float, idSymbolHaloWidthVertexAttribute}, AttributeInfo{9, gfx::AttributeDataType::Float, idSymbolHaloBlurVertexAttribute}, }; -const std::array SymbolSDFIconShaderSource::textures = { +const std::array SymbolSDFShaderSource::textures = { TextureInfo{0, idSymbolImageTexture}, }; diff --git a/src/mbgl/vulkan/renderer_backend.cpp b/src/mbgl/vulkan/renderer_backend.cpp index e20826c3d..9f4de91b3 100644 --- a/src/mbgl/vulkan/renderer_backend.cpp +++ b/src/mbgl/vulkan/renderer_backend.cpp @@ -692,7 +692,7 @@ void RendererBackend::initShaders(gfx::ShaderRegistry& shaders, const ProgramPar shaders::BuiltIn::LocationIndicatorTexturedShader, shaders::BuiltIn::RasterShader, shaders::BuiltIn::SymbolIconShader, - shaders::BuiltIn::SymbolSDFIconShader, + shaders::BuiltIn::SymbolSDFShader, shaders::BuiltIn::SymbolTextAndIconShader, shaders::BuiltIn::WideVectorShader>(shaders, programParameters); } diff --git a/test/util/hash.test.cpp b/test/util/hash.test.cpp index 7d8c32ad8..dee37bdca 100644 --- a/test/util/hash.test.cpp +++ b/test/util/hash.test.cpp @@ -153,7 +153,7 @@ TEST(OrderIndependentHash, Shaders) { BuiltIn::LocationIndicatorTexturedShader, BuiltIn::RasterShader, BuiltIn::SymbolIconShader, - BuiltIn::SymbolSDFIconShader, + BuiltIn::SymbolSDFShader, BuiltIn::SymbolTextAndIconShader>(); }