spirv: Move nir_lower_libclc to src/compiler/spirv
This puts it in a shared place where everyone can get at it. Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7034>
This commit is contained in:

committed by
Marge Bot

parent
43390a546d
commit
2fa7c79045
@@ -377,6 +377,7 @@ SPIRV_FILES = \
|
||||
spirv/GLSL.std.450.h \
|
||||
spirv/gl_spirv.c \
|
||||
spirv/nir_load_libclc.c \
|
||||
spirv/nir_lower_libclc.c \
|
||||
spirv/nir_spirv.h \
|
||||
spirv/OpenCL.std.h \
|
||||
spirv/spirv.h \
|
||||
|
@@ -252,6 +252,7 @@ files_libnir = files(
|
||||
'../spirv/GLSL.std.450.h',
|
||||
'../spirv/gl_spirv.c',
|
||||
'../spirv/nir_load_libclc.c',
|
||||
'../spirv/nir_lower_libclc.c',
|
||||
'../spirv/nir_spirv.h',
|
||||
'../spirv/OpenCL.std.h',
|
||||
'../spirv/spirv.h',
|
||||
|
@@ -29,7 +29,7 @@
|
||||
*/
|
||||
#include "nir.h"
|
||||
#include "nir_builder.h"
|
||||
#include "nir_lower_libclc.h"
|
||||
#include "nir_spirv.h"
|
||||
|
||||
static bool
|
||||
lower_clc_call_instr(nir_instr *instr, nir_builder *b,
|
@@ -111,6 +111,8 @@ nir_load_libclc_shader(unsigned ptr_bit_size,
|
||||
const struct spirv_to_nir_options *spirv_options,
|
||||
const nir_shader_compiler_options *nir_options);
|
||||
|
||||
bool nir_lower_libclc(nir_shader *shader, const nir_shader *clc_shader);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -85,7 +85,7 @@ libclspirv = static_library(
|
||||
|
||||
libclnir = static_library(
|
||||
'clnir',
|
||||
files('nir/invocation.cpp', 'nir/invocation.hpp', 'nir/nir_lower_libclc.c', 'nir/nir_lower_libclc.h'),
|
||||
files('nir/invocation.cpp', 'nir/invocation.hpp'),
|
||||
include_directories : [clover_incs, inc_mesa],
|
||||
dependencies : idep_nir,
|
||||
cpp_args : [clover_opencl_cpp_args, clover_spirv_cpp_args],
|
||||
|
@@ -37,10 +37,6 @@
|
||||
#include <compiler/spirv/nir_spirv.h>
|
||||
#include <util/u_math.h>
|
||||
|
||||
extern "C" {
|
||||
#include "nir_lower_libclc.h"
|
||||
}
|
||||
|
||||
using namespace clover;
|
||||
|
||||
#ifdef HAVE_CLOVER_SPIRV
|
||||
|
@@ -1,31 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2019 Red Hat
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
* IN THE SOFTWARE.
|
||||
*
|
||||
*/
|
||||
#ifndef NIR_LOWER_LIBCLC_H
|
||||
#define NIR_LOWER_LIBCLC_H
|
||||
|
||||
bool
|
||||
nir_lower_libclc(nir_shader *shader,
|
||||
const nir_shader *clc_shader);
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user