Commit 5eb7ff11 authored by Johannes Obermayr's avatar Johannes Obermayr Committed by Christoph Bumiller
Browse files

Move nv30, nv50 and nvc0 to nouveau.



It is planned to ship openSUSE 13.1 with -shared libs.
nouveau.la, nv30.la, nv50.la and nvc0.la are currently LIBADDs in all nouveau
related targets.
This change makes it possible to easily build one shared libnouveau.so which is
then LIBADDed.
Also dlopen will be faster for one library instead of three and build time on
-jX will be reduced.

Whitespace fixes were requested by 'git am'.
Signed-off-by: default avatarJohannes Obermayr <johannesobermayr@gmx.de>
Acked-by: default avatarChristoph Bumiller <christoph.bumiller@speed.at>
Acked-by: default avatarIan Romanick <ian.d.romanick@intel.com>
parent ebcdaa7b
......@@ -1796,7 +1796,7 @@ if test "x$with_gallium_drivers" != x; then
HAVE_GALLIUM_NOUVEAU=yes
PKG_CHECK_MODULES([NOUVEAU], [libdrm_nouveau >= $LIBDRM_NOUVEAU_REQUIRED])
gallium_require_drm_loader
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nouveau nv30 nv50 nvc0"
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nouveau"
gallium_check_st "nouveau/drm" "dri-nouveau" "xorg-nouveau" "" "xvmc-nouveau" "vdpau-nouveau"
;;
xfreedreno)
......@@ -1996,9 +1996,6 @@ AC_CONFIG_FILES([Makefile
src/gallium/drivers/ilo/Makefile
src/gallium/drivers/llvmpipe/Makefile
src/gallium/drivers/nouveau/Makefile
src/gallium/drivers/nv30/Makefile
src/gallium/drivers/nv50/Makefile
src/gallium/drivers/nvc0/Makefile
src/gallium/drivers/r300/Makefile
src/gallium/drivers/r600/Makefile
src/gallium/drivers/radeon/Makefile
......
......@@ -48,10 +48,7 @@ endif
ifneq ($(filter nouveau, $(MESA_GPU_DRIVERS)),)
SUBDIRS += \
winsys/nouveau/drm \
drivers/nouveau \
drivers/nvfx \
drivers/nv50 \
drivers/nvc0
drivers/nouveau
endif
# r300g/r600g/radeonsi
......
......@@ -86,7 +86,7 @@ endif
if HAVE_GALLIUM_NOUVEAU
SUBDIRS += nouveau nv30 nv50 nvc0
SUBDIRS += nouveau
endif
......
......@@ -28,7 +28,13 @@ include $(LOCAL_PATH)/Makefile.sources
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(C_SOURCES)
LOCAL_SRC_FILES := $(C_SOURCES) \
$(NV30_C_SOURCES) \
$(NV50_CODEGEN_SOURCES) \
$(NV50_C_SOURES) \
$(NVC0_CODEGEN_SOURCES) \
$(NVC0_C_SOURCES)
LOCAL_C_INCLUDES := $(DRM_TOP) \
$(DRM_TOP)/include/drm \
$(DRM_TOP)/nouveau
......
......@@ -27,9 +27,15 @@ noinst_LTLIBRARIES = libnouveau.la
AM_CPPFLAGS = \
-I$(top_srcdir)/src/gallium/drivers/nouveau/include \
-I$(top_srcdir)/src/gallium/drivers \
-I$(top_srcdir)/include \
$(GALLIUM_CFLAGS) \
$(LIBDRM_CFLAGS)
$(LIBDRM_CFLAGS) \
$(NOUVEAU_CFLAGS) \
$(VISIBILITY_CFLAGS)
libnouveau_la_SOURCES = $(C_SOURCES)
libnouveau_la_SOURCES = \
$(C_SOURCES) \
$(NV30_C_SOURCES) \
$(NV50_CODEGEN_SOURCES) \
$(NV50_C_SOURCES) \
$(NVC0_CODEGEN_SOURCES) \
$(NVC0_C_SOURCES)
......@@ -8,3 +8,94 @@ C_SOURCES := \
nouveau_vp3_video.c \
nouveau_vp3_video_bsp.c \
nouveau_vp3_video_vp.c
NV30_C_SOURCES := \
nv30/nv30_screen.c \
nv30/nv30_context.c \
nv30/nv30_format.c \
nv30/nv30_resource.c \
nv30/nv30_transfer.c \
nv30/nv30_miptree.c \
nv30/nv30_state.c \
nv30/nv30_state_validate.c \
nv30/nv30_texture.c \
nv30/nv30_fragtex.c \
nv30/nv40_verttex.c \
nv30/nv30_fragprog.c \
nv30/nv30_vertprog.c \
nv30/nv30_clear.c \
nv30/nv30_vbo.c \
nv30/nv30_push.c \
nv30/nv30_draw.c \
nv30/nv30_query.c \
nv30/nvfx_vertprog.c \
nv30/nvfx_fragprog.c
NV50_C_SOURCES := \
nv50/nv50_context.c \
nv50/nv50_formats.c \
nv50/nv50_miptree.c \
nv50/nv50_resource.c \
nv50/nv50_screen.c \
nv50/nv50_state.c \
nv50/nv50_state_validate.c \
nv50/nv50_surface.c \
nv50/nv50_tex.c \
nv50/nv50_transfer.c \
nv50/nv50_vbo.c \
nv50/nv50_program.c \
nv50/nv50_shader_state.c \
nv50/nv50_push.c \
nv50/nv50_query.c \
nv50/nv84_video.c \
nv50/nv84_video_bsp.c \
nv50/nv84_video_vp.c \
nv50/nv98_video.c \
nv50/nv98_video_bsp.c \
nv50/nv98_video_vp.c \
nv50/nv98_video_ppp.c
NV50_CODEGEN_SOURCES := \
codegen/nv50_ir.cpp \
codegen/nv50_ir_bb.cpp \
codegen/nv50_ir_build_util.cpp \
codegen/nv50_ir_emit_nv50.cpp \
codegen/nv50_ir_from_tgsi.cpp \
codegen/nv50_ir_graph.cpp \
codegen/nv50_ir_lowering_nv50.cpp \
codegen/nv50_ir_peephole.cpp \
codegen/nv50_ir_print.cpp \
codegen/nv50_ir_ra.cpp \
codegen/nv50_ir_ssa.cpp \
codegen/nv50_ir_target.cpp \
codegen/nv50_ir_target_nv50.cpp \
codegen/nv50_ir_util.cpp
NVC0_CODEGEN_SOURCES := \
codegen/nv50_ir_emit_gk110.cpp \
codegen/nv50_ir_emit_nvc0.cpp \
codegen/nv50_ir_lowering_nvc0.cpp \
codegen/nv50_ir_target_nvc0.cpp
NVC0_C_SOURCES := \
nvc0/nvc0_compute.c \
nvc0/nvc0_context.c \
nvc0/nvc0_formats.c \
nvc0/nvc0_miptree.c \
nvc0/nvc0_resource.c \
nvc0/nvc0_screen.c \
nvc0/nvc0_state.c \
nvc0/nvc0_state_validate.c \
nvc0/nvc0_surface.c \
nvc0/nvc0_tex.c \
nvc0/nvc0_transfer.c \
nvc0/nvc0_vbo.c \
nvc0/nvc0_vbo_translate.c \
nvc0/nvc0_program.c \
nvc0/nvc0_shader_state.c \
nvc0/nvc0_query.c \
nvc0/nve4_compute.c \
nvc0/nvc0_video.c \
nvc0/nvc0_video_bsp.c \
nvc0/nvc0_video_vp.c \
nvc0/nvc0_video_ppp.c
......@@ -20,9 +20,9 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
#include "nv50_ir.h"
#include "nv50_ir_target.h"
#include "nv50_ir_driver.h"
#include "codegen/nv50_ir.h"
#include "codegen/nv50_ir_target.h"
#include "codegen/nv50_ir_driver.h"
extern "C" {
#include "nv50/nv50_program.h"
......@@ -1131,7 +1131,7 @@ nv50_ir_init_prog_info(struct nv50_ir_prog_info *info)
info->io.sampleMask = 0xff;
info->io.backFaceColor[0] = info->io.backFaceColor[1] = 0xff;
}
int
nv50_ir_generate_code(struct nv50_ir_prog_info *info)
{
......
......@@ -30,10 +30,10 @@
#include <list>
#include <vector>
#include "nv50_ir_util.h"
#include "nv50_ir_graph.h"
#include "codegen/nv50_ir_util.h"
#include "codegen/nv50_ir_graph.h"
#include "nv50_ir_driver.h"
#include "codegen/nv50_ir_driver.h"
namespace nv50_ir {
......@@ -1190,7 +1190,7 @@ protected:
// =============================================================================
#include "nv50_ir_inlines.h"
#include "codegen/nv50_ir_inlines.h"
} // namespace nv50_ir
......
......@@ -20,7 +20,7 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
#include "nv50_ir.h"
#include "codegen/nv50_ir.h"
namespace nv50_ir {
......
......@@ -20,8 +20,8 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
#include "nv50_ir.h"
#include "nv50_ir_build_util.h"
#include "codegen/nv50_ir.h"
#include "codegen/nv50_ir_build_util.h"
namespace nv50_ir {
......
......@@ -20,7 +20,7 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
#include "nv50_ir_target_nvc0.h"
#include "codegen/nv50_ir_target_nvc0.h"
// CodeEmitter for GK110 encoding of the Fermi/Kepler ISA.
......
......@@ -20,8 +20,8 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
#include "nv50_ir.h"
#include "nv50_ir_target_nv50.h"
#include "codegen/nv50_ir.h"
#include "codegen/nv50_ir_target_nv50.h"
namespace nv50_ir {
......
......@@ -20,7 +20,7 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
#include "nv50_ir_target_nvc0.h"
#include "codegen/nv50_ir_target_nvc0.h"
namespace nv50_ir {
......
......@@ -28,9 +28,9 @@ extern "C" {
#include <set>
#include "nv50_ir.h"
#include "nv50_ir_util.h"
#include "nv50_ir_build_util.h"
#include "codegen/nv50_ir.h"
#include "codegen/nv50_ir_util.h"
#include "codegen/nv50_ir_build_util.h"
namespace tgsi {
......@@ -382,7 +382,7 @@ static nv50_ir::TexTarget translateTexture(uint tex)
return nv50_ir::TEX_TARGET_2D;
}
}
nv50_ir::DataType Instruction::inferSrcType() const
{
switch (getOpcode()) {
......@@ -490,7 +490,7 @@ nv50_ir::CondCode Instruction::getSetCond() const
}
#define NV50_IR_OPCODE_CASE(a, b) case TGSI_OPCODE_##a: return nv50_ir::OP_##b
static nv50_ir::operation translateOpcode(uint opcode)
{
switch (opcode) {
......@@ -2151,7 +2151,7 @@ Converter::handleInstruction(const struct tgsi_full_instruction *insn)
src1 = fetchSrc(1, c);
src2 = fetchSrc(2, c);
mkOp3(op, dstTy, dst0[c], src0, src1, src2);
}
}
break;
case TGSI_OPCODE_MOV:
case TGSI_OPCODE_ABS:
......
......@@ -20,11 +20,11 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
#include "nv50_ir_graph.h"
#include "codegen/nv50_ir_graph.h"
#include <limits>
#include <list>
#include <stack>
#include "nv50_ir.h"
#include "codegen/nv50_ir.h"
namespace nv50_ir {
......
......@@ -23,7 +23,7 @@
#ifndef __NV50_IR_GRAPH_H__
#define __NV50_IR_GRAPH_H__
#include "nv50_ir_util.h"
#include "codegen/nv50_ir_util.h"
#include <vector>
namespace nv50_ir {
......
......@@ -20,10 +20,10 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
#include "nv50/codegen/nv50_ir.h"
#include "nv50/codegen/nv50_ir_build_util.h"
#include "codegen/nv50_ir.h"
#include "codegen/nv50_ir_build_util.h"
#include "nv50_ir_target_nv50.h"
#include "codegen/nv50_ir_target_nv50.h"
namespace nv50_ir {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment