mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-08 21:37:58 +00:00
Format all C++ and Java code via clang-format
Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
This commit is contained in:
@@ -8,10 +8,8 @@ namespace gpu
|
||||
struct GLProgramInfo
|
||||
{
|
||||
GLProgramInfo() = default;
|
||||
GLProgramInfo(std::string const & vertexShaderName,
|
||||
std::string const & fragmentShaderName,
|
||||
char const * const vertexSource,
|
||||
char const * const fragmentSource)
|
||||
GLProgramInfo(std::string const & vertexShaderName, std::string const & fragmentShaderName,
|
||||
char const * const vertexSource, char const * const fragmentSource)
|
||||
: m_vertexShaderName(vertexShaderName)
|
||||
, m_fragmentShaderName(fragmentShaderName)
|
||||
, m_vertexShaderSource(vertexSource)
|
||||
|
||||
@@ -26,8 +26,7 @@ struct UniformsGuard
|
||||
~UniformsGuard()
|
||||
{
|
||||
auto const uniformsCount = m_program->GetNumericUniformsCount();
|
||||
CHECK_EQUAL(m_counter, uniformsCount, ("Not all numeric uniforms are set up",
|
||||
m_program->GetName(), m_paramsName));
|
||||
CHECK_EQUAL(m_counter, uniformsCount, ("Not all numeric uniforms are set up", m_program->GetName(), m_paramsName));
|
||||
}
|
||||
|
||||
ref_ptr<dp::GLGpuProgram> m_program;
|
||||
@@ -35,13 +34,18 @@ struct UniformsGuard
|
||||
uint32_t m_counter = 0;
|
||||
};
|
||||
|
||||
template <typename ParamType> class GLTypeWrapper;
|
||||
template <typename ParamType>
|
||||
class GLTypeWrapper;
|
||||
|
||||
#define BIND_GL_TYPE(DataType, GLType) \
|
||||
template <> class GLTypeWrapper<DataType> \
|
||||
{ \
|
||||
public: \
|
||||
static glConst Value() { return GLType; } \
|
||||
template <> \
|
||||
class GLTypeWrapper<DataType> \
|
||||
{ \
|
||||
public: \
|
||||
static glConst Value() \
|
||||
{ \
|
||||
return GLType; \
|
||||
} \
|
||||
};
|
||||
|
||||
BIND_GL_TYPE(float, gl_const::GLFloatType)
|
||||
@@ -57,18 +61,16 @@ BIND_GL_TYPE(glsl::ivec4, gl_const::GLIntVec4)
|
||||
class Parameter
|
||||
{
|
||||
public:
|
||||
template<typename ParamType>
|
||||
static void CheckApply(UniformsGuard & guard, std::string const & name,
|
||||
ParamType const & t)
|
||||
template <typename ParamType>
|
||||
static void CheckApply(UniformsGuard & guard, std::string const & name, ParamType const & t)
|
||||
{
|
||||
if (Apply<ParamType>(guard.m_program, name, t))
|
||||
guard.m_counter++;
|
||||
}
|
||||
|
||||
private:
|
||||
template<typename ParamType>
|
||||
static bool Apply(ref_ptr<dp::GLGpuProgram> program, std::string const & name,
|
||||
ParamType const & p)
|
||||
template <typename ParamType>
|
||||
static bool Apply(ref_ptr<dp::GLGpuProgram> program, std::string const & name, ParamType const & p)
|
||||
{
|
||||
auto const location = program->GetUniformLocation(name);
|
||||
if (location < 0)
|
||||
@@ -81,8 +83,7 @@ private:
|
||||
};
|
||||
} // namespace
|
||||
|
||||
void GLProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program,
|
||||
void GLProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
MapProgramParams const & params)
|
||||
{
|
||||
UNUSED_VALUE(context);
|
||||
@@ -98,8 +99,7 @@ void GLProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
Parameter::CheckApply(guard, "u_contrastGamma", params.m_contrastGamma);
|
||||
}
|
||||
|
||||
void GLProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program,
|
||||
void GLProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
RouteProgramParams const & params)
|
||||
{
|
||||
UNUSED_VALUE(context);
|
||||
@@ -121,8 +121,7 @@ void GLProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
Parameter::CheckApply(guard, "u_fakeOutlineColor", params.m_fakeOutlineColor);
|
||||
}
|
||||
|
||||
void GLProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program,
|
||||
void GLProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
TrafficProgramParams const & params)
|
||||
{
|
||||
UNUSED_VALUE(context);
|
||||
@@ -139,8 +138,7 @@ void GLProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
Parameter::CheckApply(guard, "u_darkArrowColor", params.m_darkArrowColorAligned);
|
||||
}
|
||||
|
||||
void GLProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program,
|
||||
void GLProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
TransitProgramParams const & params)
|
||||
{
|
||||
UNUSED_VALUE(context);
|
||||
@@ -154,8 +152,7 @@ void GLProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
Parameter::CheckApply(guard, "u_maxRadius", params.m_maxRadius);
|
||||
}
|
||||
|
||||
void GLProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program,
|
||||
void GLProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
GuiProgramParams const & params)
|
||||
{
|
||||
UNUSED_VALUE(context);
|
||||
@@ -170,8 +167,7 @@ void GLProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
Parameter::CheckApply(guard, "u_length", params.m_length);
|
||||
}
|
||||
|
||||
void GLProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program,
|
||||
void GLProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
ShapesProgramParams const & params)
|
||||
{
|
||||
UNUSED_VALUE(context);
|
||||
@@ -188,8 +184,7 @@ void GLProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
Parameter::CheckApply(guard, "u_azimut", params.m_azimut);
|
||||
}
|
||||
|
||||
void GLProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program,
|
||||
void GLProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
Arrow3dProgramParams const & params)
|
||||
{
|
||||
UNUSED_VALUE(context);
|
||||
@@ -201,8 +196,7 @@ void GLProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
Parameter::CheckApply(guard, "u_texCoordFlipping", params.m_texCoordFlipping);
|
||||
}
|
||||
|
||||
void GLProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program,
|
||||
void GLProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
DebugRectProgramParams const & params)
|
||||
{
|
||||
UNUSED_VALUE(context);
|
||||
@@ -211,8 +205,7 @@ void GLProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
Parameter::CheckApply(guard, "u_color", params.m_color);
|
||||
}
|
||||
|
||||
void GLProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program,
|
||||
void GLProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
ScreenQuadProgramParams const & params)
|
||||
{
|
||||
UNUSED_VALUE(context);
|
||||
@@ -221,8 +214,7 @@ void GLProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
Parameter::CheckApply(guard, "u_opacity", params.m_opacity);
|
||||
}
|
||||
|
||||
void GLProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program,
|
||||
void GLProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
SMAAProgramParams const & params)
|
||||
{
|
||||
UNUSED_VALUE(context);
|
||||
@@ -231,8 +223,7 @@ void GLProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
Parameter::CheckApply(guard, "u_framebufferMetrics", params.m_framebufferMetrics);
|
||||
}
|
||||
|
||||
void GLProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program,
|
||||
void GLProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
ImGuiProgramParams const & params)
|
||||
{
|
||||
UNUSED_VALUE(context);
|
||||
|
||||
@@ -9,27 +9,27 @@ namespace gpu
|
||||
class GLProgramParamsSetter : public ProgramParamsSetter
|
||||
{
|
||||
public:
|
||||
void Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program, MapProgramParams const & params) override;
|
||||
void Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program, RouteProgramParams const & params) override;
|
||||
void Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program, TrafficProgramParams const & params) override;
|
||||
void Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program, TransitProgramParams const & params) override;
|
||||
void Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program, GuiProgramParams const & params) override;
|
||||
void Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program, ShapesProgramParams const & params) override;
|
||||
void Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program, Arrow3dProgramParams const & params) override;
|
||||
void Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program, DebugRectProgramParams const & params) override;
|
||||
void Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program, ScreenQuadProgramParams const & params) override;
|
||||
void Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program, SMAAProgramParams const & params) override;
|
||||
void Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program, ImGuiProgramParams const & params) override;
|
||||
void Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
MapProgramParams const & params) override;
|
||||
void Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
RouteProgramParams const & params) override;
|
||||
void Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
TrafficProgramParams const & params) override;
|
||||
void Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
TransitProgramParams const & params) override;
|
||||
void Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
GuiProgramParams const & params) override;
|
||||
void Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
ShapesProgramParams const & params) override;
|
||||
void Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
Arrow3dProgramParams const & params) override;
|
||||
void Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
DebugRectProgramParams const & params) override;
|
||||
void Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
ScreenQuadProgramParams const & params) override;
|
||||
void Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
SMAAProgramParams const & params) override;
|
||||
void Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
ImGuiProgramParams const & params) override;
|
||||
};
|
||||
} // namespace gpu
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
#include "shaders/gl_program_pool.hpp"
|
||||
#include "shaders/program_params.hpp"
|
||||
#include "shaders/gl_shaders.hpp"
|
||||
#include "shaders/program_params.hpp"
|
||||
|
||||
#include "drape/gl_gpu_program.hpp"
|
||||
#include "drape/gl_functions.hpp"
|
||||
#include "drape/gl_gpu_program.hpp"
|
||||
|
||||
namespace gpu
|
||||
{
|
||||
GLProgramPool::GLProgramPool(dp::ApiVersion apiVersion)
|
||||
: m_apiVersion(apiVersion)
|
||||
GLProgramPool::GLProgramPool(dp::ApiVersion apiVersion) : m_apiVersion(apiVersion)
|
||||
{
|
||||
ProgramParams::Init();
|
||||
|
||||
@@ -31,10 +30,10 @@ GLProgramPool::~GLProgramPool()
|
||||
drape_ptr<dp::GpuProgram> GLProgramPool::Get(Program program)
|
||||
{
|
||||
auto const programInfo = GetProgramInfo(m_apiVersion, program);
|
||||
auto vertexShader = GetShader(programInfo.m_vertexShaderName, programInfo.m_vertexShaderSource,
|
||||
dp::Shader::Type::VertexShader);
|
||||
auto fragmentShader = GetShader(programInfo.m_fragmentShaderName, programInfo.m_fragmentShaderSource,
|
||||
dp::Shader::Type::FragmentShader);
|
||||
auto vertexShader =
|
||||
GetShader(programInfo.m_vertexShaderName, programInfo.m_vertexShaderSource, dp::Shader::Type::VertexShader);
|
||||
auto fragmentShader =
|
||||
GetShader(programInfo.m_fragmentShaderName, programInfo.m_fragmentShaderSource, dp::Shader::Type::FragmentShader);
|
||||
|
||||
auto const name = DebugPrint(program);
|
||||
return make_unique_dp<dp::GLGpuProgram>(name, vertexShader, fragmentShader);
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
#include "shaders/program_pool.hpp"
|
||||
|
||||
#include "drape/drape_global.hpp"
|
||||
#include "drape/shader.hpp"
|
||||
#include "drape/pointers.hpp"
|
||||
#include "drape/shader.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <map>
|
||||
@@ -23,8 +23,7 @@ public:
|
||||
void SetDefines(std::string const & defines);
|
||||
|
||||
private:
|
||||
ref_ptr<dp::Shader> GetShader(std::string const & name, std::string const & source,
|
||||
dp::Shader::Type type);
|
||||
ref_ptr<dp::Shader> GetShader(std::string const & name, std::string const & source, dp::Shader::Type type);
|
||||
|
||||
dp::ApiVersion const m_apiVersion;
|
||||
std::string m_baseDefines;
|
||||
|
||||
@@ -15,10 +15,10 @@ enum class SystemProgram
|
||||
ClearColor = 0,
|
||||
ClearDepth,
|
||||
ClearColorAndDepth,
|
||||
|
||||
|
||||
SystemProgramsCount
|
||||
};
|
||||
|
||||
|
||||
namespace metal
|
||||
{
|
||||
class MetalProgramPool : public ProgramPool
|
||||
@@ -29,13 +29,11 @@ public:
|
||||
|
||||
drape_ptr<dp::GpuProgram> Get(Program program) override;
|
||||
drape_ptr<dp::GpuProgram> GetSystemProgram(SystemProgram program);
|
||||
|
||||
|
||||
private:
|
||||
drape_ptr<dp::GpuProgram> Get(std::string const & programName,
|
||||
std::string const & vertexShaderName,
|
||||
std::string const & fragmentShaderName,
|
||||
std::map<uint8_t, uint8_t> const & layout);
|
||||
|
||||
drape_ptr<dp::GpuProgram> Get(std::string const & programName, std::string const & vertexShaderName,
|
||||
std::string const & fragmentShaderName, std::map<uint8_t, uint8_t> const & layout);
|
||||
|
||||
id<MTLFunction> GetFunction(std::string const & name);
|
||||
id<MTLDevice> m_device;
|
||||
id<MTLLibrary> m_library;
|
||||
|
||||
@@ -80,8 +80,8 @@ void ProgramManager::InitForOpenGL(ref_ptr<dp::GraphicsContext> context)
|
||||
void ProgramManager::InitForVulkan(ref_ptr<dp::GraphicsContext> context)
|
||||
{
|
||||
m_pool = make_unique_dp<vulkan::VulkanProgramPool>(context);
|
||||
m_paramsSetter = make_unique_dp<vulkan::VulkanProgramParamsSetter>(context,
|
||||
make_ref(static_cast<vulkan::VulkanProgramPool *>(m_pool.get())));
|
||||
m_paramsSetter = make_unique_dp<vulkan::VulkanProgramParamsSetter>(
|
||||
context, make_ref(static_cast<vulkan::VulkanProgramPool *>(m_pool.get())));
|
||||
}
|
||||
|
||||
void ProgramManager::DestroyForVulkan(ref_ptr<dp::GraphicsContext> context)
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "shaders/program_pool.hpp"
|
||||
#include "shaders/program_params.hpp"
|
||||
#include "shaders/program_pool.hpp"
|
||||
|
||||
#include "drape/drape_global.hpp"
|
||||
#include "drape/graphics_context.hpp"
|
||||
#include "drape/gpu_program.hpp"
|
||||
#include "drape/graphics_context.hpp"
|
||||
#include "drape/pointers.hpp"
|
||||
|
||||
#include "base/macros.hpp"
|
||||
@@ -38,8 +38,7 @@ private:
|
||||
void DestroyForMetal(ref_ptr<dp::GraphicsContext> context);
|
||||
#endif
|
||||
|
||||
using Programs = std::array<drape_ptr<dp::GpuProgram>,
|
||||
static_cast<size_t>(Program::ProgramsCount)>;
|
||||
using Programs = std::array<drape_ptr<dp::GpuProgram>, static_cast<size_t>(Program::ProgramsCount)>;
|
||||
drape_ptr<ProgramPool> m_pool;
|
||||
Programs m_programs;
|
||||
drape_ptr<ProgramParamsSetter> m_paramsSetter;
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
#include "drape/drape_global.hpp"
|
||||
#include "drape/glsl_types.hpp"
|
||||
#include "drape/graphics_context.hpp"
|
||||
#include "drape/gpu_program.hpp"
|
||||
#include "drape/graphics_context.hpp"
|
||||
#include "drape/pointers.hpp"
|
||||
|
||||
#include "base/assert.hpp"
|
||||
@@ -28,22 +28,24 @@ private:
|
||||
static std::map<std::string, std::string> m_boundParams;
|
||||
};
|
||||
|
||||
#define BIND_PROGRAMS(ParamsType, ...) \
|
||||
static std::vector<gpu::Program> const & GetBoundPrograms() \
|
||||
{ \
|
||||
static std::vector<gpu::Program> programs = {__VA_ARGS__}; \
|
||||
return programs; \
|
||||
} \
|
||||
static std::string GetName() { return std::string(#ParamsType); } \
|
||||
static void BindPrograms(std::map<std::string, std::string> & params) \
|
||||
{ \
|
||||
for (auto const p : GetBoundPrograms()) \
|
||||
{ \
|
||||
auto const programName = DebugPrint(p); \
|
||||
CHECK(params.find(programName) == params.cend(), \
|
||||
("Program has already bound", programName)); \
|
||||
params[programName] = GetName(); \
|
||||
} \
|
||||
#define BIND_PROGRAMS(ParamsType, ...) \
|
||||
static std::vector<gpu::Program> const & GetBoundPrograms() \
|
||||
{ \
|
||||
static std::vector<gpu::Program> programs = {__VA_ARGS__}; \
|
||||
return programs; \
|
||||
} \
|
||||
static std::string GetName() \
|
||||
{ \
|
||||
return std::string(#ParamsType); \
|
||||
} \
|
||||
static void BindPrograms(std::map<std::string, std::string> & params) \
|
||||
{ \
|
||||
for (auto const p : GetBoundPrograms()) \
|
||||
{ \
|
||||
auto const programName = DebugPrint(p); \
|
||||
CHECK(params.find(programName) == params.cend(), ("Program has already bound", programName)); \
|
||||
params[programName] = GetName(); \
|
||||
} \
|
||||
}
|
||||
|
||||
#define ALIGNMENT alignas(16)
|
||||
@@ -63,37 +65,15 @@ struct ALIGNMENT MapProgramParams
|
||||
float m_zScale = 1.0f;
|
||||
float m_interpolation = 1.0f;
|
||||
float m_isOutlinePass = 1.0f;
|
||||
|
||||
BIND_PROGRAMS(MapProgramParams,
|
||||
Program::Area,
|
||||
Program::Area3d,
|
||||
Program::Area3dOutline,
|
||||
Program::AreaOutline,
|
||||
Program::Bookmark,
|
||||
Program::BookmarkAnim,
|
||||
Program::BookmarkAnimBillboard,
|
||||
Program::BookmarkBillboard,
|
||||
Program::CapJoin,
|
||||
Program::CirclePoint,
|
||||
Program::ColoredSymbol,
|
||||
Program::ColoredSymbolBillboard,
|
||||
Program::DashedLine,
|
||||
Program::TransparentArea,
|
||||
Program::HatchingArea,
|
||||
Program::Line,
|
||||
Program::MaskedTexturing,
|
||||
Program::MaskedTexturingBillboard,
|
||||
Program::PathSymbol,
|
||||
Program::Text,
|
||||
Program::TextBillboard,
|
||||
Program::TextOutlined,
|
||||
Program::TextOutlinedBillboard,
|
||||
Program::Texturing,
|
||||
Program::TexturingBillboard,
|
||||
Program::BookmarkAboveText,
|
||||
Program::BookmarkAnimAboveText,
|
||||
Program::BookmarkAnimAboveTextBillboard,
|
||||
Program::BookmarkAboveTextBillboard)
|
||||
|
||||
BIND_PROGRAMS(MapProgramParams, Program::Area, Program::Area3d, Program::Area3dOutline, Program::AreaOutline,
|
||||
Program::Bookmark, Program::BookmarkAnim, Program::BookmarkAnimBillboard, Program::BookmarkBillboard,
|
||||
Program::CapJoin, Program::CirclePoint, Program::ColoredSymbol, Program::ColoredSymbolBillboard,
|
||||
Program::DashedLine, Program::TransparentArea, Program::HatchingArea, Program::Line,
|
||||
Program::MaskedTexturing, Program::MaskedTexturingBillboard, Program::PathSymbol, Program::Text,
|
||||
Program::TextBillboard, Program::TextOutlined, Program::TextOutlinedBillboard, Program::Texturing,
|
||||
Program::TexturingBillboard, Program::BookmarkAboveText, Program::BookmarkAnimAboveText,
|
||||
Program::BookmarkAnimAboveTextBillboard, Program::BookmarkAboveTextBillboard)
|
||||
};
|
||||
|
||||
struct ALIGNMENT RouteProgramParams
|
||||
@@ -112,12 +92,8 @@ struct ALIGNMENT RouteProgramParams
|
||||
glsl::vec2 m_angleCosSin;
|
||||
float m_arrowHalfWidth = 0.0f;
|
||||
float m_opacity = 1.0f;
|
||||
|
||||
BIND_PROGRAMS(RouteProgramParams,
|
||||
Program::Route,
|
||||
Program::RouteDash,
|
||||
Program::RouteArrow,
|
||||
Program::RouteMarker)
|
||||
|
||||
BIND_PROGRAMS(RouteProgramParams, Program::Route, Program::RouteDash, Program::RouteArrow, Program::RouteMarker)
|
||||
};
|
||||
|
||||
struct ALIGNMENT TrafficProgramParams
|
||||
@@ -144,16 +120,13 @@ struct ALIGNMENT TrafficProgramParams
|
||||
float m_outline = 0.0f;
|
||||
float m_opacity = 1.0f;
|
||||
|
||||
TrafficProgramParams()
|
||||
TrafficProgramParams()
|
||||
: m_outlineColorAligned(0.0f, 0.0f, 0.0f, 0.0f)
|
||||
, m_lightArrowColorAligned(0.0f, 0.0f, 0.0f, 0.0f)
|
||||
, m_darkArrowColorAligned(0.0f, 0.0f, 0.0f, 0.0f)
|
||||
{}
|
||||
|
||||
BIND_PROGRAMS(TrafficProgramParams,
|
||||
Program::Traffic,
|
||||
Program::TrafficLine,
|
||||
Program::TrafficCircle)
|
||||
BIND_PROGRAMS(TrafficProgramParams, Program::Traffic, Program::TrafficLine, Program::TrafficCircle)
|
||||
};
|
||||
|
||||
struct ALIGNMENT TransitProgramParams
|
||||
@@ -171,10 +144,7 @@ struct ALIGNMENT TransitProgramParams
|
||||
|
||||
TransitProgramParams() : m_paramsAligned(0.0f, 0.0f, 0.0f, 0.0f) {}
|
||||
|
||||
BIND_PROGRAMS(TransitProgramParams,
|
||||
Program::Transit,
|
||||
Program::TransitCircle,
|
||||
Program::TransitMarker)
|
||||
BIND_PROGRAMS(TransitProgramParams, Program::Transit, Program::TransitCircle, Program::TransitMarker)
|
||||
};
|
||||
|
||||
struct ALIGNMENT GuiProgramParams
|
||||
@@ -187,11 +157,8 @@ struct ALIGNMENT GuiProgramParams
|
||||
float m_opacity = 1.0f;
|
||||
float m_length = 0.0f;
|
||||
|
||||
BIND_PROGRAMS(GuiProgramParams,
|
||||
Program::TextStaticOutlinedGui,
|
||||
Program::TextOutlinedGui,
|
||||
Program::TexturingGui,
|
||||
Program::Ruler)
|
||||
BIND_PROGRAMS(GuiProgramParams, Program::TextStaticOutlinedGui, Program::TextOutlinedGui, Program::TexturingGui,
|
||||
Program::Ruler)
|
||||
};
|
||||
|
||||
struct ALIGNMENT ShapesProgramParams
|
||||
@@ -212,10 +179,7 @@ struct ALIGNMENT ShapesProgramParams
|
||||
|
||||
ShapesProgramParams() : m_positionAligned(0.0f, 0.0f, 0.0f, 0.0f) {}
|
||||
|
||||
BIND_PROGRAMS(ShapesProgramParams,
|
||||
Program::Accuracy,
|
||||
Program::MyPosition,
|
||||
Program::SelectionLine)
|
||||
BIND_PROGRAMS(ShapesProgramParams, Program::Accuracy, Program::MyPosition, Program::SelectionLine)
|
||||
};
|
||||
|
||||
struct ALIGNMENT Arrow3dProgramParams
|
||||
@@ -225,11 +189,8 @@ struct ALIGNMENT Arrow3dProgramParams
|
||||
glsl::vec4 m_color;
|
||||
glsl::vec2 m_texCoordFlipping;
|
||||
|
||||
BIND_PROGRAMS(Arrow3dProgramParams,
|
||||
Program::Arrow3d,
|
||||
Program::Arrow3dTextured,
|
||||
Program::Arrow3dShadow,
|
||||
Program::Arrow3dOutline)
|
||||
BIND_PROGRAMS(Arrow3dProgramParams, Program::Arrow3d, Program::Arrow3dTextured, Program::Arrow3dShadow,
|
||||
Program::Arrow3dOutline)
|
||||
};
|
||||
|
||||
struct ALIGNMENT DebugRectProgramParams
|
||||
@@ -251,18 +212,14 @@ struct ALIGNMENT SMAAProgramParams
|
||||
{
|
||||
glsl::vec4 m_framebufferMetrics;
|
||||
|
||||
BIND_PROGRAMS(SMAAProgramParams,
|
||||
Program::SmaaEdges,
|
||||
Program::SmaaBlendingWeight,
|
||||
Program::SmaaFinal)
|
||||
BIND_PROGRAMS(SMAAProgramParams, Program::SmaaEdges, Program::SmaaBlendingWeight, Program::SmaaFinal)
|
||||
};
|
||||
|
||||
struct ALIGNMENT ImGuiProgramParams
|
||||
{
|
||||
glsl::mat4 m_projection;
|
||||
|
||||
BIND_PROGRAMS(ImGuiProgramParams,
|
||||
Program::ImGui)
|
||||
BIND_PROGRAMS(ImGuiProgramParams, Program::ImGui)
|
||||
};
|
||||
|
||||
#undef ALIGNMENT
|
||||
@@ -271,27 +228,27 @@ class ProgramParamsSetter
|
||||
{
|
||||
public:
|
||||
virtual ~ProgramParamsSetter() = default;
|
||||
virtual void Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program, MapProgramParams const & params) = 0;
|
||||
virtual void Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program, RouteProgramParams const & params) = 0;
|
||||
virtual void Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program, TrafficProgramParams const & params) = 0;
|
||||
virtual void Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program, TransitProgramParams const & params) = 0;
|
||||
virtual void Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program, GuiProgramParams const & params) = 0;
|
||||
virtual void Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program, ShapesProgramParams const & params) = 0;
|
||||
virtual void Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program, Arrow3dProgramParams const & params) = 0;
|
||||
virtual void Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program, DebugRectProgramParams const & params) = 0;
|
||||
virtual void Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program, ScreenQuadProgramParams const & params) = 0;
|
||||
virtual void Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program, SMAAProgramParams const & params) = 0;
|
||||
virtual void Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program, ImGuiProgramParams const & params) = 0;
|
||||
virtual void Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
MapProgramParams const & params) = 0;
|
||||
virtual void Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
RouteProgramParams const & params) = 0;
|
||||
virtual void Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
TrafficProgramParams const & params) = 0;
|
||||
virtual void Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
TransitProgramParams const & params) = 0;
|
||||
virtual void Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
GuiProgramParams const & params) = 0;
|
||||
virtual void Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
ShapesProgramParams const & params) = 0;
|
||||
virtual void Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
Arrow3dProgramParams const & params) = 0;
|
||||
virtual void Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
DebugRectProgramParams const & params) = 0;
|
||||
virtual void Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
ScreenQuadProgramParams const & params) = 0;
|
||||
virtual void Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
SMAAProgramParams const & params) = 0;
|
||||
virtual void Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
ImGuiProgramParams const & params) = 0;
|
||||
};
|
||||
} // namespace gpu
|
||||
|
||||
@@ -131,8 +131,7 @@ inline std::string DebugPrint(Program p)
|
||||
case Program::SmaaFinal: return "SmaaFinal";
|
||||
case Program::ImGui: return "ImGui";
|
||||
|
||||
case Program::ProgramsCount:
|
||||
CHECK(false, ("Try to output ProgramsCount"));
|
||||
case Program::ProgramsCount: CHECK(false, ("Try to output ProgramsCount"));
|
||||
}
|
||||
CHECK(false, ("Unknown program"));
|
||||
return {};
|
||||
|
||||
@@ -37,8 +37,7 @@ void TestProgramParams()
|
||||
#ifdef OMIM_OS_MAC
|
||||
UNIT_TEST(MapProgramParams_Test)
|
||||
{
|
||||
RunTestInOpenGLOffscreenEnvironment("MapProgramParams_Test",
|
||||
std::bind(&TestProgramParams<gpu::MapProgramParams>));
|
||||
RunTestInOpenGLOffscreenEnvironment("MapProgramParams_Test", std::bind(&TestProgramParams<gpu::MapProgramParams>));
|
||||
}
|
||||
|
||||
UNIT_TEST(RouteProgramParams_Test)
|
||||
@@ -61,8 +60,7 @@ UNIT_TEST(TransitProgramParams_Test)
|
||||
|
||||
UNIT_TEST(GuiProgramParams_Test)
|
||||
{
|
||||
RunTestInOpenGLOffscreenEnvironment("GuiProgramParams_Test",
|
||||
std::bind(&TestProgramParams<gpu::GuiProgramParams>));
|
||||
RunTestInOpenGLOffscreenEnvironment("GuiProgramParams_Test", std::bind(&TestProgramParams<gpu::GuiProgramParams>));
|
||||
}
|
||||
|
||||
UNIT_TEST(ShapesProgramParams_Test)
|
||||
@@ -91,7 +89,6 @@ UNIT_TEST(ScreenQuadProgramParams_Test)
|
||||
|
||||
UNIT_TEST(SMAAProgramParams_Test)
|
||||
{
|
||||
RunTestInOpenGLOffscreenEnvironment("SMAAProgramParams_Test",
|
||||
std::bind(&TestProgramParams<gpu::SMAAProgramParams>));
|
||||
RunTestInOpenGLOffscreenEnvironment("SMAAProgramParams_Test", std::bind(&TestProgramParams<gpu::SMAAProgramParams>));
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -28,13 +28,11 @@ UNIT_TEST(DesktopCompileShaders_GLES3_Test)
|
||||
{
|
||||
RunTestInOpenGLOffscreenEnvironment("DesktopCompileShaders_GLES3_Test",
|
||||
std::bind(&CompileShaders, false /* enableVTF */));
|
||||
|
||||
}
|
||||
|
||||
UNIT_TEST(DesktopCompileShaders_GLES3_VTF_Test)
|
||||
{
|
||||
RunTestInOpenGLOffscreenEnvironment("DesktopCompileShaders_GLES3_VTF_Test",
|
||||
std::bind(&CompileShaders, true /* enableVTF */));
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
#include "base/logging.hpp"
|
||||
#include "base/thread_pool_delayed.hpp"
|
||||
|
||||
#include <QtCore/QTemporaryFile>
|
||||
#include <QtCore/QDebug>
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QProcess>
|
||||
#include <QtCore/QTemporaryFile>
|
||||
#include <QtCore/QTextStream>
|
||||
|
||||
#include <atomic>
|
||||
@@ -35,7 +35,10 @@ std::string const kCompilerMaliOpenGLES3 = kMaliCompilerOpenGLES3Dir + "/malisc"
|
||||
std::string const kCompilerOpenGLES = "linux/glslangValidator";
|
||||
#endif
|
||||
|
||||
std::string DebugPrint(QString const & s) { return s.toStdString(); }
|
||||
std::string DebugPrint(QString const & s)
|
||||
{
|
||||
return s.toStdString();
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
@@ -71,10 +74,10 @@ std::map<std::string, std::string> GetFragmentShaders(dp::ApiVersion apiVersion)
|
||||
return shaders;
|
||||
}
|
||||
|
||||
void RunShaderTest(dp::ApiVersion apiVersion, std::string const & shaderName,
|
||||
QString const & glslCompiler, QString const & fileName,
|
||||
PrepareProcessFn const & procPrepare, PrepareArgumentsFn const & argsPrepare,
|
||||
SuccessChecker const & successChecker, QTextStream & errorLog)
|
||||
void RunShaderTest(dp::ApiVersion apiVersion, std::string const & shaderName, QString const & glslCompiler,
|
||||
QString const & fileName, PrepareProcessFn const & procPrepare,
|
||||
PrepareArgumentsFn const & argsPrepare, SuccessChecker const & successChecker,
|
||||
QTextStream & errorLog)
|
||||
{
|
||||
QProcess p;
|
||||
procPrepare(p);
|
||||
@@ -116,22 +119,18 @@ void TestShaders(dp::ApiVersion apiVersion, std::string const & defines, QString
|
||||
// Use desktop shader version for Linux
|
||||
#ifdef OMIM_OS_LINUX
|
||||
if (glslCompiler.contains(kCompilerOpenGLES.c_str()))
|
||||
{
|
||||
fullSrc = std::string(gpu::GL3_SHADER_VERSION) + defines + src.second;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
fullSrc = std::string(gpu::GLES3_SHADER_VERSION) + defines + src.second;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fullSrc = defines + src.second;
|
||||
}
|
||||
WriteShaderToFile(srcFile, fullSrc);
|
||||
RunShaderTest(apiVersion, src.first, glslCompiler, srcFile.fileName(), procPrepare, argsPrepare,
|
||||
successChecker, errorLog);
|
||||
RunShaderTest(apiVersion, src.first, glslCompiler, srcFile.fileName(), procPrepare, argsPrepare, successChecker,
|
||||
errorLog);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,20 +151,16 @@ struct CompilerData
|
||||
|
||||
void CompileShaders(CompilerData const & compiler, std::string const & additionalDefines = {})
|
||||
{
|
||||
auto successChecker = [](QString const & output) {
|
||||
return output.isEmpty();
|
||||
};
|
||||
auto successChecker = [](QString const & output) { return output.isEmpty(); };
|
||||
|
||||
QString errorLog;
|
||||
QTextStream ss(&errorLog);
|
||||
|
||||
QString compilerPath = QString::fromStdString(compiler.m_compilerPath);
|
||||
auto argsPrepareFn = [](QStringList & args, QString const & fileName) {
|
||||
args << fileName;
|
||||
};
|
||||
auto argsPrepareFn = [](QStringList & args, QString const & fileName) { args << fileName; };
|
||||
|
||||
TestShaders(compiler.m_apiVersion, additionalDefines, ".vert", GetVertexShaders(compiler.m_apiVersion),
|
||||
compilerPath, [](QProcess const &) {}, argsPrepareFn, successChecker, ss);
|
||||
TestShaders(compiler.m_apiVersion, additionalDefines, ".vert", GetVertexShaders(compiler.m_apiVersion), compilerPath,
|
||||
[](QProcess const &) {}, argsPrepareFn, successChecker, ss);
|
||||
TestShaders(compiler.m_apiVersion, additionalDefines, ".frag", GetFragmentShaders(compiler.m_apiVersion),
|
||||
compilerPath, [](QProcess const &) {}, argsPrepareFn, successChecker, ss);
|
||||
|
||||
@@ -176,14 +171,10 @@ UNIT_TEST(MobileCompileShaders_Test)
|
||||
{
|
||||
base::DelayedThreadPool workerThread(6 /* threadsCount */);
|
||||
|
||||
workerThread.Push([] {
|
||||
CompileShaders({dp::ApiVersion::OpenGLES3, GetCompilerPath(kCompilerOpenGLES)});
|
||||
});
|
||||
workerThread.Push([] { CompileShaders({dp::ApiVersion::OpenGLES3, GetCompilerPath(kCompilerOpenGLES)}); });
|
||||
|
||||
workerThread.Push([] {
|
||||
CompileShaders({dp::ApiVersion::OpenGLES3, GetCompilerPath(kCompilerOpenGLES)},
|
||||
"#define ENABLE_VTF\n");
|
||||
});
|
||||
workerThread.Push([]
|
||||
{ CompileShaders({dp::ApiVersion::OpenGLES3, GetCompilerPath(kCompilerOpenGLES)}, "#define ENABLE_VTF\n"); });
|
||||
|
||||
workerThread.Shutdown(base::DelayedThreadPool::Exit::ExecPending);
|
||||
}
|
||||
@@ -214,9 +205,7 @@ struct MaliCompilerData
|
||||
void MaliCompileShaders(MaliCompilerData const & compiler, MaliDriverSet const & driverSet,
|
||||
MaliReleaseVersion const & version)
|
||||
{
|
||||
auto successChecker = [](QString const & output) {
|
||||
return output.indexOf("Compilation succeeded.") != -1;
|
||||
};
|
||||
auto successChecker = [](QString const & output) { return output.indexOf("Compilation succeeded.") != -1; };
|
||||
|
||||
QString errorLog;
|
||||
QTextStream ss(&errorLog);
|
||||
@@ -225,19 +214,18 @@ void MaliCompileShaders(MaliCompilerData const & compiler, MaliDriverSet const &
|
||||
env.insert("MALICM_LOCATION", QString::fromStdString(compiler.m_compilerAdditionalPath));
|
||||
auto procPrepare = [&env](QProcess & p) { p.setProcessEnvironment(env); };
|
||||
QString shaderType = "-v";
|
||||
auto argForming = [&](QStringList & args, QString const & fileName) {
|
||||
args << shaderType
|
||||
<< "-r" << version.m_version << "-c" << version.m_series << "-d" << driverSet.m_driverName
|
||||
auto argForming = [&](QStringList & args, QString const & fileName)
|
||||
{
|
||||
args << shaderType << "-r" << version.m_version << "-c" << version.m_series << "-d" << driverSet.m_driverName
|
||||
<< fileName;
|
||||
};
|
||||
QString const compilerPath = QString::fromStdString(compiler.m_compilerPath);
|
||||
TestShaders(compiler.m_apiVersion, "", {}, GetVertexShaders(compiler.m_apiVersion),
|
||||
compilerPath, procPrepare, argForming, successChecker, ss);
|
||||
TestShaders(compiler.m_apiVersion, "", {}, GetVertexShaders(compiler.m_apiVersion), compilerPath, procPrepare,
|
||||
argForming, successChecker, ss);
|
||||
shaderType = "-f";
|
||||
TestShaders(compiler.m_apiVersion, "", {}, GetFragmentShaders(compiler.m_apiVersion),
|
||||
compilerPath, procPrepare, argForming, successChecker, ss);
|
||||
TEST(errorLog.isEmpty(),
|
||||
(shaderType, version.m_series, version.m_version, driverSet.m_driverName, "", errorLog));
|
||||
TestShaders(compiler.m_apiVersion, "", {}, GetFragmentShaders(compiler.m_apiVersion), compilerPath, procPrepare,
|
||||
argForming, successChecker, ss);
|
||||
TEST(errorLog.isEmpty(), (shaderType, version.m_series, version.m_version, driverSet.m_driverName, "", errorLog));
|
||||
|
||||
// MALI GPUs do not support ENABLE_VTF. Do not test it here.
|
||||
}
|
||||
@@ -245,228 +233,214 @@ void MaliCompileShaders(MaliCompilerData const & compiler, MaliDriverSet const &
|
||||
UNIT_TEST(MALI_MobileCompileShaders_Test)
|
||||
{
|
||||
#if defined(OMIM_OS_MAC)
|
||||
std::vector<MaliDriverSet> const driversES2old = {
|
||||
{"Mali-400_r4p0-00rel1",
|
||||
{{"Mali-200", "r0p1", true}, {"Mali-200", "r0p2", true},
|
||||
{"Mali-200", "r0p3", true}, {"Mali-200", "r0p4", true},
|
||||
{"Mali-200", "r0p5", true}, {"Mali-200", "r0p6", true},
|
||||
{"Mali-400", "r0p0", true}, {"Mali-400", "r0p1", true},
|
||||
{"Mali-400", "r1p0", true}, {"Mali-400", "r1p1", true},
|
||||
{"Mali-300", "r0p0", true}, {"Mali-450", "r0p0", true}}},
|
||||
{"Mali-T600_r4p0-00rel0",
|
||||
{{"Mali-T600", "r0p0", true}, {"Mali-T600", "r0p0_15dev0", true},
|
||||
{"Mali-T600", "r0p1", true}, {"Mali-T620", "r0p1", true},
|
||||
{"Mali-T620", "r1p0", true}, {"Mali-T670", "r1p0", true}}},
|
||||
{"Mali-T600_r4p1-00rel0",
|
||||
{{"Mali-T600", "r0p0", true}, {"Mali-T600", "r0p0_15dev0", true},
|
||||
{"Mali-T600", "r0p1", true}, {"Mali-T620", "r0p1", true},
|
||||
{"Mali-T620", "r1p0", true}, {"Mali-T620", "r1p1", true},
|
||||
{"Mali-T720", "r0p0", true}, {"Mali-T720", "r1p0", true},
|
||||
{"Mali-T760", "r0p0", true}, {"Mali-T760", "r0p1", true},
|
||||
{"Mali-T760", "r0p1_50rel0", true}, {"Mali-T760", "r0p2", true},
|
||||
{"Mali-T760", "r0p3", true}, {"Mali-T760", "r1p0", true}}}};
|
||||
std::vector<MaliDriverSet> const driversES2old = {{"Mali-400_r4p0-00rel1",
|
||||
{{"Mali-200", "r0p1", true},
|
||||
{"Mali-200", "r0p2", true},
|
||||
{"Mali-200", "r0p3", true},
|
||||
{"Mali-200", "r0p4", true},
|
||||
{"Mali-200", "r0p5", true},
|
||||
{"Mali-200", "r0p6", true},
|
||||
{"Mali-400", "r0p0", true},
|
||||
{"Mali-400", "r0p1", true},
|
||||
{"Mali-400", "r1p0", true},
|
||||
{"Mali-400", "r1p1", true},
|
||||
{"Mali-300", "r0p0", true},
|
||||
{"Mali-450", "r0p0", true}}},
|
||||
{"Mali-T600_r4p0-00rel0",
|
||||
{{"Mali-T600", "r0p0", true},
|
||||
{"Mali-T600", "r0p0_15dev0", true},
|
||||
{"Mali-T600", "r0p1", true},
|
||||
{"Mali-T620", "r0p1", true},
|
||||
{"Mali-T620", "r1p0", true},
|
||||
{"Mali-T670", "r1p0", true}}},
|
||||
{"Mali-T600_r4p1-00rel0",
|
||||
{{"Mali-T600", "r0p0", true},
|
||||
{"Mali-T600", "r0p0_15dev0", true},
|
||||
{"Mali-T600", "r0p1", true},
|
||||
{"Mali-T620", "r0p1", true},
|
||||
{"Mali-T620", "r1p0", true},
|
||||
{"Mali-T620", "r1p1", true},
|
||||
{"Mali-T720", "r0p0", true},
|
||||
{"Mali-T720", "r1p0", true},
|
||||
{"Mali-T760", "r0p0", true},
|
||||
{"Mali-T760", "r0p1", true},
|
||||
{"Mali-T760", "r0p1_50rel0", true},
|
||||
{"Mali-T760", "r0p2", true},
|
||||
{"Mali-T760", "r0p3", true},
|
||||
{"Mali-T760", "r1p0", true}}}};
|
||||
#endif
|
||||
|
||||
std::vector<MaliDriverSet> const driversES3new = {
|
||||
{"Mali-T600_r3p0-00rel0",
|
||||
{{"Mali-T600", "r0p0", false}, {"Mali-T600", "r0p0_15dev0", false},
|
||||
{"Mali-T600", "r0p1", false},
|
||||
{"Mali-T620", "r0p0", false}, {"Mali-T620", "r0p1", false},
|
||||
{"Mali-T620", "r1p0", false}}},
|
||||
{"Mali-T600_r4p0-00rel0",
|
||||
{{"Mali-T600", "r0p0", true}, {"Mali-T600", "r0p0_15dev0", true},
|
||||
{"Mali-T600", "r0p1", true}, {"Mali-T620", "r0p1", true},
|
||||
{"Mali-T620", "r1p0", true}}},
|
||||
{"Mali-T600_r4p1-00rel0",
|
||||
{{"Mali-T600", "r0p0", true}, {"Mali-T600", "r0p0_15dev0", true},
|
||||
{"Mali-T600", "r0p1", true}, {"Mali-T620", "r0p1", true},
|
||||
{"Mali-T620", "r1p0", true}, {"Mali-T620", "r1p1", true},
|
||||
{"Mali-T720", "r0p0", true}, {"Mali-T720", "r1p0", true},
|
||||
{"Mali-T760", "r0p0", true}, {"Mali-T760", "r0p1", true},
|
||||
{"Mali-T760", "r0p1_50rel0", true}, {"Mali-T760", "r0p2", true},
|
||||
{"Mali-T760", "r0p3", true}, {"Mali-T760", "r1p0", true}}},
|
||||
{"Mali-T600_r5p0-00rel0",
|
||||
{{"Mali-T600", "r0p0", true}, {"Mali-T600", "r0p0_15dev0", true},
|
||||
{"Mali-T600", "r0p1", true}, {"Mali-T620", "r0p1", true},
|
||||
{"Mali-T620", "r1p0", true}, {"Mali-T620", "r1p1", true},
|
||||
{"Mali-T720", "r0p0", true}, {"Mali-T720", "r1p0", true},
|
||||
{"Mali-T720", "r1p1", true},
|
||||
{"Mali-T760", "r0p0", true}, {"Mali-T760", "r0p1", true},
|
||||
{"Mali-T760", "r0p1_50rel0", true}, {"Mali-T760", "r0p2", true},
|
||||
{"Mali-T760", "r0p3", true}, {"Mali-T760", "r1p0", true}}},
|
||||
{"Mali-T600_r5p1-00rel0",
|
||||
{{"Mali-T600", "r0p0", true}, {"Mali-T600", "r0p0_15dev0", true},
|
||||
{"Mali-T600", "r0p1", true}, {"Mali-T620", "r0p1", true},
|
||||
{"Mali-T620", "r1p0", true}, {"Mali-T620", "r1p1", true},
|
||||
{"Mali-T720", "r0p0", true}, {"Mali-T720", "r1p0", true},
|
||||
{"Mali-T720", "r1p1", true},
|
||||
{"Mali-T760", "r0p0", true}, {"Mali-T760", "r0p1", true},
|
||||
{"Mali-T760", "r0p1_50rel0", true}, {"Mali-T760", "r0p2", true},
|
||||
{"Mali-T760", "r0p3", true}, {"Mali-T760", "r1p0", true},
|
||||
{"Mali-T860", "r0p2", true}, {"Mali-T880", "r0p0", true},
|
||||
{"Mali-T880", "r0p1", true}, {"Mali-T880", "r0p2", true}}},
|
||||
{"Mali-T600_r6p0-00rel0",
|
||||
{{"Mali-T600", "r0p0", true}, {"Mali-T600", "r0p0_15dev0", true},
|
||||
{"Mali-T600", "r0p1", true}, {"Mali-T620", "r0p1", true},
|
||||
{"Mali-T620", "r1p0", true}, {"Mali-T620", "r1p1", true},
|
||||
{"Mali-T720", "r0p0", true}, {"Mali-T720", "r1p0", true},
|
||||
{"Mali-T720", "r1p1", true},
|
||||
{"Mali-T760", "r0p0", true}, {"Mali-T760", "r0p1", true},
|
||||
{"Mali-T760", "r0p1_50rel0", true}, {"Mali-T760", "r0p2", true},
|
||||
{"Mali-T760", "r0p3", true}, {"Mali-T760", "r1p0", true},
|
||||
{"Mali-T820", "r0p0", true},
|
||||
{"Mali-T830", "r1p0", true}, {"Mali-T830", "r0p1", true},
|
||||
{"Mali-T860", "r0p2", true}, {"Mali-T860", "r1p0", true},
|
||||
{"Mali-T880", "r1p0", true}, {"Mali-T880", "r0p2", true},
|
||||
{"Mali-T880", "r0p1", true}}},
|
||||
{"Mali-T600_r7p0-00rel0",
|
||||
{{"Mali-T600", "r0p0", true}, {"Mali-T600", "r0p0_15dev0", true},
|
||||
{"Mali-T600", "r0p1", true},
|
||||
{"Mali-T620", "r0p1", true}, {"Mali-T620", "r1p0", true},
|
||||
{"Mali-T620", "r1p1", true},
|
||||
{"Mali-T720", "r0p0", true}, {"Mali-T720", "r1p0", true},
|
||||
{"Mali-T720", "r1p1", true},
|
||||
{"Mali-T760", "r0p0", true}, {"Mali-T760", "r0p1", true},
|
||||
{"Mali-T760", "r0p1_50rel0", true}, {"Mali-T760", "r0p2", true},
|
||||
{"Mali-T760", "r0p3", true}, {"Mali-T760", "r1p0", true},
|
||||
{"Mali-T820", "r0p0", true}, {"Mali-T820", "r0p1", true},
|
||||
{"Mali-T820", "r1p0", true},
|
||||
{"Mali-T830", "r1p0", true}, {"Mali-T830", "r0p1", true},
|
||||
{"Mali-T860", "r0p2", true}, {"Mali-T860", "r1p0", true},
|
||||
{"Mali-T860", "r2p0", true},
|
||||
{"Mali-T880", "r1p0", true}, {"Mali-T880", "r0p2", true},
|
||||
{"Mali-T880", "r0p1", true}, {"Mali-T880", "r2p0", true}}},
|
||||
{"Mali-T600_r8p0-00rel0",
|
||||
{{"Mali-T600", "r0p0", true}, {"Mali-T600", "r0p0_15dev0", true},
|
||||
{"Mali-T600", "r0p1", true},
|
||||
{"Mali-T620", "r0p1", true}, {"Mali-T620", "r1p0", true},
|
||||
{"Mali-T620", "r1p1", true},
|
||||
{"Mali-T720", "r0p0", true}, {"Mali-T720", "r1p0", true},
|
||||
{"Mali-T720", "r1p1", true},
|
||||
{"Mali-T760", "r0p0", true}, {"Mali-T760", "r0p1", true},
|
||||
{"Mali-T760", "r0p1_50rel0", true}, {"Mali-T760", "r0p2", true},
|
||||
{"Mali-T760", "r0p3", true}, {"Mali-T760", "r1p0", true},
|
||||
{"Mali-T820", "r0p0", true}, {"Mali-T820", "r0p1", true},
|
||||
{"Mali-T820", "r1p0", true},
|
||||
{"Mali-T830", "r1p0", true}, {"Mali-T830", "r0p1", true},
|
||||
{"Mali-T860", "r0p2", true}, {"Mali-T860", "r1p0", true},
|
||||
{"Mali-T860", "r2p0", true},
|
||||
{"Mali-T880", "r1p0", true}, {"Mali-T880", "r0p2", true},
|
||||
{"Mali-T880", "r0p1", true}, {"Mali-T880", "r2p0", true}}},
|
||||
{"Mali-T600_r9p0-00rel0",
|
||||
{{"Mali-T600", "r0p0", true}, {"Mali-T600", "r0p0_15dev0", true},
|
||||
{"Mali-T600", "r0p1", true},
|
||||
{"Mali-T620", "r0p1", true}, {"Mali-T620", "r1p0", true},
|
||||
{"Mali-T620", "r1p1", true},
|
||||
{"Mali-T720", "r0p0", true}, {"Mali-T720", "r1p0", true},
|
||||
{"Mali-T720", "r1p1", true},
|
||||
{"Mali-T760", "r0p0", true}, {"Mali-T760", "r0p1", true},
|
||||
{"Mali-T760", "r0p1_50rel0", true}, {"Mali-T760", "r0p2", true},
|
||||
{"Mali-T760", "r0p3", true}, {"Mali-T760", "r1p0", true},
|
||||
{"Mali-T820", "r0p0", true}, {"Mali-T820", "r0p1", true},
|
||||
{"Mali-T820", "r1p0", true},
|
||||
{"Mali-T830", "r1p0", true}, {"Mali-T830", "r0p1", true},
|
||||
{"Mali-T860", "r0p2", true}, {"Mali-T860", "r1p0", true},
|
||||
{"Mali-T860", "r2p0", true},
|
||||
{"Mali-T880", "r1p0", true}, {"Mali-T880", "r0p2", true},
|
||||
{"Mali-T880", "r0p1", true}, {"Mali-T880", "r2p0", true}}},
|
||||
{"Mali-T600_r10p0-00rel0",
|
||||
{{"Mali-T600", "r0p0", true}, {"Mali-T600", "r0p0_15dev0", true},
|
||||
{"Mali-T600", "r0p1", true},
|
||||
{"Mali-T620", "r0p1", true}, {"Mali-T620", "r1p0", true},
|
||||
{"Mali-T620", "r1p1", true},
|
||||
{"Mali-T720", "r0p0", true}, {"Mali-T720", "r1p0", true},
|
||||
{"Mali-T720", "r1p1", true},
|
||||
{"Mali-T760", "r0p0", true}, {"Mali-T760", "r0p1", true},
|
||||
{"Mali-T760", "r0p1_50rel0", true}, {"Mali-T760", "r0p2", true},
|
||||
{"Mali-T760", "r0p3", true}, {"Mali-T760", "r1p0", true},
|
||||
{"Mali-T820", "r0p0", true}, {"Mali-T820", "r0p1", true},
|
||||
{"Mali-T820", "r1p0", true},
|
||||
{"Mali-T830", "r1p0", true}, {"Mali-T830", "r0p1", true},
|
||||
{"Mali-T860", "r0p2", true}, {"Mali-T860", "r1p0", true},
|
||||
{"Mali-T860", "r2p0", true},
|
||||
{"Mali-T880", "r1p0", true}, {"Mali-T880", "r0p2", true},
|
||||
{"Mali-T880", "r0p1", true}, {"Mali-T880", "r2p0", true}}},
|
||||
{"Mali-T600_r11p0-00rel0",
|
||||
{{"Mali-T600", "r0p0", true}, {"Mali-T600", "r0p0_15dev0", true},
|
||||
{"Mali-T600", "r0p1", true},
|
||||
{"Mali-T620", "r0p1", true}, {"Mali-T620", "r1p0", true},
|
||||
{"Mali-T620", "r1p1", true},
|
||||
{"Mali-T720", "r0p0", true}, {"Mali-T720", "r1p0", true},
|
||||
{"Mali-T720", "r1p1", true},
|
||||
{"Mali-T760", "r0p0", true}, {"Mali-T760", "r0p1", true},
|
||||
{"Mali-T760", "r0p1_50rel0", true}, {"Mali-T760", "r0p2", true},
|
||||
{"Mali-T760", "r0p3", true}, {"Mali-T760", "r1p0", true},
|
||||
{"Mali-T820", "r0p0", true}, {"Mali-T820", "r0p1", true},
|
||||
{"Mali-T820", "r1p0", true},
|
||||
{"Mali-T830", "r1p0", true}, {"Mali-T830", "r0p1", true},
|
||||
{"Mali-T860", "r0p2", true}, {"Mali-T860", "r1p0", true},
|
||||
{"Mali-T860", "r2p0", true},
|
||||
{"Mali-T880", "r1p0", true}, {"Mali-T880", "r0p2", true},
|
||||
{"Mali-T880", "r0p1", true}, {"Mali-T880", "r2p0", true}}},
|
||||
{"Mali-T600_r12p0-00rel0",
|
||||
{{"Mali-T600", "r0p0", true}, {"Mali-T600", "r0p0_15dev0", true},
|
||||
{"Mali-T600", "r0p1", true},
|
||||
{"Mali-T620", "r0p1", true}, {"Mali-T620", "r1p0", true},
|
||||
{"Mali-T620", "r1p1", true},
|
||||
{"Mali-T720", "r0p0", true}, {"Mali-T720", "r1p0", true},
|
||||
{"Mali-T720", "r1p1", true},
|
||||
{"Mali-T760", "r0p0", true}, {"Mali-T760", "r0p1", true},
|
||||
{"Mali-T760", "r0p1_50rel0", true}, {"Mali-T760", "r0p2", true},
|
||||
{"Mali-T760", "r0p3", true}, {"Mali-T760", "r1p0", true},
|
||||
{"Mali-T820", "r0p0", true}, {"Mali-T820", "r0p1", true},
|
||||
{"Mali-T820", "r1p0", true},
|
||||
{"Mali-T830", "r1p0", true}, {"Mali-T830", "r0p1", true},
|
||||
{"Mali-T860", "r0p2", true}, {"Mali-T860", "r1p0", true},
|
||||
{"Mali-T860", "r2p0", true},
|
||||
{"Mali-T880", "r1p0", true}, {"Mali-T880", "r0p2", true},
|
||||
{"Mali-T880", "r0p1", true}, {"Mali-T880", "r2p0", true}}},
|
||||
{"Mali-T600_r13p0-00rel0",
|
||||
{{"Mali-T600", "r0p0", true}, {"Mali-T600", "r0p0_15dev0", true},
|
||||
{"Mali-T600", "r0p1", true},
|
||||
{"Mali-T620", "r0p1", true}, {"Mali-T620", "r1p0", true},
|
||||
{"Mali-T620", "r1p1", true},
|
||||
{"Mali-T720", "r0p0", true}, {"Mali-T720", "r1p0", true},
|
||||
{"Mali-T720", "r1p1", true},
|
||||
{"Mali-T760", "r0p0", true}, {"Mali-T760", "r0p1", true},
|
||||
{"Mali-T760", "r0p1_50rel0", true}, {"Mali-T760", "r0p2", true},
|
||||
{"Mali-T760", "r0p3", true}, {"Mali-T760", "r1p0", true},
|
||||
{"Mali-T820", "r0p0", true}, {"Mali-T820", "r0p1", true},
|
||||
{"Mali-T820", "r1p0", true},
|
||||
{"Mali-T830", "r1p0", true}, {"Mali-T830", "r0p1", true},
|
||||
{"Mali-T860", "r0p2", true}, {"Mali-T860", "r1p0", true},
|
||||
{"Mali-T860", "r2p0", true},
|
||||
{"Mali-T880", "r1p0", true}, {"Mali-T880", "r0p2", true},
|
||||
{"Mali-T880", "r0p1", true}, {"Mali-T880", "r2p0", true}}},
|
||||
{"Mali-Gxx_r3p0-00rel0",
|
||||
{{"Mali-G71", "r0p0", false}}}};
|
||||
{"Mali-T600_r3p0-00rel0",
|
||||
{{"Mali-T600", "r0p0", false},
|
||||
{"Mali-T600", "r0p0_15dev0", false},
|
||||
{"Mali-T600", "r0p1", false},
|
||||
{"Mali-T620", "r0p0", false},
|
||||
{"Mali-T620", "r0p1", false},
|
||||
{"Mali-T620", "r1p0", false}}},
|
||||
{"Mali-T600_r4p0-00rel0",
|
||||
{{"Mali-T600", "r0p0", true},
|
||||
{"Mali-T600", "r0p0_15dev0", true},
|
||||
{"Mali-T600", "r0p1", true},
|
||||
{"Mali-T620", "r0p1", true},
|
||||
{"Mali-T620", "r1p0", true}}},
|
||||
{"Mali-T600_r4p1-00rel0",
|
||||
{{"Mali-T600", "r0p0", true},
|
||||
{"Mali-T600", "r0p0_15dev0", true},
|
||||
{"Mali-T600", "r0p1", true},
|
||||
{"Mali-T620", "r0p1", true},
|
||||
{"Mali-T620", "r1p0", true},
|
||||
{"Mali-T620", "r1p1", true},
|
||||
{"Mali-T720", "r0p0", true},
|
||||
{"Mali-T720", "r1p0", true},
|
||||
{"Mali-T760", "r0p0", true},
|
||||
{"Mali-T760", "r0p1", true},
|
||||
{"Mali-T760", "r0p1_50rel0", true},
|
||||
{"Mali-T760", "r0p2", true},
|
||||
{"Mali-T760", "r0p3", true},
|
||||
{"Mali-T760", "r1p0", true}}},
|
||||
{"Mali-T600_r5p0-00rel0",
|
||||
{{"Mali-T600", "r0p0", true},
|
||||
{"Mali-T600", "r0p0_15dev0", true},
|
||||
{"Mali-T600", "r0p1", true},
|
||||
{"Mali-T620", "r0p1", true},
|
||||
{"Mali-T620", "r1p0", true},
|
||||
{"Mali-T620", "r1p1", true},
|
||||
{"Mali-T720", "r0p0", true},
|
||||
{"Mali-T720", "r1p0", true},
|
||||
{"Mali-T720", "r1p1", true},
|
||||
{"Mali-T760", "r0p0", true},
|
||||
{"Mali-T760", "r0p1", true},
|
||||
{"Mali-T760", "r0p1_50rel0", true},
|
||||
{"Mali-T760", "r0p2", true},
|
||||
{"Mali-T760", "r0p3", true},
|
||||
{"Mali-T760", "r1p0", true}}},
|
||||
{"Mali-T600_r5p1-00rel0",
|
||||
{{"Mali-T600", "r0p0", true},
|
||||
{"Mali-T600", "r0p0_15dev0", true},
|
||||
{"Mali-T600", "r0p1", true},
|
||||
{"Mali-T620", "r0p1", true},
|
||||
{"Mali-T620", "r1p0", true},
|
||||
{"Mali-T620", "r1p1", true},
|
||||
{"Mali-T720", "r0p0", true},
|
||||
{"Mali-T720", "r1p0", true},
|
||||
{"Mali-T720", "r1p1", true},
|
||||
{"Mali-T760", "r0p0", true},
|
||||
{"Mali-T760", "r0p1", true},
|
||||
{"Mali-T760", "r0p1_50rel0", true},
|
||||
{"Mali-T760", "r0p2", true},
|
||||
{"Mali-T760", "r0p3", true},
|
||||
{"Mali-T760", "r1p0", true},
|
||||
{"Mali-T860", "r0p2", true},
|
||||
{"Mali-T880", "r0p0", true},
|
||||
{"Mali-T880", "r0p1", true},
|
||||
{"Mali-T880", "r0p2", true}}},
|
||||
{"Mali-T600_r6p0-00rel0",
|
||||
{{"Mali-T600", "r0p0", true}, {"Mali-T600", "r0p0_15dev0", true}, {"Mali-T600", "r0p1", true},
|
||||
{"Mali-T620", "r0p1", true}, {"Mali-T620", "r1p0", true}, {"Mali-T620", "r1p1", true},
|
||||
{"Mali-T720", "r0p0", true}, {"Mali-T720", "r1p0", true}, {"Mali-T720", "r1p1", true},
|
||||
{"Mali-T760", "r0p0", true}, {"Mali-T760", "r0p1", true}, {"Mali-T760", "r0p1_50rel0", true},
|
||||
{"Mali-T760", "r0p2", true}, {"Mali-T760", "r0p3", true}, {"Mali-T760", "r1p0", true},
|
||||
{"Mali-T820", "r0p0", true}, {"Mali-T830", "r1p0", true}, {"Mali-T830", "r0p1", true},
|
||||
{"Mali-T860", "r0p2", true}, {"Mali-T860", "r1p0", true}, {"Mali-T880", "r1p0", true},
|
||||
{"Mali-T880", "r0p2", true}, {"Mali-T880", "r0p1", true}}},
|
||||
{"Mali-T600_r7p0-00rel0",
|
||||
{{"Mali-T600", "r0p0", true}, {"Mali-T600", "r0p0_15dev0", true}, {"Mali-T600", "r0p1", true},
|
||||
{"Mali-T620", "r0p1", true}, {"Mali-T620", "r1p0", true}, {"Mali-T620", "r1p1", true},
|
||||
{"Mali-T720", "r0p0", true}, {"Mali-T720", "r1p0", true}, {"Mali-T720", "r1p1", true},
|
||||
{"Mali-T760", "r0p0", true}, {"Mali-T760", "r0p1", true}, {"Mali-T760", "r0p1_50rel0", true},
|
||||
{"Mali-T760", "r0p2", true}, {"Mali-T760", "r0p3", true}, {"Mali-T760", "r1p0", true},
|
||||
{"Mali-T820", "r0p0", true}, {"Mali-T820", "r0p1", true}, {"Mali-T820", "r1p0", true},
|
||||
{"Mali-T830", "r1p0", true}, {"Mali-T830", "r0p1", true}, {"Mali-T860", "r0p2", true},
|
||||
{"Mali-T860", "r1p0", true}, {"Mali-T860", "r2p0", true}, {"Mali-T880", "r1p0", true},
|
||||
{"Mali-T880", "r0p2", true}, {"Mali-T880", "r0p1", true}, {"Mali-T880", "r2p0", true}}},
|
||||
{"Mali-T600_r8p0-00rel0",
|
||||
{{"Mali-T600", "r0p0", true}, {"Mali-T600", "r0p0_15dev0", true}, {"Mali-T600", "r0p1", true},
|
||||
{"Mali-T620", "r0p1", true}, {"Mali-T620", "r1p0", true}, {"Mali-T620", "r1p1", true},
|
||||
{"Mali-T720", "r0p0", true}, {"Mali-T720", "r1p0", true}, {"Mali-T720", "r1p1", true},
|
||||
{"Mali-T760", "r0p0", true}, {"Mali-T760", "r0p1", true}, {"Mali-T760", "r0p1_50rel0", true},
|
||||
{"Mali-T760", "r0p2", true}, {"Mali-T760", "r0p3", true}, {"Mali-T760", "r1p0", true},
|
||||
{"Mali-T820", "r0p0", true}, {"Mali-T820", "r0p1", true}, {"Mali-T820", "r1p0", true},
|
||||
{"Mali-T830", "r1p0", true}, {"Mali-T830", "r0p1", true}, {"Mali-T860", "r0p2", true},
|
||||
{"Mali-T860", "r1p0", true}, {"Mali-T860", "r2p0", true}, {"Mali-T880", "r1p0", true},
|
||||
{"Mali-T880", "r0p2", true}, {"Mali-T880", "r0p1", true}, {"Mali-T880", "r2p0", true}}},
|
||||
{"Mali-T600_r9p0-00rel0",
|
||||
{{"Mali-T600", "r0p0", true}, {"Mali-T600", "r0p0_15dev0", true}, {"Mali-T600", "r0p1", true},
|
||||
{"Mali-T620", "r0p1", true}, {"Mali-T620", "r1p0", true}, {"Mali-T620", "r1p1", true},
|
||||
{"Mali-T720", "r0p0", true}, {"Mali-T720", "r1p0", true}, {"Mali-T720", "r1p1", true},
|
||||
{"Mali-T760", "r0p0", true}, {"Mali-T760", "r0p1", true}, {"Mali-T760", "r0p1_50rel0", true},
|
||||
{"Mali-T760", "r0p2", true}, {"Mali-T760", "r0p3", true}, {"Mali-T760", "r1p0", true},
|
||||
{"Mali-T820", "r0p0", true}, {"Mali-T820", "r0p1", true}, {"Mali-T820", "r1p0", true},
|
||||
{"Mali-T830", "r1p0", true}, {"Mali-T830", "r0p1", true}, {"Mali-T860", "r0p2", true},
|
||||
{"Mali-T860", "r1p0", true}, {"Mali-T860", "r2p0", true}, {"Mali-T880", "r1p0", true},
|
||||
{"Mali-T880", "r0p2", true}, {"Mali-T880", "r0p1", true}, {"Mali-T880", "r2p0", true}}},
|
||||
{"Mali-T600_r10p0-00rel0",
|
||||
{{"Mali-T600", "r0p0", true}, {"Mali-T600", "r0p0_15dev0", true}, {"Mali-T600", "r0p1", true},
|
||||
{"Mali-T620", "r0p1", true}, {"Mali-T620", "r1p0", true}, {"Mali-T620", "r1p1", true},
|
||||
{"Mali-T720", "r0p0", true}, {"Mali-T720", "r1p0", true}, {"Mali-T720", "r1p1", true},
|
||||
{"Mali-T760", "r0p0", true}, {"Mali-T760", "r0p1", true}, {"Mali-T760", "r0p1_50rel0", true},
|
||||
{"Mali-T760", "r0p2", true}, {"Mali-T760", "r0p3", true}, {"Mali-T760", "r1p0", true},
|
||||
{"Mali-T820", "r0p0", true}, {"Mali-T820", "r0p1", true}, {"Mali-T820", "r1p0", true},
|
||||
{"Mali-T830", "r1p0", true}, {"Mali-T830", "r0p1", true}, {"Mali-T860", "r0p2", true},
|
||||
{"Mali-T860", "r1p0", true}, {"Mali-T860", "r2p0", true}, {"Mali-T880", "r1p0", true},
|
||||
{"Mali-T880", "r0p2", true}, {"Mali-T880", "r0p1", true}, {"Mali-T880", "r2p0", true}}},
|
||||
{"Mali-T600_r11p0-00rel0",
|
||||
{{"Mali-T600", "r0p0", true}, {"Mali-T600", "r0p0_15dev0", true}, {"Mali-T600", "r0p1", true},
|
||||
{"Mali-T620", "r0p1", true}, {"Mali-T620", "r1p0", true}, {"Mali-T620", "r1p1", true},
|
||||
{"Mali-T720", "r0p0", true}, {"Mali-T720", "r1p0", true}, {"Mali-T720", "r1p1", true},
|
||||
{"Mali-T760", "r0p0", true}, {"Mali-T760", "r0p1", true}, {"Mali-T760", "r0p1_50rel0", true},
|
||||
{"Mali-T760", "r0p2", true}, {"Mali-T760", "r0p3", true}, {"Mali-T760", "r1p0", true},
|
||||
{"Mali-T820", "r0p0", true}, {"Mali-T820", "r0p1", true}, {"Mali-T820", "r1p0", true},
|
||||
{"Mali-T830", "r1p0", true}, {"Mali-T830", "r0p1", true}, {"Mali-T860", "r0p2", true},
|
||||
{"Mali-T860", "r1p0", true}, {"Mali-T860", "r2p0", true}, {"Mali-T880", "r1p0", true},
|
||||
{"Mali-T880", "r0p2", true}, {"Mali-T880", "r0p1", true}, {"Mali-T880", "r2p0", true}}},
|
||||
{"Mali-T600_r12p0-00rel0",
|
||||
{{"Mali-T600", "r0p0", true}, {"Mali-T600", "r0p0_15dev0", true}, {"Mali-T600", "r0p1", true},
|
||||
{"Mali-T620", "r0p1", true}, {"Mali-T620", "r1p0", true}, {"Mali-T620", "r1p1", true},
|
||||
{"Mali-T720", "r0p0", true}, {"Mali-T720", "r1p0", true}, {"Mali-T720", "r1p1", true},
|
||||
{"Mali-T760", "r0p0", true}, {"Mali-T760", "r0p1", true}, {"Mali-T760", "r0p1_50rel0", true},
|
||||
{"Mali-T760", "r0p2", true}, {"Mali-T760", "r0p3", true}, {"Mali-T760", "r1p0", true},
|
||||
{"Mali-T820", "r0p0", true}, {"Mali-T820", "r0p1", true}, {"Mali-T820", "r1p0", true},
|
||||
{"Mali-T830", "r1p0", true}, {"Mali-T830", "r0p1", true}, {"Mali-T860", "r0p2", true},
|
||||
{"Mali-T860", "r1p0", true}, {"Mali-T860", "r2p0", true}, {"Mali-T880", "r1p0", true},
|
||||
{"Mali-T880", "r0p2", true}, {"Mali-T880", "r0p1", true}, {"Mali-T880", "r2p0", true}}},
|
||||
{"Mali-T600_r13p0-00rel0",
|
||||
{{"Mali-T600", "r0p0", true}, {"Mali-T600", "r0p0_15dev0", true}, {"Mali-T600", "r0p1", true},
|
||||
{"Mali-T620", "r0p1", true}, {"Mali-T620", "r1p0", true}, {"Mali-T620", "r1p1", true},
|
||||
{"Mali-T720", "r0p0", true}, {"Mali-T720", "r1p0", true}, {"Mali-T720", "r1p1", true},
|
||||
{"Mali-T760", "r0p0", true}, {"Mali-T760", "r0p1", true}, {"Mali-T760", "r0p1_50rel0", true},
|
||||
{"Mali-T760", "r0p2", true}, {"Mali-T760", "r0p3", true}, {"Mali-T760", "r1p0", true},
|
||||
{"Mali-T820", "r0p0", true}, {"Mali-T820", "r0p1", true}, {"Mali-T820", "r1p0", true},
|
||||
{"Mali-T830", "r1p0", true}, {"Mali-T830", "r0p1", true}, {"Mali-T860", "r0p2", true},
|
||||
{"Mali-T860", "r1p0", true}, {"Mali-T860", "r2p0", true}, {"Mali-T880", "r1p0", true},
|
||||
{"Mali-T880", "r0p2", true}, {"Mali-T880", "r0p1", true}, {"Mali-T880", "r2p0", true}}},
|
||||
{"Mali-Gxx_r3p0-00rel0", {{"Mali-G71", "r0p0", false}}}};
|
||||
|
||||
std::vector<MaliDriverSet> driversES2new = {
|
||||
{"Mali-400_r5p0-01rel0",
|
||||
{{"Mali-300", "r0p0", true},
|
||||
{"Mali-400", "r1p1", true}, {"Mali-400", "r1p0", true},
|
||||
{"Mali-400", "r0p1", true}, {"Mali-400", "r0p0", true},
|
||||
{"Mali-450", "r0p0", true}
|
||||
}},
|
||||
{"Mali-400_r6p1-00rel0",
|
||||
{{"Mali-400", "r1p1", true}, {"Mali-400", "r1p0", true},
|
||||
{"Mali-400", "r0p1", true}, {"Mali-400", "r0p0", true},
|
||||
{"Mali-450", "r0p0", true},
|
||||
{"Mali-470", "r0p1", true}
|
||||
}},
|
||||
{"Mali-400_r7p0-00rel0",
|
||||
{{"Mali-400", "r1p1", true}, {"Mali-400", "r1p0", true},
|
||||
{"Mali-400", "r0p1", true}, {"Mali-400", "r0p0", true},
|
||||
{"Mali-450", "r0p0", true},
|
||||
{"Mali-470", "r0p1", true}}}};
|
||||
std::vector<MaliDriverSet> driversES2new = {{"Mali-400_r5p0-01rel0",
|
||||
{{"Mali-300", "r0p0", true},
|
||||
{"Mali-400", "r1p1", true},
|
||||
{"Mali-400", "r1p0", true},
|
||||
{"Mali-400", "r0p1", true},
|
||||
{"Mali-400", "r0p0", true},
|
||||
{"Mali-450", "r0p0", true}}},
|
||||
{"Mali-400_r6p1-00rel0",
|
||||
{{"Mali-400", "r1p1", true},
|
||||
{"Mali-400", "r1p0", true},
|
||||
{"Mali-400", "r0p1", true},
|
||||
{"Mali-400", "r0p0", true},
|
||||
{"Mali-450", "r0p0", true},
|
||||
{"Mali-470", "r0p1", true}}},
|
||||
{"Mali-400_r7p0-00rel0",
|
||||
{{"Mali-400", "r1p1", true},
|
||||
{"Mali-400", "r1p0", true},
|
||||
{"Mali-400", "r0p1", true},
|
||||
{"Mali-400", "r0p0", true},
|
||||
{"Mali-450", "r0p0", true},
|
||||
{"Mali-470", "r0p1", true}}}};
|
||||
driversES2new.insert(driversES2new.end(), driversES3new.begin(), driversES3new.end());
|
||||
|
||||
std::vector<MaliCompilerData> const compilers = {
|
||||
{dp::ApiVersion::OpenGLES3,
|
||||
GetCompilerPath(kCompilerMaliOpenGLES3),
|
||||
GetCompilerPath(kMaliCompilerOpenGLES3Dir),
|
||||
driversES3new}
|
||||
};
|
||||
std::vector<MaliCompilerData> const compilers = {{dp::ApiVersion::OpenGLES3, GetCompilerPath(kCompilerMaliOpenGLES3),
|
||||
GetCompilerPath(kMaliCompilerOpenGLES3Dir), driversES3new}};
|
||||
|
||||
base::DelayedThreadPool workerThread(16 /* threadsCount */);
|
||||
uint32_t counter = 0;
|
||||
@@ -482,7 +456,8 @@ UNIT_TEST(MALI_MobileCompileShaders_Test)
|
||||
continue;
|
||||
#endif
|
||||
counter++;
|
||||
workerThread.Push([&progressCounter, compiler, set, version] {
|
||||
workerThread.Push([&progressCounter, compiler, set, version]
|
||||
{
|
||||
MaliCompileShaders(compiler, set, version);
|
||||
progressCounter++;
|
||||
});
|
||||
|
||||
@@ -42,26 +42,20 @@ VulkanProgramParamsSetter::VulkanProgramParamsSetter(ref_ptr<dp::vulkan::VulkanB
|
||||
m_objectManager->SetMaxImageSamplers(programPool->GetMaxImageSamplers());
|
||||
|
||||
for (auto & ub : m_uniformBuffers)
|
||||
{
|
||||
ub.emplace_back(CreateUniformBuffer(context->GetDevice(), m_objectManager,
|
||||
m_sizeAlignment, m_offsetAlignment));
|
||||
}
|
||||
ub.emplace_back(CreateUniformBuffer(context->GetDevice(), m_objectManager, m_sizeAlignment, m_offsetAlignment));
|
||||
|
||||
m_flushHandlerId = context->RegisterHandler(VulkanBaseContext::HandlerType::PrePresent,
|
||||
[this](uint32_t)
|
||||
{
|
||||
Flush();
|
||||
});
|
||||
m_flushHandlerId =
|
||||
context->RegisterHandler(VulkanBaseContext::HandlerType::PrePresent, [this](uint32_t) { Flush(); });
|
||||
|
||||
m_finishHandlerId = context->RegisterHandler(VulkanBaseContext::HandlerType::PostPresent,
|
||||
[this](uint32_t inflightFrameIndex)
|
||||
m_finishHandlerId =
|
||||
context->RegisterHandler(VulkanBaseContext::HandlerType::PostPresent, [this](uint32_t inflightFrameIndex)
|
||||
{
|
||||
CHECK_LESS(inflightFrameIndex, dp::vulkan::kMaxInflightFrames, ());
|
||||
Finish(inflightFrameIndex);
|
||||
});
|
||||
|
||||
m_updateInflightFrameId = context->RegisterHandler(VulkanBaseContext::HandlerType::UpdateInflightFrame,
|
||||
[this](uint32_t inflightFrameIndex)
|
||||
m_updateInflightFrameId =
|
||||
context->RegisterHandler(VulkanBaseContext::HandlerType::UpdateInflightFrame, [this](uint32_t inflightFrameIndex)
|
||||
{
|
||||
CHECK_LESS(inflightFrameIndex, dp::vulkan::kMaxInflightFrames, ());
|
||||
m_currentInflightFrameIndex = inflightFrameIndex;
|
||||
@@ -112,8 +106,8 @@ void VulkanProgramParamsSetter::Finish(uint32_t inflightFrameIndex)
|
||||
b.m_freeOffset = 0;
|
||||
}
|
||||
|
||||
void VulkanProgramParamsSetter::ApplyBytes(ref_ptr<dp::vulkan::VulkanBaseContext> context,
|
||||
void const * data, uint32_t sizeInBytes)
|
||||
void VulkanProgramParamsSetter::ApplyBytes(ref_ptr<dp::vulkan::VulkanBaseContext> context, void const * data,
|
||||
uint32_t sizeInBytes)
|
||||
{
|
||||
CHECK_THREAD_CHECKER(m_threadChecker, ());
|
||||
auto const & mm = m_objectManager->GetMemoryManager();
|
||||
@@ -133,8 +127,7 @@ void VulkanProgramParamsSetter::ApplyBytes(ref_ptr<dp::vulkan::VulkanBaseContext
|
||||
if (index < 0)
|
||||
{
|
||||
uint32_t sizeAlignment, offsetAlignment;
|
||||
ub.emplace_back(CreateUniformBuffer(context->GetDevice(), m_objectManager,
|
||||
sizeAlignment, offsetAlignment));
|
||||
ub.emplace_back(CreateUniformBuffer(context->GetDevice(), m_objectManager, sizeAlignment, offsetAlignment));
|
||||
CHECK_EQUAL(m_sizeAlignment, sizeAlignment, ());
|
||||
CHECK_EQUAL(m_offsetAlignment, offsetAlignment, ());
|
||||
index = static_cast<int>(ub.size()) - 1;
|
||||
@@ -146,8 +139,8 @@ void VulkanProgramParamsSetter::ApplyBytes(ref_ptr<dp::vulkan::VulkanBaseContext
|
||||
|
||||
// Update offset and align it.
|
||||
ub[index].m_freeOffset += alignedSize;
|
||||
ub[index].m_freeOffset = std::min(mm.GetAligned(ub[index].m_freeOffset, m_offsetAlignment),
|
||||
ub[index].m_object.GetAlignedSize());
|
||||
ub[index].m_freeOffset =
|
||||
std::min(mm.GetAligned(ub[index].m_freeOffset, m_offsetAlignment), ub[index].m_object.GetAlignedSize());
|
||||
|
||||
memcpy(ptr, data, sizeInBytes);
|
||||
|
||||
@@ -159,79 +152,68 @@ void VulkanProgramParamsSetter::ApplyBytes(ref_ptr<dp::vulkan::VulkanBaseContext
|
||||
descriptor.m_id = static_cast<uint32_t>(index);
|
||||
context->ApplyParamDescriptor(std::move(descriptor));
|
||||
}
|
||||
|
||||
void VulkanProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program,
|
||||
|
||||
void VulkanProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
MapProgramParams const & params)
|
||||
{
|
||||
ApplyImpl(context, program, params);
|
||||
}
|
||||
|
||||
void VulkanProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program,
|
||||
void VulkanProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
RouteProgramParams const & params)
|
||||
{
|
||||
ApplyImpl(context, program, params);
|
||||
}
|
||||
|
||||
void VulkanProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program,
|
||||
void VulkanProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
TrafficProgramParams const & params)
|
||||
{
|
||||
ApplyImpl(context, program, params);
|
||||
}
|
||||
|
||||
void VulkanProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program,
|
||||
void VulkanProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
TransitProgramParams const & params)
|
||||
{
|
||||
ApplyImpl(context, program, params);
|
||||
}
|
||||
|
||||
void VulkanProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program,
|
||||
void VulkanProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
GuiProgramParams const & params)
|
||||
{
|
||||
ApplyImpl(context, program, params);
|
||||
}
|
||||
|
||||
void VulkanProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program,
|
||||
void VulkanProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
ShapesProgramParams const & params)
|
||||
{
|
||||
ApplyImpl(context, program, params);
|
||||
}
|
||||
|
||||
void VulkanProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program,
|
||||
void VulkanProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
Arrow3dProgramParams const & params)
|
||||
{
|
||||
ApplyImpl(context, program, params);
|
||||
}
|
||||
|
||||
void VulkanProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program,
|
||||
void VulkanProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
DebugRectProgramParams const & params)
|
||||
{
|
||||
ApplyImpl(context, program, params);
|
||||
}
|
||||
|
||||
void VulkanProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program,
|
||||
void VulkanProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
ScreenQuadProgramParams const & params)
|
||||
{
|
||||
ApplyImpl(context, program, params);
|
||||
}
|
||||
|
||||
void VulkanProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program,
|
||||
void VulkanProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
SMAAProgramParams const & params)
|
||||
{
|
||||
ApplyImpl(context, program, params);
|
||||
}
|
||||
|
||||
void VulkanProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context,
|
||||
ref_ptr<dp::GpuProgram> program,
|
||||
void VulkanProgramParamsSetter::Apply(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
ImGuiProgramParams const & params)
|
||||
{
|
||||
ApplyImpl(context, program, params);
|
||||
|
||||
@@ -26,7 +26,7 @@ public:
|
||||
dp::vulkan::VulkanObject m_object;
|
||||
uint8_t * m_pointer = nullptr;
|
||||
uint32_t m_freeOffset = 0;
|
||||
};
|
||||
};
|
||||
|
||||
VulkanProgramParamsSetter(ref_ptr<dp::vulkan::VulkanBaseContext> context, ref_ptr<VulkanProgramPool> programPool);
|
||||
~VulkanProgramParamsSetter() override;
|
||||
@@ -59,17 +59,15 @@ public:
|
||||
ImGuiProgramParams const & params) override;
|
||||
|
||||
private:
|
||||
template<typename T>
|
||||
void ApplyImpl(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,
|
||||
T const & params)
|
||||
template <typename T>
|
||||
void ApplyImpl(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program, T const & params)
|
||||
{
|
||||
ASSERT_EQUAL(T::GetName(), ProgramParams::GetBoundParamsName(program),
|
||||
("Mismatched program and parameters", program->GetName()));
|
||||
ApplyBytes(context, reinterpret_cast<void const *>(¶ms), sizeof(params));
|
||||
}
|
||||
|
||||
void ApplyBytes(ref_ptr<dp::vulkan::VulkanBaseContext> context,
|
||||
void const * data, uint32_t sizeInBytes);
|
||||
void ApplyBytes(ref_ptr<dp::vulkan::VulkanBaseContext> context, void const * data, uint32_t sizeInBytes);
|
||||
|
||||
ref_ptr<dp::vulkan::VulkanObjectManager> m_objectManager;
|
||||
std::array<std::vector<UniformBuffer>, dp::vulkan::kMaxInflightFrames> m_uniformBuffers;
|
||||
|
||||
@@ -55,9 +55,7 @@ struct TextureBindingReflectionInfo
|
||||
std::string m_name;
|
||||
int8_t m_index = kInvalidBindingIndex;
|
||||
int8_t m_isInFragmentShader = 1;
|
||||
DECLARE_VISITOR(visitor(m_name, "name"),
|
||||
visitor(m_index, "idx"),
|
||||
visitor(m_isInFragmentShader, "frag"))
|
||||
DECLARE_VISITOR(visitor(m_name, "name"), visitor(m_index, "idx"), visitor(m_isInFragmentShader, "frag"))
|
||||
};
|
||||
|
||||
struct ReflectionInfo
|
||||
@@ -66,8 +64,7 @@ struct ReflectionInfo
|
||||
int8_t m_fsUniformsIndex = kInvalidBindingIndex;
|
||||
std::vector<TextureBindingReflectionInfo> m_textures;
|
||||
|
||||
DECLARE_VISITOR(visitor(m_vsUniformsIndex, "vs_uni"),
|
||||
visitor(m_fsUniformsIndex, "fs_uni"),
|
||||
DECLARE_VISITOR(visitor(m_vsUniformsIndex, "vs_uni"), visitor(m_fsUniformsIndex, "fs_uni"),
|
||||
visitor(m_textures, "tex"))
|
||||
};
|
||||
|
||||
@@ -79,12 +76,8 @@ struct ReflectionData
|
||||
uint32_t m_vsSize = 0;
|
||||
uint32_t m_fsSize = 0;
|
||||
ReflectionInfo m_info;
|
||||
DECLARE_VISITOR(visitor(m_programIndex, "prg"),
|
||||
visitor(m_vsOffset, "vs_off"),
|
||||
visitor(m_fsOffset, "fs_off"),
|
||||
visitor(m_vsSize, "vs_size"),
|
||||
visitor(m_fsSize, "fs_size"),
|
||||
visitor(m_info, "info"))
|
||||
DECLARE_VISITOR(visitor(m_programIndex, "prg"), visitor(m_vsOffset, "vs_off"), visitor(m_fsOffset, "fs_off"),
|
||||
visitor(m_vsSize, "vs_size"), visitor(m_fsSize, "fs_size"), visitor(m_info, "info"))
|
||||
};
|
||||
|
||||
struct ReflectionFile
|
||||
@@ -122,10 +115,7 @@ std::map<uint8_t, ReflectionData> ReadReflectionFile(std::string const & filenam
|
||||
for (auto & d : reflectionFile.m_reflectionData)
|
||||
{
|
||||
auto const index = d.m_programIndex;
|
||||
std::ranges::sort(d.m_info.m_textures, [](auto const & a, auto const & b)
|
||||
{
|
||||
return a.m_index < b.m_index;
|
||||
});
|
||||
std::ranges::sort(d.m_info.m_textures, [](auto const & a, auto const & b) { return a.m_index < b.m_index; });
|
||||
result.insert(std::make_pair(index, std::move(d)));
|
||||
}
|
||||
|
||||
@@ -185,18 +175,17 @@ std::vector<VkDescriptorSetLayoutBinding> GetLayoutBindings(ReflectionInfo const
|
||||
|
||||
for (uint32_t i = static_cast<uint32_t>(reflectionInfo.m_textures.size()); i < maxTextureBindings; ++i)
|
||||
result.push_back({
|
||||
.binding = bindingIndex++,
|
||||
.descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,
|
||||
.descriptorCount = 1,
|
||||
.stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT,
|
||||
.pImmutableSamplers = nullptr,
|
||||
.binding = bindingIndex++,
|
||||
.descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,
|
||||
.descriptorCount = 1,
|
||||
.stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT,
|
||||
.pImmutableSamplers = nullptr,
|
||||
});
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
VkShaderModule LoadShaderModule(VkDevice device, std::vector<uint8_t> const & packData,
|
||||
uint32_t offset, uint32_t size)
|
||||
VkShaderModule LoadShaderModule(VkDevice device, std::vector<uint8_t> const & packData, uint32_t offset, uint32_t size)
|
||||
{
|
||||
VkShaderModule shaderModule;
|
||||
CHECK(offset % sizeof(uint32_t) == 0, ("Incorrect SPIR-V file alignment."));
|
||||
@@ -235,21 +224,21 @@ VulkanProgramPool::VulkanProgramPool(ref_ptr<dp::GraphicsContext> context)
|
||||
auto const bindings = GetLayoutBindings(refl.m_info, m_maxImageSamplers);
|
||||
CHECK(bindings.size() == kMaxUniformBuffers + m_maxImageSamplers, ("Incorrect bindings count."));
|
||||
|
||||
VkDescriptorSetLayoutCreateInfo descriptorLayout = {};
|
||||
VkDescriptorSetLayoutCreateInfo descriptorLayout = {};
|
||||
descriptorLayout.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO;
|
||||
descriptorLayout.pBindings = bindings.data();
|
||||
descriptorLayout.bindingCount = static_cast<uint32_t>(bindings.size());
|
||||
|
||||
CHECK_VK_CALL(vkCreateDescriptorSetLayout(device, &descriptorLayout, nullptr,
|
||||
&m_programData[i].m_descriptorSetLayout));
|
||||
CHECK_VK_CALL(
|
||||
vkCreateDescriptorSetLayout(device, &descriptorLayout, nullptr, &m_programData[i].m_descriptorSetLayout));
|
||||
|
||||
VkPipelineLayoutCreateInfo pipelineLayoutCreateInfo = {};
|
||||
pipelineLayoutCreateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO;
|
||||
pipelineLayoutCreateInfo.setLayoutCount = 1;
|
||||
pipelineLayoutCreateInfo.pSetLayouts = &m_programData[i].m_descriptorSetLayout;
|
||||
|
||||
CHECK_VK_CALL(vkCreatePipelineLayout(device, &pipelineLayoutCreateInfo, nullptr,
|
||||
&m_programData[i].m_pipelineLayout));
|
||||
CHECK_VK_CALL(
|
||||
vkCreatePipelineLayout(device, &pipelineLayoutCreateInfo, nullptr, &m_programData[i].m_pipelineLayout));
|
||||
|
||||
for (auto const & t : refl.m_info.m_textures)
|
||||
m_programData[i].m_textureBindings[t.m_name] = t.m_index;
|
||||
@@ -293,11 +282,8 @@ drape_ptr<dp::GpuProgram> VulkanProgramPool::Get(Program program)
|
||||
fsStage.module = d.m_fragmentShader;
|
||||
fsStage.pName = "main";
|
||||
|
||||
return make_unique_dp<dp::vulkan::VulkanGpuProgram>(DebugPrint(program),
|
||||
vsStage, fsStage,
|
||||
d.m_descriptorSetLayout,
|
||||
d.m_pipelineLayout,
|
||||
d.m_textureBindings);
|
||||
return make_unique_dp<dp::vulkan::VulkanGpuProgram>(DebugPrint(program), vsStage, fsStage, d.m_descriptorSetLayout,
|
||||
d.m_pipelineLayout, d.m_textureBindings);
|
||||
}
|
||||
|
||||
uint32_t VulkanProgramPool::GetMaxUniformBuffers() const
|
||||
|
||||
Reference in New Issue
Block a user