--- /dev/null
+# Copyright © 2017 Dylan Baker
+
+# 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 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.
+
+files_libnouveau_codegen = files(
+ 'nv50_ir.cpp',
+ 'nv50_ir_bb.cpp',
+ 'nv50_ir_build_util.cpp',
+ 'nv50_ir_build_util.h',
+ 'nv50_ir_driver.h',
+ 'nv50_ir_emit_nv50.cpp',
+ 'nv50_ir_from_common.cpp',
+ 'nv50_ir_from_common.h',
+ 'nv50_ir_from_nir.cpp',
+ 'nv50_ir_from_tgsi.cpp',
+ 'nv50_ir_graph.cpp',
+ 'nv50_ir_graph.h',
+ 'nv50_ir.h',
+ 'nv50_ir_inlines.h',
+ 'nv50_ir_lowering_helper.cpp',
+ 'nv50_ir_lowering_helper.h',
+ 'nv50_ir_lowering_nv50.cpp',
+ 'nv50_ir_peephole.cpp',
+ 'nv50_ir_print.cpp',
+ 'nv50_ir_ra.cpp',
+ 'nv50_ir_serialize.cpp',
+ 'nv50_ir_ssa.cpp',
+ 'nv50_ir_target.cpp',
+ 'nv50_ir_target.h',
+ 'nv50_ir_target_nv50.cpp',
+ 'nv50_ir_target_nv50.h',
+ 'nv50_ir_util.cpp',
+ 'nv50_ir_util.h',
+ 'unordered_set.h',
+ 'nv50_ir_emit_gv100.cpp',
+ 'nv50_ir_emit_gv100.h',
+ 'nv50_ir_emit_gk110.cpp',
+ 'nv50_ir_emit_gm107.cpp',
+ 'nv50_ir_emit_nvc0.cpp',
+ 'nv50_ir_lowering_gv100.cpp',
+ 'nv50_ir_lowering_gv100.h',
+ 'nv50_ir_lowering_gm107.cpp',
+ 'nv50_ir_lowering_gm107.h',
+ 'nv50_ir_lowering_nvc0.cpp',
+ 'nv50_ir_lowering_nvc0.h',
+ 'nv50_ir_target_gv100.cpp',
+ 'nv50_ir_target_gv100.h',
+ 'nv50_ir_target_gm107.cpp',
+ 'nv50_ir_target_gm107.h',
+ 'nv50_ir_target_nvc0.cpp',
+ 'nv50_ir_target_nvc0.h',
+)
+
+libnouveau_codegen = static_library(
+ 'nouveau_codegen',
+ files_libnouveau_codegen,
+ include_directories : [
+ inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_mapi, inc_mesa,
+ ],
+ gnu_symbol_visibility : 'hidden',
+ dependencies : [dep_libdrm, idep_mesautil, idep_nir_headers],
+)
+
+idep_nouveau_codegen = declare_dependency(
+ sources : [ 'nv50_ir_driver.h' ],
+ include_directories : [inc_gallium_aux, include_directories('.')],
+)
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "codegen/nv50_ir.h"
-#include "codegen/nv50_ir_target.h"
-#include "codegen/nv50_ir_driver.h"
-
-extern "C" {
-#include "nouveau_debug.h"
-}
+#include "nv50_ir.h"
+#include "nv50_ir_target.h"
+#include "nv50_ir_driver.h"
namespace nv50_ir {
#include <list>
#include <vector>
-#include "codegen/unordered_set.h"
-#include "codegen/nv50_ir_util.h"
-#include "codegen/nv50_ir_graph.h"
+#include "unordered_set.h"
+#include "nv50_ir_util.h"
+#include "nv50_ir_graph.h"
-#include "codegen/nv50_ir_driver.h"
+#include "nv50_ir_driver.h"
namespace nv50_ir {
// =============================================================================
-#include "codegen/nv50_ir_inlines.h"
+#include "nv50_ir_inlines.h"
} // namespace nv50_ir
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "codegen/nv50_ir.h"
+#include "nv50_ir.h"
namespace nv50_ir {
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "codegen/nv50_ir.h"
-#include "codegen/nv50_ir_build_util.h"
+#include "nv50_ir.h"
+#include "nv50_ir_build_util.h"
namespace nv50_ir {
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "codegen/nv50_ir_target_nvc0.h"
+#include "nv50_ir_target_nvc0.h"
// CodeEmitter for GK110 encoding of the Fermi/Kepler ISA.
* Authors: Ben Skeggs <bskeggs@redhat.com>
*/
-#include "codegen/nv50_ir_target_gm107.h"
-#include "codegen/nv50_ir_sched_gm107.h"
+#include "nv50_ir_target_gm107.h"
+#include "nv50_ir_sched_gm107.h"
//#define GM107_DEBUG_SCHED_DATA
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "codegen/nv50_ir_emit_gv100.h"
-#include "codegen/nv50_ir_sched_gm107.h"
+#include "nv50_ir_emit_gv100.h"
+#include "nv50_ir_sched_gm107.h"
namespace nv50_ir {
*/
#ifndef __NV50_IR_EMIT_GV100_H__
#define __NV50_IR_EMIT_GV100_H__
-#include "codegen/nv50_ir_target_gv100.h"
+#include "nv50_ir_target_gv100.h"
namespace nv50_ir {
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "codegen/nv50_ir.h"
-#include "codegen/nv50_ir_target_nv50.h"
+#include "nv50_ir.h"
+#include "nv50_ir_target_nv50.h"
namespace nv50_ir {
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "codegen/nv50_ir_target_nvc0.h"
+#include "nv50_ir_target_nvc0.h"
namespace nv50_ir {
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "codegen/nv50_ir_from_common.h"
+#include "nv50_ir_from_common.h"
namespace nv50_ir {
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "codegen/nv50_ir.h"
-#include "codegen/nv50_ir_build_util.h"
+#include "nv50_ir.h"
+#include "nv50_ir_build_util.h"
namespace nv50_ir {
#include "util/u_debug.h"
#include "util/u_prim.h"
-#include "codegen/nv50_ir.h"
-#include "codegen/nv50_ir_from_common.h"
-#include "codegen/nv50_ir_lowering_helper.h"
-#include "codegen/nv50_ir_target.h"
-#include "codegen/nv50_ir_util.h"
+#include "nv50_ir.h"
+#include "nv50_ir_from_common.h"
+#include "nv50_ir_lowering_helper.h"
+#include "nv50_ir_target.h"
+#include "nv50_ir_util.h"
#include "tgsi/tgsi_from_mesa.h"
#if __cplusplus >= 201103L
#include <set>
-#include "codegen/nv50_ir.h"
-#include "codegen/nv50_ir_from_common.h"
-#include "codegen/nv50_ir_util.h"
+#include "nv50_ir.h"
+#include "nv50_ir_from_common.h"
+#include "nv50_ir_util.h"
namespace tgsi {
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "codegen/nv50_ir_graph.h"
+#include "nv50_ir_graph.h"
#include <limits>
#include <list>
#include <stack>
-#include "codegen/nv50_ir.h"
+#include "nv50_ir.h"
namespace nv50_ir {
#ifndef __NV50_IR_GRAPH_H__
#define __NV50_IR_GRAPH_H__
-#include "codegen/nv50_ir_util.h"
+#include "nv50_ir_util.h"
#include <vector>
namespace nv50_ir {
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "codegen/nv50_ir.h"
-#include "codegen/nv50_ir_build_util.h"
+#include "nv50_ir.h"
+#include "nv50_ir_build_util.h"
-#include "codegen/nv50_ir_target_nvc0.h"
-#include "codegen/nv50_ir_lowering_gm107.h"
+#include "nv50_ir_target_nvc0.h"
+#include "nv50_ir_lowering_gm107.h"
#include <limits>
-#include "codegen/nv50_ir_lowering_nvc0.h"
+#include "nv50_ir_lowering_nvc0.h"
namespace nv50_ir {
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "codegen/nv50_ir.h"
-#include "codegen/nv50_ir_build_util.h"
+#include "nv50_ir.h"
+#include "nv50_ir_build_util.h"
-#include "codegen/nv50_ir_target_nvc0.h"
-#include "codegen/nv50_ir_lowering_gv100.h"
+#include "nv50_ir_target_nvc0.h"
+#include "nv50_ir_lowering_gv100.h"
#include <limits>
*/
#ifndef __NV50_IR_LOWERING_GV100_H__
#define __NV50_IR_LOWERING_GV100_H__
-#include "codegen/nv50_ir_lowering_gm107.h"
+#include "nv50_ir_lowering_gm107.h"
namespace nv50_ir {
* Authors: Karol Herbst <kherbst@redhat.com>
*/
-#include "codegen/nv50_ir_lowering_helper.h"
+#include "nv50_ir_lowering_helper.h"
namespace nv50_ir {
#ifndef __NV50_IR_LOWERING_HELPER__
#define __NV50_IR_LOWERING_HELPER__
-#include "codegen/nv50_ir.h"
-#include "codegen/nv50_ir_build_util.h"
+#include "nv50_ir.h"
+#include "nv50_ir_build_util.h"
namespace nv50_ir {
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "codegen/nv50_ir.h"
-#include "codegen/nv50_ir_build_util.h"
+#include "nv50_ir.h"
+#include "nv50_ir_build_util.h"
-#include "codegen/nv50_ir_target_nv50.h"
+#include "nv50_ir_target_nv50.h"
#define NV50_SU_INFO_SIZE_X 0x00
#define NV50_SU_INFO_SIZE_Y 0x04
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "codegen/nv50_ir.h"
-#include "codegen/nv50_ir_build_util.h"
+#include "nv50_ir.h"
+#include "nv50_ir_build_util.h"
-#include "codegen/nv50_ir_target_nvc0.h"
-#include "codegen/nv50_ir_lowering_nvc0.h"
+#include "nv50_ir_target_nvc0.h"
+#include "nv50_ir_lowering_nvc0.h"
#include <limits>
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "codegen/nv50_ir.h"
-#include "codegen/nv50_ir_build_util.h"
+#include "nv50_ir.h"
+#include "nv50_ir_build_util.h"
/* On nvc0, surface info is obtained via the surface binding points passed
* to the SULD/SUST instructions.
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "codegen/nv50_ir.h"
-#include "codegen/nv50_ir_target.h"
-#include "codegen/nv50_ir_build_util.h"
+#include "nv50_ir.h"
+#include "nv50_ir_target.h"
+#include "nv50_ir_build_util.h"
extern "C" {
#include "util/u_math.h"
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "codegen/nv50_ir.h"
-#include "codegen/nv50_ir_target.h"
-#include "codegen/nv50_ir_driver.h"
+#include "nv50_ir.h"
+#include "nv50_ir_target.h"
+#include "nv50_ir_driver.h"
#include <inttypes.h>
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "codegen/nv50_ir.h"
-#include "codegen/nv50_ir_target.h"
+#include "nv50_ir.h"
+#include "nv50_ir_target.h"
#include <algorithm>
#include <stack>
#include "util/blob.h"
-#include "codegen/nv50_ir_driver.h"
-#include "codegen/nv50_ir.h"
-#include "codegen/nv50_ir_target.h"
+#include "nv50_ir_driver.h"
+#include "nv50_ir.h"
+#include "nv50_ir_target.h"
#include "nv50_ir_driver.h"
#include "tgsi/tgsi_parse.h"
#include "compiler/nir/nir_serialize.h"
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "codegen/nv50_ir.h"
-#include "codegen/nv50_ir_target.h"
+#include "nv50_ir.h"
+#include "nv50_ir_target.h"
namespace nv50_ir {
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "codegen/nv50_ir.h"
-#include "codegen/nv50_ir_target.h"
+#include "nv50_ir.h"
+#include "nv50_ir_target.h"
namespace nv50_ir {
} // namespace nv50_ir
-#include "codegen/nv50_ir_driver.h"
+#include "nv50_ir_driver.h"
extern "C" {
#ifndef __NV50_IR_TARGET_H__
#define __NV50_IR_TARGET_H__
-#include "codegen/nv50_ir.h"
+#include "nv50_ir.h"
namespace nv50_ir {
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "codegen/nv50_ir_target_gm107.h"
-#include "codegen/nv50_ir_lowering_gm107.h"
+#include "nv50_ir_target_gm107.h"
+#include "nv50_ir_lowering_gm107.h"
namespace nv50_ir {
-#include "codegen/nv50_ir_target_nvc0.h"
+#include "nv50_ir_target_nvc0.h"
namespace nv50_ir {
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "codegen/nv50_ir_target_gv100.h"
-#include "codegen/nv50_ir_lowering_gv100.h"
-#include "codegen/nv50_ir_emit_gv100.h"
+#include "nv50_ir_target_gv100.h"
+#include "nv50_ir_lowering_gv100.h"
+#include "nv50_ir_emit_gv100.h"
namespace nv50_ir {
*/
#ifndef __NV50_IR_TARGET_GV100_H__
#define __NV50_IR_TARGET_GV100_H__
-#include "codegen/nv50_ir_target_gm107.h"
+#include "nv50_ir_target_gm107.h"
namespace nv50_ir {
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "codegen/nv50_ir_target_nv50.h"
+#include "nv50_ir_target_nv50.h"
namespace nv50_ir {
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "codegen/nv50_ir_target.h"
+#include "nv50_ir_target.h"
namespace nv50_ir {
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "codegen/nv50_ir_target_nvc0.h"
+#include "nv50_ir_target_nvc0.h"
namespace nv50_ir {
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "codegen/nv50_ir_target.h"
+#include "nv50_ir_target.h"
namespace nv50_ir {
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "codegen/nv50_ir_util.h"
+#include "nv50_ir_util.h"
namespace nv50_ir {
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
+subdir('codegen')
+
files_libnouveau = files(
'nouveau_buffer.c',
'nouveau_buffer.h',
'nv50/nv98_video.h',
'nv50/nv98_video_ppp.c',
'nv50/nv98_video_vp.c',
- 'codegen/nv50_ir.cpp',
- 'codegen/nv50_ir_bb.cpp',
- 'codegen/nv50_ir_build_util.cpp',
- 'codegen/nv50_ir_build_util.h',
- 'codegen/nv50_ir_driver.h',
- 'codegen/nv50_ir_emit_nv50.cpp',
- 'codegen/nv50_ir_from_common.cpp',
- 'codegen/nv50_ir_from_common.h',
- 'codegen/nv50_ir_from_nir.cpp',
- 'codegen/nv50_ir_from_tgsi.cpp',
- 'codegen/nv50_ir_graph.cpp',
- 'codegen/nv50_ir_graph.h',
- 'codegen/nv50_ir.h',
- 'codegen/nv50_ir_inlines.h',
- 'codegen/nv50_ir_lowering_helper.cpp',
- 'codegen/nv50_ir_lowering_helper.h',
- 'codegen/nv50_ir_lowering_nv50.cpp',
- 'codegen/nv50_ir_peephole.cpp',
- 'codegen/nv50_ir_print.cpp',
- 'codegen/nv50_ir_ra.cpp',
- 'codegen/nv50_ir_serialize.cpp',
- 'codegen/nv50_ir_ssa.cpp',
- 'codegen/nv50_ir_target.cpp',
- 'codegen/nv50_ir_target.h',
- 'codegen/nv50_ir_target_nv50.cpp',
- 'codegen/nv50_ir_target_nv50.h',
- 'codegen/nv50_ir_util.cpp',
- 'codegen/nv50_ir_util.h',
- 'codegen/unordered_set.h',
- 'codegen/nv50_ir_emit_gv100.cpp',
- 'codegen/nv50_ir_emit_gv100.h',
- 'codegen/nv50_ir_emit_gk110.cpp',
- 'codegen/nv50_ir_emit_gm107.cpp',
- 'codegen/nv50_ir_emit_nvc0.cpp',
- 'codegen/nv50_ir_lowering_gv100.cpp',
- 'codegen/nv50_ir_lowering_gv100.h',
- 'codegen/nv50_ir_lowering_gm107.cpp',
- 'codegen/nv50_ir_lowering_gm107.h',
- 'codegen/nv50_ir_lowering_nvc0.cpp',
- 'codegen/nv50_ir_lowering_nvc0.h',
- 'codegen/nv50_ir_target_gv100.cpp',
- 'codegen/nv50_ir_target_gv100.h',
- 'codegen/nv50_ir_target_gm107.cpp',
- 'codegen/nv50_ir_target_gm107.h',
- 'codegen/nv50_ir_target_nvc0.cpp',
- 'codegen/nv50_ir_target_nvc0.h',
'nvc0/cla0c0qmd.h',
'nvc0/clc0c0qmd.h',
'nvc0/clc3c0qmd.h',
inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_mapi, inc_mesa,
],
gnu_symbol_visibility : 'hidden',
- dependencies : [dep_libdrm, dep_libdrm_nouveau, idep_mesautil, idep_nir_headers],
+ dependencies : [dep_libdrm, idep_nouveau_codegen, dep_libdrm_nouveau, idep_mesautil, idep_nir_headers],
)
nouveau_compiler = executable(
'nouveau_compiler',
'nouveau_compiler.c',
+ dependencies : [dep_libdrm, dep_libdrm_nouveau, idep_mesautil, idep_nir, idep_nouveau_codegen],
include_directories : [inc_src, inc_include, inc_gallium, inc_gallium_aux],
- dependencies : [dep_libdrm, dep_libdrm_nouveau, idep_mesautil, idep_nir],
- link_with : [libnouveau, libgallium],
+ link_with : [libnouveau_codegen, libnouveau, libgallium],
build_by_default : with_tools.contains('nouveau'),
install : with_tools.contains('nouveau'),
)
driver_nouveau = declare_dependency(
compile_args : '-DGALLIUM_NOUVEAU',
- dependencies : idep_nir,
- link_with : [libnouveauwinsys, libnouveau],
+ dependencies : [idep_nir, idep_nouveau_codegen],
+ link_with : [libnouveauwinsys, libnouveau_codegen, libnouveau],
)
#include "tgsi/tgsi_text.h"
#include "util/u_debug.h"
-#include "codegen/nv50_ir_driver.h"
+#include "nv50_ir_driver.h"
#include "nv50/nv50_context.h"
/* these headers weren't really meant to be included together */
#include "nv50/nv50_context.h"
#include "nv50/nv50_compute.xml.h"
-#include "codegen/nv50_ir_driver.h"
+#include "nv50_ir_driver.h"
int
nv50_screen_compute_setup(struct nv50_screen *screen,
#include "nv50/nv50_context.h"
#include "nv50/nv50_program.h"
-#include "codegen/nv50_ir_driver.h"
+#include "nv50_ir_driver.h"
static inline unsigned
bitcount4(const uint32_t val)
#include "util/u_screen.h"
#include "pipe/p_screen.h"
-#include "codegen/nv50_ir_driver.h"
+#include "nv50_ir_driver.h"
#include "nv50/nv50_context.h"
#include "nv50/nv50_screen.h"
#include "nvc0/nvc0_context.h"
-#include "codegen/nv50_ir_driver.h"
+#include "nv50_ir_driver.h"
#include "nvc0/nve4_compute.h"
/* NOTE: Using a[0x270] in FP may cause an error even if we're using less than
#include "nouveau_vp3_video.h"
-#include "codegen/nv50_ir_driver.h"
+#include "nv50_ir_driver.h"
#include "nvc0/nvc0_context.h"
#include "nvc0/nvc0_screen.h"
#include "nvc0/nvc0_context.h"
#include "nvc0/nve4_compute.h"
-#include "codegen/nv50_ir_driver.h"
+#include "nv50_ir_driver.h"
#include "drf.h"
#include "qmd.h"