From d8410fec4efa4fb8847342a15b021501e3e2341b Mon Sep 17 00:00:00 2001 From: Krzysztof Raszkowski Date: Thu, 30 Jan 2020 17:25:58 +0100 Subject: [PATCH] gallium/swr: Fix gcc 4.8.5 compile error Stop using C++14 feature so it can be compile on default centos7 gcc compiler. Reviewed-by: Jan Zielinski Tested-by: Marge Bot Part-of: --- src/gallium/drivers/swr/swr_shader.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/gallium/drivers/swr/swr_shader.cpp b/src/gallium/drivers/swr/swr_shader.cpp index 558cf5fe4bc..b8f2a10e04d 100644 --- a/src/gallium/drivers/swr/swr_shader.cpp +++ b/src/gallium/drivers/swr/swr_shader.cpp @@ -79,7 +79,6 @@ constexpr bool verbose_shader = false; #endif using namespace SwrJit; -using namespace llvm; static unsigned locate_linkage(ubyte name, ubyte index, struct tgsi_shader_info *info); @@ -2191,7 +2190,7 @@ swr_compile_gs(struct swr_context *ctx, swr_jit_gs_key &key) "GS"); PFN_GS_FUNC func = builder.CompileGS(ctx, key); - ctx->gs->map.insert(std::make_pair(key, std::make_unique(builder.gallivm, func))); + ctx->gs->map.insert(std::make_pair(key, std::unique_ptr(new VariantGS(builder.gallivm, func)))); return func; } @@ -2204,7 +2203,7 @@ swr_compile_tcs(struct swr_context *ctx, swr_jit_tcs_key &key) PFN_TCS_FUNC func = builder.CompileTCS(ctx, key); ctx->tcs->map.insert( - std::make_pair(key, std::make_unique(builder.gallivm, func))); + std::make_pair(key, std::unique_ptr(new VariantTCS(builder.gallivm, func)))); return func; } @@ -2218,7 +2217,7 @@ swr_compile_tes(struct swr_context *ctx, swr_jit_tes_key &key) PFN_TES_FUNC func = builder.CompileTES(ctx, key); ctx->tes->map.insert( - std::make_pair(key, std::make_unique(builder.gallivm, func))); + std::make_pair(key, std::unique_ptr(new VariantTES(builder.gallivm, func)))); return func; } @@ -2492,7 +2491,7 @@ swr_compile_vs(struct swr_context *ctx, swr_jit_vs_key &key) "VS"); PFN_VERTEX_FUNC func = builder.CompileVS(ctx, key); - ctx->vs->map.insert(std::make_pair(key, std::make_unique(builder.gallivm, func))); + ctx->vs->map.insert(std::make_pair(key, std::unique_ptr(new VariantVS(builder.gallivm, func)))); return func; } @@ -2961,6 +2960,6 @@ swr_compile_fs(struct swr_context *ctx, swr_jit_fs_key &key) "FS"); PFN_PIXEL_KERNEL func = builder.CompileFS(ctx, key); - ctx->fs->map.insert(std::make_pair(key, std::make_unique(builder.gallivm, func))); + ctx->fs->map.insert(std::make_pair(key, std::unique_ptr(new VariantFS(builder.gallivm, func)))); return func; } -- 2.30.2