From 14f79d46a56797924550dfdb3846c8c589637319 Mon Sep 17 00:00:00 2001 From: Jerome Glisse Date: Thu, 18 Dec 2008 13:36:07 +0100 Subject: gallium autoconf/automake --- configs/autoconf.in | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'configs') diff --git a/configs/autoconf.in b/configs/autoconf.in index 4a89716ab6..a8970f7d65 100644 --- a/configs/autoconf.in +++ b/configs/autoconf.in @@ -55,11 +55,17 @@ LIB_DIR = @LIB_DIR@ SRC_DIRS = @SRC_DIRS@ GLU_DIRS = @GLU_DIRS@ DRIVER_DIRS = @DRIVER_DIRS@ +GALLIUM_AUXILIARY_DIRS = @GALLIUM_AUXILIARY_DIRS@ +GALLIUM_DRIVER_DIRS = @GALLIUM_DRIVER_DIRS@ +GALLIUM_WINSYS_DIRS = @GALLIUM_WINSYS_DIRS@ +GALLIUM_AUXILIARIES = $(foreach DIR,$(GALLIUM_AUXILIARY_DIRS),$(TOP)/src/gallium/auxiliary/$(DIR)/lib$(DIR).a) +GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVER_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a) + # Which subdirs under $(TOP)/progs/ to enter: PROGRAM_DIRS = @PROGRAM_DIRS@ # Driver specific build vars -DRI_DIRS = @DRI_DIRS@ +#DRI_DIRS = @DRI_DIRS@ WINDOW_SYSTEM = @WINDOW_SYSTEM@ USING_EGL = @USING_EGL@ -- cgit v1.2.3 From fbeeb6675733f5b2da36d40b0142dadf8cc953b4 Mon Sep 17 00:00:00 2001 From: Corbin Simpson Date: Mon, 12 Jan 2009 01:40:50 -0800 Subject: r300, amd: Make everything build. (Not necessarily work, mind you.) Lots of structural work, especially in getting the two parts to talk nicely. Todo: - Get damn blitter working. - Add CS flush. - Reverse order of above two items. --- configs/default | 2 +- src/gallium/drivers/r300/r300_blit.c | 2 +- src/gallium/drivers/r300/r300_context.c | 6 +-- src/gallium/drivers/r300/r300_context.h | 13 ++--- src/gallium/drivers/r300/r300_cs.h | 30 ++++++----- src/gallium/drivers/r300/r300_screen.c | 4 +- src/gallium/drivers/r300/r300_winsys.h | 87 ++++++++++++++++++++++++++++++++ src/gallium/winsys/drm/amd/Makefile | 6 ++- src/gallium/winsys/drm/amd/amd_context.c | 8 ++- src/gallium/winsys/drm/amd/amd_context.h | 2 + src/gallium/winsys/drm/amd/amd_r300.c | 55 ++++++++++++++++++++ src/gallium/winsys/drm/amd/amd_r300.h | 29 +++++++++++ 12 files changed, 208 insertions(+), 36 deletions(-) create mode 100644 src/gallium/drivers/r300/r300_winsys.h create mode 100644 src/gallium/winsys/drm/amd/amd_r300.c create mode 100644 src/gallium/winsys/drm/amd/amd_r300.h (limited to 'configs') diff --git a/configs/default b/configs/default index 40f3a2a02d..333f0fe985 100644 --- a/configs/default +++ b/configs/default @@ -91,7 +91,7 @@ EGL_DRIVERS_DIRS = demo # Gallium directories and GALLIUM_AUXILIARY_DIRS = draw translate cso_cache pipebuffer tgsi sct rtasm util GALLIUM_AUXILIARIES = $(foreach DIR,$(GALLIUM_AUXILIARY_DIRS),$(TOP)/src/gallium/auxiliary/$(DIR)/lib$(DIR).a) -GALLIUM_DRIVER_DIRS = softpipe i915simple i965simple nv04 nv10 nv20 nv30 nv40 nv50 failover trace +GALLIUM_DRIVER_DIRS = softpipe i915simple i965simple nv04 nv10 nv20 nv30 nv40 nv50 failover r300 GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVER_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a) GALLIUM_WINSYS_DIRS = xlib egl_xlib diff --git a/src/gallium/drivers/r300/r300_blit.c b/src/gallium/drivers/r300/r300_blit.c index c404a667b1..b8ddf6677f 100644 --- a/src/gallium/drivers/r300/r300_blit.c +++ b/src/gallium/drivers/r300/r300_blit.c @@ -79,7 +79,7 @@ int r300_fill_blit(struct r300_context* r300, OUT_CS_REG(RADEON_DP_CNTL, RADEON_DST_X_LEFT_TO_RIGHT | RADEON_DST_Y_TOP_TO_BOTTOM); OUT_CS_REG(RADEON_DST_PITCH_OFFSET, 0x0); - /* XXX fix this shit -> OUT_RELOC(dst, 0, RADEON_GEM_DOMAIN_VRAM) */ + OUT_CS_RELOC(dst_buffer, 0, 0, RADEON_GEM_DOMAIN_VRAM, 0); /* Do the actual paint. */ OUT_CS_REG(RADEON_DST_Y_X, (y << 16) | x); diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c index 4050faa74a..b9a9c2e21c 100644 --- a/src/gallium/drivers/r300/r300_context.c +++ b/src/gallium/drivers/r300/r300_context.c @@ -32,16 +32,16 @@ static void r300_destroy_context(struct pipe_context* context) { struct pipe_context* r300_create_context(struct pipe_screen* screen, struct pipe_winsys* winsys, - struct amd_winsys* amd_winsys) + struct r300_winsys* r300_winsys) { struct r300_context* r300 = CALLOC_STRUCT(r300_context); if (!r300) return NULL; - r300->winsys = amd_winsys; + r300->winsys = r300_winsys; r300->context.winsys = winsys; - r300->context.screen = screen; + r300->context.screen = r300_create_screen(winsys, 0x0); r300->context.destroy = r300_destroy_context; diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h index 8393198200..119d46af58 100644 --- a/src/gallium/drivers/r300/r300_context.h +++ b/src/gallium/drivers/r300/r300_context.h @@ -31,15 +31,10 @@ struct r300_context { /* Parent class */ struct pipe_context context; - struct amd_winsys* winsys; + /* The interface to the windowing system, etc. */ + struct r300_winsys* winsys; + /* Draw module. Used mostly for SW TCL. */ struct draw_context* draw; - - /* CS object. This is very much like Intel's batchbuffer. - * Fill it full of dwords and relocs and then submit. - * Repeat as needed. */ - /* Note: Unlike Mesa's version of this, we don't keep a copy of the CSM - * that was used to create this CS. Is this a good idea? */ - struct radeon_cs* cs; }; /* Convenience cast wrapper. */ @@ -52,6 +47,6 @@ void r300_init_surface_functions(struct r300_context* r300); struct pipe_context* r300_create_context(struct pipe_screen* screen, struct pipe_winsys* winsys, - struct amd_winsys* amd_winsys); + struct r300_winsys* r300_winsys); #endif /* R300_CONTEXT_H */ \ No newline at end of file diff --git a/src/gallium/drivers/r300/r300_cs.h b/src/gallium/drivers/r300/r300_cs.h index ebd5324119..1422842e0c 100644 --- a/src/gallium/drivers/r300/r300_cs.h +++ b/src/gallium/drivers/r300/r300_cs.h @@ -23,48 +23,50 @@ #ifndef R300_CS_H #define R300_CS_H -#include "radeon_cs.h" #include "radeon_reg.h" +#include "r300_winsys.h" + /* Yes, I know macros are ugly. However, they are much prettier than the code * that they neatly hide away, and don't have the cost of function setup,so * we're going to use them. */ #define MAX_CS_SIZE 64 * 1024 / 4 +/* XXX stolen from radeon_drm.h */ +#define RADEON_GEM_DOMAIN_CPU 0x1 +#define RADEON_GEM_DOMAIN_GTT 0x2 +#define RADEON_GEM_DOMAIN_VRAM 0x4 + #define CP_PACKET0(register, count) \ (RADEON_CP_PACKET0 | ((count) << 16) | ((register) >> 2)) #define CS_LOCALS(context) \ - struct radeon_cs* cs = context->cs + struct r300_winsys* cs_winsys = context->winsys; \ + struct radeon_cs* cs = cs_winsys->cs -#define CHECK_CS(size) do { \ - if ((cs->cdw + (size) + 128) > MAX_CS_SIZE || radeon_cs_need_flush(cs)) { \ - /* XXX flush the CS */ \ - } } while (0) +#define CHECK_CS(size) \ + cs_winsys->check_cs(cs, (size)) -/* XXX radeon_cs_begin is currently unimplemented on the backend, but let's - * be future-proof, yeah? */ #define BEGIN_CS(size) do { \ CHECK_CS(size); \ - radeon_cs_begin(cs, (size), __FILE__, __FUNCTION__, __LINE__); \ + cs_winsys->begin_cs(cs, (size), __FILE__, __FUNCTION__, __LINE__); \ } while (0) #define OUT_CS(value) \ - radeon_cs_write_dword(cs, value) + cs_winsys->write_cs_dword(cs, value) #define OUT_CS_REG(register, value) do { \ OUT_CS(CP_PACKET0(register, 0)); \ OUT_CS(value); } while (0) #define OUT_CS_RELOC(bo, offset, rd, wd, flags) do { \ - radeon_cs_write_dword(cs, offset); \ - radeon_cs_write_reloc(cs, bo, rd, wd, flags); \ + OUT_CS(offset); \ + cs_winsys->write_cs_reloc(cs, bo, rd, wd, flags); \ } while (0) -/* XXX more future-proofing */ #define END_CS \ - radeon_cs_end(cs, __FILE__, __FUNCTION__, __LINE__) + cs_winsys->end_cs(cs, __FILE__, __FUNCTION__, __LINE__) #endif /* R300_CS_H */ \ No newline at end of file diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c index 37a74b3c0a..dacde27888 100644 --- a/src/gallium/drivers/r300/r300_screen.c +++ b/src/gallium/drivers/r300/r300_screen.c @@ -144,13 +144,13 @@ struct pipe_screen* r300_create_screen(struct pipe_winsys* winsys, uint pci_id) if (!r300screen) return NULL; - /* XXX break this into its own function? */ + /* XXX break this into its own function? switch (pci_id) { default: debug_printf("%s: unknown PCI ID 0x%x, cannot create screen!\n", __FUNCTION__, pci_id); return NULL; - } + } */ r300screen->pci_id = pci_id; r300screen->screen.winsys = winsys; diff --git a/src/gallium/drivers/r300/r300_winsys.h b/src/gallium/drivers/r300/r300_winsys.h new file mode 100644 index 0000000000..7048a9c88d --- /dev/null +++ b/src/gallium/drivers/r300/r300_winsys.h @@ -0,0 +1,87 @@ +/* + * Copyright 2008 Corbin Simpson + * + * 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 + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, 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 NON-INFRINGEMENT. IN NO EVENT SHALL + * THE AUTHOR(S) AND/OR THEIR SUPPLIERS 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 R300_WINSYS_H +#define R300_WINSYS_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* The public interface header for the r300 pipe driver. + * Any winsys hosting this pipe needs to implement r300_winsys and then + * call r300_create_context to start things. */ + +#include "pipe/p_defines.h" +#include "pipe/p_state.h" + +struct radeon_cs; + +struct r300_winsys { + + /* CS object. This is very much like Intel's batchbuffer. + * Fill it full of dwords and relocs and then submit. + * Repeat as needed. */ + /* Note: Unlike Mesa's version of this, we don't keep a copy of the CSM + * that was used to create this CS. Is this a good idea? */ + /* Note: The pipe driver doesn't know how to use this. This is purely + * for the winsys. */ + struct radeon_cs* cs; + + /* Check to see if there's room for commands. */ + boolean (*check_cs)(struct radeon_cs* cs, int size); + + /* Start a command emit. */ + void (*begin_cs)(struct radeon_cs* cs, + int size, + const char* file, + const char* function, + int line); + + /* Write a dword to the command buffer. */ + /* XXX is this an okay name for this handle? */ + void (*write_cs_dword)(struct radeon_cs* cs, uint32_t dword); + + /* Write a relocated dword to the command buffer. */ + void (*write_cs_reloc)(struct radeon_cs* cs, + struct pipe_buffer* bo, + uint32_t rd, + uint32_t wd, + uint32_t flags); + + /* Finish a command emit. */ + void (*end_cs)(struct radeon_cs* cs, + const char* file, + const char* function, + int line); + +}; + +struct pipe_context* r300_create_context(struct pipe_screen* screen, + struct pipe_winsys* winsys, + struct r300_winsys* r300_winsys); + +#ifdef __cplusplus +} +#endif + +#endif /* R300_WINSYS_H */ \ No newline at end of file diff --git a/src/gallium/winsys/drm/amd/Makefile b/src/gallium/winsys/drm/amd/Makefile index 0f23e3446c..fb77873404 100644 --- a/src/gallium/winsys/drm/amd/Makefile +++ b/src/gallium/winsys/drm/amd/Makefile @@ -7,11 +7,13 @@ LIBNAME = amd_dri.so MINIGLX_SOURCES = PIPE_DRIVERS = \ - $(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a + $(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a \ + $(TOP)/src/gallium/drivers/r300/libr300.a DRIVER_SOURCES = \ amd_buffer.c \ amd_context.c \ + amd_r300.c \ amd_screen.c \ amd_winsys_softpipe.c @@ -21,6 +23,8 @@ C_SOURCES = \ ASM_SOURCES = +DRIVER_DEFINES = -I../../../drivers/r300 + include ../Makefile.template DRI_LIB_DEPS += -ldrm_radeon diff --git a/src/gallium/winsys/drm/amd/amd_context.c b/src/gallium/winsys/drm/amd/amd_context.c index 632caec6a7..7784964867 100644 --- a/src/gallium/winsys/drm/amd/amd_context.c +++ b/src/gallium/winsys/drm/amd/amd_context.c @@ -243,12 +243,10 @@ GLboolean amd_context_create(const __GLcontextModes *visual, } if (GL_TRUE) { - /* XXX second arg should be PCI ID, but damned if I know why */ - amd_context->pipe_screen = r300_create_screen(amd_context->pipe_winsys, - 0x0); - pipe = r300_create_context(amd_context->pipe_screen, + fprintf(stderr, "Creating r300 context..."); + pipe = r300_create_context(NULL, amd_context->pipe_winsys, - (struct amd_pipe_winsys*)amd_context->pipe_winsys); + amd_create_r300_winsys(amd_context->drm_fd)); } else { pipe = amd_create_softpipe(amd_context); } diff --git a/src/gallium/winsys/drm/amd/amd_context.h b/src/gallium/winsys/drm/amd/amd_context.h index 54a831f15a..12557c40c4 100644 --- a/src/gallium/winsys/drm/amd/amd_context.h +++ b/src/gallium/winsys/drm/amd/amd_context.h @@ -35,6 +35,8 @@ #include "state_tracker/st_context.h" #include "amd_screen.h" +#include "amd_r300.h" + struct amd_framebuffer { struct st_framebuffer *st_framebuffer; unsigned attachments; diff --git a/src/gallium/winsys/drm/amd/amd_r300.c b/src/gallium/winsys/drm/amd/amd_r300.c new file mode 100644 index 0000000000..0bc0a842c1 --- /dev/null +++ b/src/gallium/winsys/drm/amd/amd_r300.c @@ -0,0 +1,55 @@ +/* + * Copyright 2008 Corbin Simpson + * + * 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 + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, 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 NON-INFRINGEMENT. IN NO EVENT SHALL + * THE AUTHOR(S) AND/OR THEIR SUPPLIERS 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. */ + +#include "amd_r300.h" + +static boolean amd_r300_check_cs(struct radeon_cs* cs, int size) +{ + /* XXX check size here, lazy ass! */ + return TRUE; +} + +static void amd_r300_write_cs_reloc(struct radeon_cs* cs, + struct pipe_buffer* pbuffer, + uint32_t rd, + uint32_t wd, + uint32_t flags) +{ + radeon_cs_write_reloc(cs, ((struct amd_pipe_buffer*)pbuffer)->bo, rd, wd, flags); +} + +struct r300_winsys* amd_create_r300_winsys(int fd) +{ + struct r300_winsys* winsys = calloc(1, sizeof(struct r300_winsys)); + + struct radeon_cs_manager* csm = radeon_cs_manager_gem_ctor(fd); + + winsys->cs = radeon_cs_create(csm, 1024 * 64 / 4); + + winsys->check_cs = amd_r300_check_cs; + winsys->begin_cs = radeon_cs_begin; + winsys->write_cs_dword = radeon_cs_write_dword; + winsys->write_cs_reloc = amd_r300_write_cs_reloc; + winsys->end_cs = radeon_cs_end; + + return winsys; +} \ No newline at end of file diff --git a/src/gallium/winsys/drm/amd/amd_r300.h b/src/gallium/winsys/drm/amd/amd_r300.h new file mode 100644 index 0000000000..ef269454b3 --- /dev/null +++ b/src/gallium/winsys/drm/amd/amd_r300.h @@ -0,0 +1,29 @@ +/* + * Copyright 2008 Corbin Simpson + * + * 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 + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, 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 NON-INFRINGEMENT. IN NO EVENT SHALL + * THE AUTHOR(S) AND/OR THEIR SUPPLIERS 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. */ + +#include "radeon_cs.h" + +#include "r300_winsys.h" + +#include "amd_buffer.h" + +struct r300_winsys* amd_create_r300_winsys(int fd); -- cgit v1.2.3 From 3120894c6d33a26cda642246344e8945db200ac2 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Thu, 5 Feb 2009 14:44:17 +0000 Subject: gallium: add new aux lib for index list translations Could this be the ultimate index list translating utility? Maybe, but it doesn't yet include support for splitting primitives. Unlike previous attempts, this captures all possible combinations of API and hardware provoking vertex, supports generated list reuse and various other tricks. Relies on python-generated code. --- configs/default | 2 +- src/gallium/SConscript | 1 + src/gallium/auxiliary/indices/Makefile | 16 + src/gallium/auxiliary/indices/SConscript | 17 + src/gallium/auxiliary/indices/u_indices.c | 253 ++ src/gallium/auxiliary/indices/u_indices.h | 83 + src/gallium/auxiliary/indices/u_indices_gen.c | 5129 ++++++++++++++++++++++++ src/gallium/auxiliary/indices/u_indices_gen.py | 318 ++ src/gallium/auxiliary/indices/u_indices_priv.h | 43 + 9 files changed, 5861 insertions(+), 1 deletion(-) create mode 100644 src/gallium/auxiliary/indices/Makefile create mode 100644 src/gallium/auxiliary/indices/SConscript create mode 100644 src/gallium/auxiliary/indices/u_indices.c create mode 100644 src/gallium/auxiliary/indices/u_indices.h create mode 100644 src/gallium/auxiliary/indices/u_indices_gen.c create mode 100644 src/gallium/auxiliary/indices/u_indices_gen.py create mode 100644 src/gallium/auxiliary/indices/u_indices_priv.h (limited to 'configs') diff --git a/configs/default b/configs/default index 40f3a2a02d..13bda58f18 100644 --- a/configs/default +++ b/configs/default @@ -89,7 +89,7 @@ PROGRAM_DIRS = demos redbook samples glsl xdemos EGL_DRIVERS_DIRS = demo # Gallium directories and -GALLIUM_AUXILIARY_DIRS = draw translate cso_cache pipebuffer tgsi sct rtasm util +GALLIUM_AUXILIARY_DIRS = draw translate cso_cache pipebuffer tgsi sct rtasm util indices GALLIUM_AUXILIARIES = $(foreach DIR,$(GALLIUM_AUXILIARY_DIRS),$(TOP)/src/gallium/auxiliary/$(DIR)/lib$(DIR).a) GALLIUM_DRIVER_DIRS = softpipe i915simple i965simple nv04 nv10 nv20 nv30 nv40 nv50 failover trace GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVER_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a) diff --git a/src/gallium/SConscript b/src/gallium/SConscript index 85baf51a7f..0c632ac2b8 100644 --- a/src/gallium/SConscript +++ b/src/gallium/SConscript @@ -21,6 +21,7 @@ SConscript([ 'auxiliary/translate/SConscript', 'auxiliary/draw/SConscript', 'auxiliary/pipebuffer/SConscript', + 'auxiliary/indices/SConscript', ]) for driver in env['drivers']: diff --git a/src/gallium/auxiliary/indices/Makefile b/src/gallium/auxiliary/indices/Makefile new file mode 100644 index 0000000000..8fa61d265e --- /dev/null +++ b/src/gallium/auxiliary/indices/Makefile @@ -0,0 +1,16 @@ +TOP = ../../../.. +include $(TOP)/configs/current + +LIBNAME = indices + +C_SOURCES = \ + u_indices_gen.c + +include ../../Makefile.template + +u_indices_gen.c: u_indices_gen.py + python $< > $@ + + +symlinks: + diff --git a/src/gallium/auxiliary/indices/SConscript b/src/gallium/auxiliary/indices/SConscript new file mode 100644 index 0000000000..65a43a9f64 --- /dev/null +++ b/src/gallium/auxiliary/indices/SConscript @@ -0,0 +1,17 @@ +Import('*') + +env.CodeGenerate( + target = 'u_indices_gen.c', + script = 'u_indices_gen.py', + source = [], + command = 'python $SCRIPT > $TARGET' +) + +indices = env.ConvenienceLibrary( + target = 'indices', + source = [ +# 'u_indices.c', + 'u_indices_gen.c', + ]) + +auxiliaries.insert(0, indices) diff --git a/src/gallium/auxiliary/indices/u_indices.c b/src/gallium/auxiliary/indices/u_indices.c new file mode 100644 index 0000000000..0cf7d88653 --- /dev/null +++ b/src/gallium/auxiliary/indices/u_indices.c @@ -0,0 +1,253 @@ +/* + * Copyright 2009 VMware, Inc. + * All Rights Reserved. + * + * 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 + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, 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 NON-INFRINGEMENT. IN NO EVENT SHALL + * VMWARE AND/OR THEIR SUPPLIERS 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. + */ + +#include "u_indices.h" +#include "u_indices_priv.h" + +static void translate_memcpy_ushort( const void *in, + unsigned nr, + void *out ) +{ + memcpy(out, in, nr*sizeof(short)); +} + +static void translate_memcpy_uint( const void *in, + unsigned nr, + void *out ) +{ + memcpy(out, in, nr*sizeof(int)); +} + + +int u_index_translator( unsigned hw_mask, + unsigned prim, + unsigned in_index_size, + unsigned nr, + unsigned in_pv, + unsigned out_pv, + unsigned *out_prim, + unsigned *out_index_size, + unsigned *out_nr, + u_translate_func *out_translate ) +{ + unsigned in_idx; + unsigned out_idx; + int ret = U_TRANSLATE_NORMAL; + + u_index_init(); + + in_idx = in_size_idx(in_index_size); + *out_index_size = (in_index_size == 4) ? 4 : 2; + out_idx = out_size_idx(*out_index_size); + + if ((hw_mask & (1< 0xfffe) ? 4 : 2; + out_idx = out_size_idx(*out_index_size); + + if ((hw_mask & (1< Date: Fri, 6 Feb 2009 13:27:51 -0800 Subject: Remove r300 from default build. --- configs/default | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configs') diff --git a/configs/default b/configs/default index 333f0fe985..659b1989d2 100644 --- a/configs/default +++ b/configs/default @@ -91,7 +91,7 @@ EGL_DRIVERS_DIRS = demo # Gallium directories and GALLIUM_AUXILIARY_DIRS = draw translate cso_cache pipebuffer tgsi sct rtasm util GALLIUM_AUXILIARIES = $(foreach DIR,$(GALLIUM_AUXILIARY_DIRS),$(TOP)/src/gallium/auxiliary/$(DIR)/lib$(DIR).a) -GALLIUM_DRIVER_DIRS = softpipe i915simple i965simple nv04 nv10 nv20 nv30 nv40 nv50 failover r300 +GALLIUM_DRIVER_DIRS = softpipe i915simple i965simple nv04 nv10 nv20 nv30 nv40 nv50 failover GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVER_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a) GALLIUM_WINSYS_DIRS = xlib egl_xlib -- cgit v1.2.3 From 5538323005a20d6911c7e51cb5f26b242c04a57c Mon Sep 17 00:00:00 2001 From: Corbin Simpson Date: Fri, 6 Feb 2009 13:36:31 -0800 Subject: Readd trace to list of default pipe drivers. Looks like the gallium-0.2-radeon merge clobbered it. --- configs/default | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configs') diff --git a/configs/default b/configs/default index cda9a5b037..13bda58f18 100644 --- a/configs/default +++ b/configs/default @@ -91,7 +91,7 @@ EGL_DRIVERS_DIRS = demo # Gallium directories and GALLIUM_AUXILIARY_DIRS = draw translate cso_cache pipebuffer tgsi sct rtasm util indices GALLIUM_AUXILIARIES = $(foreach DIR,$(GALLIUM_AUXILIARY_DIRS),$(TOP)/src/gallium/auxiliary/$(DIR)/lib$(DIR).a) -GALLIUM_DRIVER_DIRS = softpipe i915simple i965simple nv04 nv10 nv20 nv30 nv40 nv50 failover +GALLIUM_DRIVER_DIRS = softpipe i915simple i965simple nv04 nv10 nv20 nv30 nv40 nv50 failover trace GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVER_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a) GALLIUM_WINSYS_DIRS = xlib egl_xlib -- cgit v1.2.3 From 1a46c8a062aea59de5cf55881104489db5d609e5 Mon Sep 17 00:00:00 2001 From: Siddhartha Chaudhuri Date: Mon, 9 Feb 2009 07:58:38 -0700 Subject: mesa: autoconf fixes for OS X See bug report 17566. --- configs/autoconf.in | 7 +++++++ configure.ac | 29 ++++++++++++++++++++++++----- 2 files changed, 31 insertions(+), 5 deletions(-) (limited to 'configs') diff --git a/configs/autoconf.in b/configs/autoconf.in index 4a89716ab6..fb1287a732 100644 --- a/configs/autoconf.in +++ b/configs/autoconf.in @@ -50,6 +50,13 @@ GLUT_LIB_NAME = @GLUT_LIB_NAME@ GLW_LIB_NAME = @GLW_LIB_NAME@ OSMESA_LIB_NAME = @OSMESA_LIB_NAME@ +# Globs used to install the lib and all symlinks +GL_LIB_GLOB = @GL_LIB_GLOB@ +GLU_LIB_GLOB = @GLU_LIB_GLOB@ +GLUT_LIB_GLOB = @GLUT_LIB_GLOB@ +GLW_LIB_GLOB = @GLW_LIB_GLOB@ +OSMESA_LIB_GLOB = @OSMESA_LIB_GLOB@ + # Directories to build LIB_DIR = @LIB_DIR@ SRC_DIRS = @SRC_DIRS@ diff --git a/configure.ac b/configure.ac index ba48e9d132..a916af2baa 100644 --- a/configure.ac +++ b/configure.ac @@ -231,11 +231,24 @@ if test "$enable_static" = yes; then GLW_LIB_NAME='lib$(GLW_LIB).a' OSMESA_LIB_NAME='lib$(OSMESA_LIB).a' else - GL_LIB_NAME='lib$(GL_LIB).so' - GLU_LIB_NAME='lib$(GLU_LIB).so' - GLUT_LIB_NAME='lib$(GLUT_LIB).so' - GLW_LIB_NAME='lib$(GLW_LIB).so' - OSMESA_LIB_NAME='lib$(OSMESA_LIB).so' + case "$host_os" in + darwin* ) + LIB_EXTENSION='dylib' ;; + * ) + LIB_EXTENSION='so' ;; + esac + + GL_LIB_NAME='lib$(GL_LIB).'${LIB_EXTENSION} + GLU_LIB_NAME='lib$(GLU_LIB).'${LIB_EXTENSION} + GLUT_LIB_NAME='lib$(GLUT_LIB).'${LIB_EXTENSION} + GLW_LIB_NAME='lib$(GLW_LIB).'${LIB_EXTENSION} + OSMESA_LIB_NAME='lib$(OSMESA_LIB).'${LIB_EXTENSION} + + GL_LIB_GLOB='lib$(GL_LIB).*'${LIB_EXTENSION}'*' + GLU_LIB_GLOB='lib$(GLU_LIB).*'${LIB_EXTENSION}'*' + GLUT_LIB_GLOB='lib$(GLUT_LIB).*'${LIB_EXTENSION}'*' + GLW_LIB_GLOB='lib$(GLW_LIB).*'${LIB_EXTENSION}'*' + OSMESA_LIB_GLOB='lib$(OSMESA_LIB).*'${LIB_EXTENSION}'*' fi AC_SUBST([GL_LIB_NAME]) AC_SUBST([GLU_LIB_NAME]) @@ -243,6 +256,12 @@ AC_SUBST([GLUT_LIB_NAME]) AC_SUBST([GLW_LIB_NAME]) AC_SUBST([OSMESA_LIB_NAME]) +AC_SUBST([GL_LIB_GLOB]) +AC_SUBST([GLU_LIB_GLOB]) +AC_SUBST([GLUT_LIB_GLOB]) +AC_SUBST([GLW_LIB_GLOB]) +AC_SUBST([OSMESA_LIB_GLOB]) + dnl dnl Arch/platform-specific settings dnl -- cgit v1.2.3 From abbe96cb6e7581a52652030e40442b943a482840 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 9 Feb 2009 10:17:58 -0700 Subject: mesa: added new linux-gallium and linux-gallium-debug configs Also, remove gallium-related things from configs/default. They're in linux-gallium now. So the default builds are the same as they have been for Mesa/master. --- Makefile | 2 ++ configs/default | 12 ++---------- configs/linux-gallium | 22 ++++++++++++++++++++++ configs/linux-gallium-debug | 8 ++++++++ src/mesa/Makefile | 4 ++++ src/mesa/sources.mak | 28 ++++++++++++++++++++-------- 6 files changed, 58 insertions(+), 18 deletions(-) create mode 100644 configs/linux-gallium create mode 100644 configs/linux-gallium-debug (limited to 'configs') diff --git a/Makefile b/Makefile index c79fb1cb28..24cfbe5922 100644 --- a/Makefile +++ b/Makefile @@ -115,6 +115,8 @@ linux-dri-x86-64 \ linux-dri-ppc \ linux-dri-xcb \ linux-egl \ +linux-gallium \ +linux-gallium-debug \ linux-indirect \ linux-fbdev \ linux-glide \ diff --git a/configs/default b/configs/default index 13bda58f18..ec8d51ccfe 100644 --- a/configs/default +++ b/configs/default @@ -79,24 +79,16 @@ MOTIF_CFLAGS = -I/usr/include/Motif1.2 # Directories to build LIB_DIR = lib -SRC_DIRS = mesa gallium egl gallium/winsys glu glut/glx glew glw +SRC_DIRS = mesa egl glu glut/glx glew glw GLU_DIRS = sgi -DRIVER_DIRS = +DRIVER_DIRS = x11 osmesa # Which subdirs under $(TOP)/progs/ to enter: PROGRAM_DIRS = demos redbook samples glsl xdemos # EGL directories EGL_DRIVERS_DIRS = demo -# Gallium directories and -GALLIUM_AUXILIARY_DIRS = draw translate cso_cache pipebuffer tgsi sct rtasm util indices -GALLIUM_AUXILIARIES = $(foreach DIR,$(GALLIUM_AUXILIARY_DIRS),$(TOP)/src/gallium/auxiliary/$(DIR)/lib$(DIR).a) -GALLIUM_DRIVER_DIRS = softpipe i915simple i965simple nv04 nv10 nv20 nv30 nv40 nv50 failover trace -GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVER_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a) -GALLIUM_WINSYS_DIRS = xlib egl_xlib - -# Library dependencies #EXTRA_LIB_PATH ?= GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread OSMESA_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) diff --git a/configs/linux-gallium b/configs/linux-gallium new file mode 100644 index 0000000000..b046f248ec --- /dev/null +++ b/configs/linux-gallium @@ -0,0 +1,22 @@ +# Configuration for Linux / Gallium + +include $(TOP)/configs/linux + +CONFIG_NAME = linux-gallium + + +# Directories to build (adds gallium to SRC_DIRS) +SRC_DIRS = mesa gallium egl gallium/winsys glu glut/glx glew glw + + +# don't build old/conventional Mesa drivers +DRIVER_DIRS = + + +# Gallium directories and +GALLIUM_AUXILIARY_DIRS = draw translate cso_cache pipebuffer tgsi sct rtasm util indices +GALLIUM_AUXILIARIES = $(foreach DIR,$(GALLIUM_AUXILIARY_DIRS),$(TOP)/src/gallium/auxiliary/$(DIR)/lib$(DIR).a) +GALLIUM_DRIVER_DIRS = softpipe i915simple i965simple nv04 nv10 nv20 nv30 nv40 nv50 failover trace +GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVER_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a) +GALLIUM_WINSYS_DIRS = xlib egl_xlib + diff --git a/configs/linux-gallium-debug b/configs/linux-gallium-debug new file mode 100644 index 0000000000..111c43b884 --- /dev/null +++ b/configs/linux-gallium-debug @@ -0,0 +1,8 @@ +# Configuration for Linux / Gallium for debug + +include $(TOP)/configs/linux-gallium + +CONFIG_NAME = linux-gallium-debug + +OPT_FLAGS = -g -ansi -pedantic +DEFINES += -DDEBUG -DDEBUG_MATH diff --git a/src/mesa/Makefile b/src/mesa/Makefile index 552c20e0b9..22ef05c335 100644 --- a/src/mesa/Makefile +++ b/src/mesa/Makefile @@ -32,6 +32,10 @@ default: depend asm_subdirs libmesa.a libglapi.a driver_subdirs libmesa.a: $(MESA_OBJECTS) @ $(MKLIB) -o mesa -static $(MESA_OBJECTS) +# Make archive of subset of core mesa object files for gallium +libmesagallium.a: $(MESA_GALLIUM_OBJECTS) + @ $(MKLIB) -o mesagallium -static $(MESA_GALLIUM_OBJECTS) + # Make archive of gl* API dispatcher functions only libglapi.a: $(GLAPI_OBJECTS) @if [ "${WINDOW_SYSTEM}" = "dri" ] ; then \ diff --git a/src/mesa/sources.mak b/src/mesa/sources.mak index 8940670d5b..13ec1fa454 100644 --- a/src/mesa/sources.mak +++ b/src/mesa/sources.mak @@ -91,7 +91,7 @@ MATH_SOURCES = \ math/m_vector.c \ math/m_xform.c -__SWRAST_SOURCES = \ +SWRAST_SOURCES = \ swrast/s_aaline.c \ swrast/s_aatriangle.c \ swrast/s_accum.c \ @@ -122,11 +122,11 @@ __SWRAST_SOURCES = \ swrast/s_triangle.c \ swrast/s_zoom.c -__SWRAST_SETUP_SOURCES = \ +SWRAST_SETUP_SOURCES = \ swrast_setup/ss_context.c \ swrast_setup/ss_triangle.c -__TNL_SOURCES = \ +TNL_SOURCES = \ tnl/t_context.c \ tnl/t_pipeline.c \ tnl/t_draw.c \ @@ -162,7 +162,7 @@ VBO_SOURCES = \ vbo/vbo_save_draw.c \ vbo/vbo_save_loopback.c -__VF_SOURCES = \ +VF_SOURCES = \ vf/vf.c \ vf/vf_generic.c \ vf/vf_sse.c @@ -299,7 +299,7 @@ SPARC_SOURCES = \ SPARC_API = \ sparc/glapi_sparc.S -__COMMON_DRIVER_SOURCES = \ +COMMON_DRIVER_SOURCES = \ drivers/common/driverfuncs.c @@ -310,19 +310,27 @@ MESA_SOURCES = \ $(MAIN_SOURCES) \ $(MATH_SOURCES) \ $(VBO_SOURCES) \ - $(STATETRACKER_SOURCES) \ $(TNL_SOURCES) \ $(SHADER_SOURCES) \ $(SWRAST_SOURCES) \ $(SWRAST_SETUP_SOURCES) \ + $(COMMON_DRIVER_SOURCES)\ $(ASM_C_SOURCES) \ $(SLANG_SOURCES) ALL_SOURCES = \ $(MESA_SOURCES) \ $(GLAPI_SOURCES) \ - $(MESA_ASM_SOURCES) \ - $(COMMON_DRIVER_SOURCES) + $(MESA_ASM_SOURCES) + +MESA_GALLIUM_SOURCES = \ + $(MAIN_SOURCES) \ + $(MATH_SOURCES) \ + $(VBO_SOURCES) \ + $(STATETRACKER_SOURCES) \ + $(SHADER_SOURCES) \ + $(ASM_C_SOURCES) \ + $(SLANG_SOURCES) ### Object files @@ -331,6 +339,10 @@ MESA_OBJECTS = \ $(MESA_SOURCES:.c=.o) \ $(MESA_ASM_SOURCES:.S=.o) +MESA_GALLIUM_OBJECTS = \ + $(MESA_GALLIUM_SOURCES:.c=.o) \ + $(MESA_ASM_SOURCES:.S=.o) + GLAPI_OBJECTS = \ $(GLAPI_SOURCES:.c=.o) \ $(GLAPI_ASM_SOURCES:.S=.o) -- cgit v1.2.3 From 22c6c1eaad49692416f45bcbbcdc6424aea2da7c Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 9 Feb 2009 10:42:34 -0700 Subject: cell: update linux-cell config --- configs/linux-cell | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configs') diff --git a/configs/linux-cell b/configs/linux-cell index df08d262bd..648ce04e2d 100644 --- a/configs/linux-cell +++ b/configs/linux-cell @@ -1,6 +1,6 @@ # linux-cell (non-debug build) -include $(TOP)/configs/default +include $(TOP)/configs/linux-gallium CONFIG_NAME = linux-cell -- cgit v1.2.3 From e13593678f62941db06b7ae1a21b81c643371659 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 9 Feb 2009 11:16:20 -0700 Subject: re-add MSAA support (cherry picked from commit f7d80aa00611917bc8ce637136d982b151b8f44f) This also involved adding the new MSAA fields to driCreateConfigs(). Also, re-add prog_instructions->Sampler field for i965 driver. Will have to revisit that. --- configs/linux-dri | 13 +++------- src/mesa/drivers/dri/ffb/ffb_xmesa.c | 6 +++-- src/mesa/drivers/dri/i810/i810screen.c | 4 ++- src/mesa/drivers/dri/intel/intel_screen.c | 11 +++++--- src/mesa/drivers/dri/mach64/mach64_screen.c | 4 ++- src/mesa/drivers/dri/mga/mga_xmesa.c | 4 ++- src/mesa/drivers/dri/r128/r128_screen.c | 39 +++++++++++++++-------------- src/mesa/drivers/dri/radeon/radeon_screen.c | 5 ++-- src/mesa/drivers/dri/savage/savage_xmesa.c | 5 ++-- src/mesa/drivers/dri/sis/sis_screen.c | 4 ++- src/mesa/drivers/dri/tdfx/tdfx_screen.c | 4 ++- src/mesa/drivers/dri/unichrome/via_screen.c | 4 ++- src/mesa/shader/prog_instruction.h | 2 +- 13 files changed, 60 insertions(+), 45 deletions(-) (limited to 'configs') diff --git a/configs/linux-dri b/configs/linux-dri index c667a386f3..dc2ab4f9d9 100644 --- a/configs/linux-dri +++ b/configs/linux-dri @@ -57,16 +57,9 @@ PROGRAM_DIRS := egl $(PROGRAM_DIRS) # EGL directories EGL_DRIVERS_DIRS = demo glx -DRIVER_DIRS = +DRIVER_DIRS = dri WINDOW_SYSTEM = dri GALLIUM_WINSYS_DIRS = drm -# gamma are missing because they have not been converted to use the new -# interface. - -# XXX: need to figure out a way for gallium and non-gallium builds to -# coexist: -# - -#DRI_DIRS = i810 i915 i965 mach64 mga r128 r200 r300 radeon s3v \ -# savage sis tdfx trident unichrome ffb +DRI_DIRS = i810 i915 i965 mach64 mga r128 r200 r300 radeon s3v \ + savage sis tdfx trident unichrome ffb diff --git a/src/mesa/drivers/dri/ffb/ffb_xmesa.c b/src/mesa/drivers/dri/ffb/ffb_xmesa.c index 0cdbbd0ace..eb086e3055 100644 --- a/src/mesa/drivers/dri/ffb/ffb_xmesa.c +++ b/src/mesa/drivers/dri/ffb/ffb_xmesa.c @@ -628,6 +628,7 @@ ffbFillInModes( __DRIscreenPrivate *psp, uint8_t depth_bits_array[3]; uint8_t stencil_bits_array[3]; + uint8_t msaa_samples_array[1]; depth_bits_array[0] = 0; depth_bits_array[1] = depth_bits; @@ -656,9 +657,10 @@ ffbFillInModes( __DRIscreenPrivate *psp, configs = driCreateConfigs(fb_format, fb_type, depth_bits_array, stencil_bits_array, depth_buffer_factor, back_buffer_modes, - back_buffer_factor); + back_buffer_factor, + msaa_samples_array, 1); if (configs == NULL) { - fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__, + fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__, __LINE__); return NULL; } diff --git a/src/mesa/drivers/dri/i810/i810screen.c b/src/mesa/drivers/dri/i810/i810screen.c index 48603f5d79..6d7cf1f38b 100644 --- a/src/mesa/drivers/dri/i810/i810screen.c +++ b/src/mesa/drivers/dri/i810/i810screen.c @@ -77,6 +77,7 @@ i810FillInModes( __DRIscreenPrivate *psp, uint8_t depth_bits_array[2]; uint8_t stencil_bits_array[2]; + uint8_t msaa_samples_array[1]; depth_bits_array[0] = depth_bits; depth_bits_array[1] = depth_bits; @@ -94,7 +95,8 @@ i810FillInModes( __DRIscreenPrivate *psp, configs = driCreateConfigs(GL_RGB, GL_UNSIGNED_SHORT_5_6_5, depth_bits_array, stencil_bits_array, depth_buffer_factor, - back_buffer_modes, back_buffer_factor); + back_buffer_modes, back_buffer_factor, + msaa_samples_array, 1); if (configs == NULL) { fprintf( stderr, "[%s:%u] Error creating FBConfig!\n", __func__, __LINE__ ); diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c index e17f18a98f..f29e0e966b 100644 --- a/src/mesa/drivers/dri/intel/intel_screen.c +++ b/src/mesa/drivers/dri/intel/intel_screen.c @@ -478,6 +478,7 @@ intelFillInModes(__DRIscreenPrivate *psp, uint8_t depth_bits_array[3]; uint8_t stencil_bits_array[3]; + uint8_t msaa_samples_array[1]; depth_bits_array[0] = 0; depth_bits_array[1] = depth_bits; @@ -509,7 +510,9 @@ intelFillInModes(__DRIscreenPrivate *psp, configs = driCreateConfigs(fb_format, fb_type, depth_bits_array, stencil_bits_array, depth_buffer_factor, back_buffer_modes, - back_buffer_factor); + back_buffer_factor, + msaa_samples_array, 1); + if (configs == NULL) { fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__, __LINE__); @@ -679,7 +682,7 @@ __DRIconfig **intelInitScreen2(__DRIscreenPrivate *psp) static const GLenum back_buffer_modes[] = { GLX_NONE, GLX_SWAP_UNDEFINED_OML, GLX_SWAP_COPY_OML }; - uint8_t depth_bits[4], stencil_bits[4]; + uint8_t depth_bits[4], stencil_bits[4], msaa_samples_array[1]; int color; const __DRIconfig **configs = NULL; @@ -748,7 +751,9 @@ __DRIconfig **intelInitScreen2(__DRIscreenPrivate *psp) stencil_bits, ARRAY_SIZE(depth_bits), back_buffer_modes, - ARRAY_SIZE(back_buffer_modes)); + ARRAY_SIZE(back_buffer_modes), + msaa_samples_array, ARRAY_SIZE(msaa_samples_array)); + if (configs == NULL) configs = new_configs; else diff --git a/src/mesa/drivers/dri/mach64/mach64_screen.c b/src/mesa/drivers/dri/mach64/mach64_screen.c index 6bfb4c32b1..59a3573898 100644 --- a/src/mesa/drivers/dri/mach64/mach64_screen.c +++ b/src/mesa/drivers/dri/mach64/mach64_screen.c @@ -93,6 +93,7 @@ mach64FillInModes( __DRIscreenPrivate *psp, uint8_t depth_bits_array[2]; uint8_t stencil_bits_array[2]; + uint8_t msaa_samples_array[1]; depth_bits_array[0] = depth_bits; depth_bits_array[1] = depth_bits; @@ -119,7 +120,8 @@ mach64FillInModes( __DRIscreenPrivate *psp, configs = driCreateConfigs(fb_format, fb_type, depth_bits_array, stencil_bits_array, depth_buffer_factor, back_buffer_modes, - back_buffer_factor); + back_buffer_factor, + msaa_samples_array, 1); if (configs == NULL) { fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__, __LINE__); diff --git a/src/mesa/drivers/dri/mga/mga_xmesa.c b/src/mesa/drivers/dri/mga/mga_xmesa.c index 2d0f387cdc..98185a6c9e 100644 --- a/src/mesa/drivers/dri/mga/mga_xmesa.c +++ b/src/mesa/drivers/dri/mga/mga_xmesa.c @@ -129,6 +129,7 @@ mgaFillInModes( __DRIscreenPrivate *psp, uint8_t depth_bits_array[3]; uint8_t stencil_bits_array[3]; + uint8_t msaa_samples_array[1]; depth_bits_array[0] = 0; @@ -158,7 +159,8 @@ mgaFillInModes( __DRIscreenPrivate *psp, configs = driCreateConfigs(fb_format, fb_type, depth_bits_array, stencil_bits_array, depth_buffer_factor, - back_buffer_modes, back_buffer_factor); + back_buffer_modes, back_buffer_factor, + msaa_samples_array, 1); if (configs == NULL) { fprintf( stderr, "[%s:%u] Error creating FBConfig!\n", __func__, __LINE__ ); diff --git a/src/mesa/drivers/dri/r128/r128_screen.c b/src/mesa/drivers/dri/r128/r128_screen.c index cb3a147dba..e72ca45be9 100644 --- a/src/mesa/drivers/dri/r128/r128_screen.c +++ b/src/mesa/drivers/dri/r128/r128_screen.c @@ -422,7 +422,7 @@ r128FillInModes( __DRIscreenPrivate *psp, uint8_t depth_bits_array[2]; uint8_t stencil_bits_array[2]; - + uint8_t msaa_samples_array[1]; depth_bits_array[0] = depth_bits; depth_bits_array[1] = depth_bits; @@ -446,26 +446,27 @@ r128FillInModes( __DRIscreenPrivate *psp, fb_type = GL_UNSIGNED_INT_8_8_8_8_REV; } - configs = driCreateConfigs(fb_format, fb_type, - depth_bits_array, stencil_bits_array, - depth_buffer_factor, back_buffer_modes, - back_buffer_factor); - if (configs == NULL) { - fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__, - __LINE__); - return NULL; - } + configs = driCreateConfigs(fb_format, fb_type, + depth_bits_array, stencil_bits_array, + depth_buffer_factor, back_buffer_modes, + back_buffer_factor, + msaa_samples_array, 1); + if (configs == NULL) { + fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__, + __LINE__); + return NULL; + } - /* Mark the visual as slow if there are "fake" stencil bits. - */ - for (i = 0; configs[i]; i++) { - m = &configs[i]->modes; - if ((m->stencilBits != 0) && (m->stencilBits != stencil_bits)) { - m->visualRating = GLX_SLOW_CONFIG; - } - } + /* Mark the visual as slow if there are "fake" stencil bits. + */ + for (i = 0; configs[i]; i++) { + m = &configs[i]->modes; + if ((m->stencilBits != 0) && (m->stencilBits != stencil_bits)) { + m->visualRating = GLX_SLOW_CONFIG; + } + } - return (const __DRIconfig **) configs; + return (const __DRIconfig **) configs; } diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c index f5665c4af1..b52a084777 100644 --- a/src/mesa/drivers/dri/radeon/radeon_screen.c +++ b/src/mesa/drivers/dri/radeon/radeon_screen.c @@ -276,7 +276,7 @@ radeonFillInModes( __DRIscreenPrivate *psp, uint8_t depth_bits_array[2]; uint8_t stencil_bits_array[2]; - + uint8_t msaa_samples_array[1]; depth_bits_array[0] = depth_bits; depth_bits_array[1] = depth_bits; @@ -303,7 +303,8 @@ radeonFillInModes( __DRIscreenPrivate *psp, configs = driCreateConfigs(fb_format, fb_type, depth_bits_array, stencil_bits_array, depth_buffer_factor, - back_buffer_modes, back_buffer_factor); + back_buffer_modes, back_buffer_factor, + msaa_samples_array, 1); if (configs == NULL) { fprintf( stderr, "[%s:%u] Error creating FBConfig!\n", __func__, __LINE__ ); diff --git a/src/mesa/drivers/dri/savage/savage_xmesa.c b/src/mesa/drivers/dri/savage/savage_xmesa.c index c5decb093a..ba4008e644 100644 --- a/src/mesa/drivers/dri/savage/savage_xmesa.c +++ b/src/mesa/drivers/dri/savage/savage_xmesa.c @@ -910,7 +910,7 @@ savageFillInModes( __DRIscreenPrivate *psp, uint8_t depth_bits_array[2]; uint8_t stencil_bits_array[2]; - + uint8_t msaa_samples_array[1]; depth_bits_array[0] = depth_bits; depth_bits_array[1] = depth_bits; @@ -937,7 +937,8 @@ savageFillInModes( __DRIscreenPrivate *psp, configs = driCreateConfigs(fb_format, fb_type, depth_bits_array, stencil_bits_array, depth_buffer_factor, - back_buffer_modes, back_buffer_factor); + back_buffer_modes, back_buffer_factor, + msaa_samples_array, 1); if (configs == NULL) { fprintf( stderr, "[%s:%u] Error creating FBConfig!\n", __func__, __LINE__ ); diff --git a/src/mesa/drivers/dri/sis/sis_screen.c b/src/mesa/drivers/dri/sis/sis_screen.c index b1a5d15236..e31b5223f7 100644 --- a/src/mesa/drivers/dri/sis/sis_screen.c +++ b/src/mesa/drivers/dri/sis/sis_screen.c @@ -77,6 +77,7 @@ sisFillInModes(__DRIscreenPrivate *psp, int bpp) }; uint8_t depth_bits_array[4]; uint8_t stencil_bits_array[4]; + uint8_t msaa_samples_array[1]; depth_bits_array[0] = 0; stencil_bits_array[0] = 0; @@ -100,7 +101,8 @@ sisFillInModes(__DRIscreenPrivate *psp, int bpp) configs = driCreateConfigs(fb_format, fb_type, depth_bits_array, stencil_bits_array, depth_buffer_factor, - back_buffer_modes, back_buffer_factor); + back_buffer_modes, back_buffer_factor, + msaa_samples_array, 1); if (configs == NULL) { fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__, __LINE__); return NULL; diff --git a/src/mesa/drivers/dri/tdfx/tdfx_screen.c b/src/mesa/drivers/dri/tdfx/tdfx_screen.c index cd22b84951..90a4a2c3c0 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_screen.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_screen.c @@ -361,6 +361,7 @@ tdfxFillInModes(__DRIscreenPrivate *psp, static const GLenum db_modes[2] = { GLX_NONE, GLX_SWAP_UNDEFINED_OML }; uint8_t depth_bits_array[4]; uint8_t stencil_bits_array[4]; + uint8_t msaa_samples_array[1]; if(deep) { depth_bits_array[0] = 0; depth_bits_array[1] = 24; @@ -383,7 +384,8 @@ tdfxFillInModes(__DRIscreenPrivate *psp, depth_bits_array, stencil_bits_array, deep ? 2 : 4, - db_modes, 2); + db_modes, 2, + msaa_samples_array, 1); } /** diff --git a/src/mesa/drivers/dri/unichrome/via_screen.c b/src/mesa/drivers/dri/unichrome/via_screen.c index 988f9935ac..c25b87b4a4 100644 --- a/src/mesa/drivers/dri/unichrome/via_screen.c +++ b/src/mesa/drivers/dri/unichrome/via_screen.c @@ -342,6 +342,7 @@ viaFillInModes( __DRIscreenPrivate *psp, */ static const uint8_t depth_bits_array[4] = { 0, 16, 24, 32 }; static const uint8_t stencil_bits_array[4] = { 0, 0, 8, 0 }; + uint8_t msaa_samples_array[1]; const unsigned depth_buffer_factor = 3; if ( pixel_bits == 16 ) { @@ -356,7 +357,8 @@ viaFillInModes( __DRIscreenPrivate *psp, configs = driCreateConfigs(fb_format, fb_type, depth_bits_array, stencil_bits_array, depth_buffer_factor, back_buffer_modes, - back_buffer_factor); + back_buffer_factor, + msaa_samples_array, 1); if (configs == NULL) { fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__, __LINE__); diff --git a/src/mesa/shader/prog_instruction.h b/src/mesa/shader/prog_instruction.h index f978334ab2..c649b3db5e 100644 --- a/src/mesa/shader/prog_instruction.h +++ b/src/mesa/shader/prog_instruction.h @@ -418,7 +418,7 @@ struct prog_instruction */ GLint BranchTarget; -#if 0 +#if 01 /* XXX just use this for i965 driver for now! */ /** * For TEX instructions in shaders, the sampler to use for the * texture lookup. -- cgit v1.2.3 From b96d50da8b56010a040c93027b4c4eb35f922d51 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Tue, 10 Feb 2009 13:59:35 +0100 Subject: Revert "mesa: added new linux-gallium and linux-gallium-debug configs" This reverts commit abbe96cb6e7581a52652030e40442b943a482840. It only reverts parts of the commit the other parts where related to libmesagallium changes. --- Makefile | 2 -- configs/default | 12 ++++++++++-- configs/linux-gallium | 22 ---------------------- configs/linux-gallium-debug | 8 -------- 4 files changed, 10 insertions(+), 34 deletions(-) delete mode 100644 configs/linux-gallium delete mode 100644 configs/linux-gallium-debug (limited to 'configs') diff --git a/Makefile b/Makefile index 24cfbe5922..c79fb1cb28 100644 --- a/Makefile +++ b/Makefile @@ -115,8 +115,6 @@ linux-dri-x86-64 \ linux-dri-ppc \ linux-dri-xcb \ linux-egl \ -linux-gallium \ -linux-gallium-debug \ linux-indirect \ linux-fbdev \ linux-glide \ diff --git a/configs/default b/configs/default index ec8d51ccfe..13bda58f18 100644 --- a/configs/default +++ b/configs/default @@ -79,16 +79,24 @@ MOTIF_CFLAGS = -I/usr/include/Motif1.2 # Directories to build LIB_DIR = lib -SRC_DIRS = mesa egl glu glut/glx glew glw +SRC_DIRS = mesa gallium egl gallium/winsys glu glut/glx glew glw GLU_DIRS = sgi -DRIVER_DIRS = x11 osmesa +DRIVER_DIRS = # Which subdirs under $(TOP)/progs/ to enter: PROGRAM_DIRS = demos redbook samples glsl xdemos # EGL directories EGL_DRIVERS_DIRS = demo +# Gallium directories and +GALLIUM_AUXILIARY_DIRS = draw translate cso_cache pipebuffer tgsi sct rtasm util indices +GALLIUM_AUXILIARIES = $(foreach DIR,$(GALLIUM_AUXILIARY_DIRS),$(TOP)/src/gallium/auxiliary/$(DIR)/lib$(DIR).a) +GALLIUM_DRIVER_DIRS = softpipe i915simple i965simple nv04 nv10 nv20 nv30 nv40 nv50 failover trace +GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVER_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a) +GALLIUM_WINSYS_DIRS = xlib egl_xlib + +# Library dependencies #EXTRA_LIB_PATH ?= GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread OSMESA_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) diff --git a/configs/linux-gallium b/configs/linux-gallium deleted file mode 100644 index b046f248ec..0000000000 --- a/configs/linux-gallium +++ /dev/null @@ -1,22 +0,0 @@ -# Configuration for Linux / Gallium - -include $(TOP)/configs/linux - -CONFIG_NAME = linux-gallium - - -# Directories to build (adds gallium to SRC_DIRS) -SRC_DIRS = mesa gallium egl gallium/winsys glu glut/glx glew glw - - -# don't build old/conventional Mesa drivers -DRIVER_DIRS = - - -# Gallium directories and -GALLIUM_AUXILIARY_DIRS = draw translate cso_cache pipebuffer tgsi sct rtasm util indices -GALLIUM_AUXILIARIES = $(foreach DIR,$(GALLIUM_AUXILIARY_DIRS),$(TOP)/src/gallium/auxiliary/$(DIR)/lib$(DIR).a) -GALLIUM_DRIVER_DIRS = softpipe i915simple i965simple nv04 nv10 nv20 nv30 nv40 nv50 failover trace -GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVER_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a) -GALLIUM_WINSYS_DIRS = xlib egl_xlib - diff --git a/configs/linux-gallium-debug b/configs/linux-gallium-debug deleted file mode 100644 index 111c43b884..0000000000 --- a/configs/linux-gallium-debug +++ /dev/null @@ -1,8 +0,0 @@ -# Configuration for Linux / Gallium for debug - -include $(TOP)/configs/linux-gallium - -CONFIG_NAME = linux-gallium-debug - -OPT_FLAGS = -g -ansi -pedantic -DEFINES += -DDEBUG -DDEBUG_MATH -- cgit v1.2.3 From 7fad277bbbc8174a81427edcd9c7306d1b6571b1 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Tue, 10 Feb 2009 14:14:28 +0100 Subject: Revert "cell: update linux-cell config" This reverts commit 22c6c1eaad49692416f45bcbbcdc6424aea2da7c. Need to revert this since we reverted commited this depended on. --- configs/linux-cell | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configs') diff --git a/configs/linux-cell b/configs/linux-cell index 648ce04e2d..df08d262bd 100644 --- a/configs/linux-cell +++ b/configs/linux-cell @@ -1,6 +1,6 @@ # linux-cell (non-debug build) -include $(TOP)/configs/linux-gallium +include $(TOP)/configs/default CONFIG_NAME = linux-cell -- cgit v1.2.3 From 43e6272ae5c03f663cfdd98f35b0b0028bc5d252 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Tue, 10 Feb 2009 16:23:02 +0100 Subject: gallium: Introduce new subdirs build variables (based on gallium-xorg-driver/commit 270ce504052d415870a25ab59818b2309eb8ac13) --- configs/default | 3 +++ configs/linux-dri | 4 +++- src/gallium/Makefile | 2 +- src/gallium/state_trackers/Makefile | 2 +- src/gallium/winsys/drm/Makefile | 10 +++++----- 5 files changed, 13 insertions(+), 8 deletions(-) (limited to 'configs') diff --git a/configs/default b/configs/default index 13bda58f18..3a49c5a969 100644 --- a/configs/default +++ b/configs/default @@ -89,11 +89,14 @@ PROGRAM_DIRS = demos redbook samples glsl xdemos EGL_DRIVERS_DIRS = demo # Gallium directories and +GALLIUM_DIRS = auxiliary drivers state_trackers GALLIUM_AUXILIARY_DIRS = draw translate cso_cache pipebuffer tgsi sct rtasm util indices GALLIUM_AUXILIARIES = $(foreach DIR,$(GALLIUM_AUXILIARY_DIRS),$(TOP)/src/gallium/auxiliary/$(DIR)/lib$(DIR).a) GALLIUM_DRIVER_DIRS = softpipe i915simple i965simple nv04 nv10 nv20 nv30 nv40 nv50 failover trace GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVER_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a) GALLIUM_WINSYS_DIRS = xlib egl_xlib +GALLIUM_WINSYS_DRM_DIRS = +GALLIUM_STATE_TRACKERS_DIRS = glx # Library dependencies diff --git a/configs/linux-dri b/configs/linux-dri index dc2ab4f9d9..8632170408 100644 --- a/configs/linux-dri +++ b/configs/linux-dri @@ -59,7 +59,9 @@ EGL_DRIVERS_DIRS = demo glx DRIVER_DIRS = dri WINDOW_SYSTEM = dri -GALLIUM_WINSYS_DIRS = drm +GALLIUM_WINSYS_DIRS = drm +GALLIUM_WINSYS_DRM_DIRS = intel nouveau +GALLIUM_STATE_TRACKERS_DIRS = egl DRI_DIRS = i810 i915 i965 mach64 mga r128 r200 r300 radeon s3v \ savage sis tdfx trident unichrome ffb diff --git a/src/gallium/Makefile b/src/gallium/Makefile index c7b594d084..875314f6c3 100644 --- a/src/gallium/Makefile +++ b/src/gallium/Makefile @@ -2,7 +2,7 @@ TOP = ../.. include $(TOP)/configs/current -SUBDIRS = auxiliary drivers state_trackers +SUBDIRS = $(GALLIUM_DIRS) # Note winsys/ needs to be built after src/mesa diff --git a/src/gallium/state_trackers/Makefile b/src/gallium/state_trackers/Makefile index 07b3fbf311..265ca468c2 100644 --- a/src/gallium/state_trackers/Makefile +++ b/src/gallium/state_trackers/Makefile @@ -2,7 +2,7 @@ TOP = ../../.. include $(TOP)/configs/current -SUBDIRS = glx +SUBDIRS = $(GALLIUM_STATE_TRACKERS_DIRS) default: subdirs diff --git a/src/gallium/winsys/drm/Makefile b/src/gallium/winsys/drm/Makefile index f466ce6c3c..d2af5705f0 100644 --- a/src/gallium/winsys/drm/Makefile +++ b/src/gallium/winsys/drm/Makefile @@ -1,10 +1,10 @@ -# src/mesa/drivers/dri/Makefile +# src/gallium/winsys/drm/Makefile TOP = ../../../.. include $(TOP)/configs/current - +SUBDIRS = $(GALLIUM_WINSYS_DRM_DIRS) default: $(TOP)/$(LIB_DIR) subdirs @@ -14,7 +14,7 @@ $(TOP)/$(LIB_DIR): subdirs: - @for dir in $(DRI_DIRS) ; do \ + @for dir in $(SUBDIRS) ; do \ if [ -d $$dir ] ; then \ (cd $$dir && $(MAKE)) || exit 1 ; \ fi \ @@ -22,7 +22,7 @@ subdirs: install: - @for dir in $(DRI_DIRS) ; do \ + @for dir in $(SUBDIRS) ; do \ if [ -d $$dir ] ; then \ (cd $$dir && $(MAKE) install) || exit 1 ; \ fi \ @@ -30,7 +30,7 @@ install: clean: - @for dir in $(DRI_DIRS) ; do \ + @for dir in $(SUBDIRS) ; do \ if [ -d $$dir ] ; then \ (cd $$dir && $(MAKE) clean) ; \ fi \ -- cgit v1.2.3 From 767b1acbb757186bde30973394f256ab7498a075 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Tue, 10 Feb 2009 17:43:25 +0100 Subject: mesa: Build both software rasterizers for debug But put the gallium one in lib/gallium --- configs/default | 2 +- src/gallium/winsys/xlib/Makefile | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'configs') diff --git a/configs/default b/configs/default index 3a49c5a969..4c8698ccc4 100644 --- a/configs/default +++ b/configs/default @@ -81,7 +81,7 @@ MOTIF_CFLAGS = -I/usr/include/Motif1.2 LIB_DIR = lib SRC_DIRS = mesa gallium egl gallium/winsys glu glut/glx glew glw GLU_DIRS = sgi -DRIVER_DIRS = +DRIVER_DIRS = x11 osmesa # Which subdirs under $(TOP)/progs/ to enter: PROGRAM_DIRS = demos redbook samples glsl xdemos diff --git a/src/gallium/winsys/xlib/Makefile b/src/gallium/winsys/xlib/Makefile index 9d70f3cb9c..bb187cc14a 100644 --- a/src/gallium/winsys/xlib/Makefile +++ b/src/gallium/winsys/xlib/Makefile @@ -62,15 +62,17 @@ LIBS = \ -default: $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) +default: $(TOP)/$(LIB_DIR)/gallium $(TOP)/$(LIB_DIR)/gallium/$(GL_LIB_NAME) +$(TOP)/$(LIB_DIR)/gallium: + @ mkdir -p $(TOP)/$(LIB_DIR)/gallium # Make the libGL.so library -$(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(XLIB_WINSYS_OBJECTS) $(LIBS) Makefile +$(TOP)/$(LIB_DIR)/gallium/$(GL_LIB_NAME): $(XLIB_WINSYS_OBJECTS) $(LIBS) Makefile $(TOP)/bin/mklib -o $(GL_LIB) \ -linker "$(CC)" \ -major $(GL_MAJOR) -minor $(GL_MINOR) -patch $(GL_TINY) \ - -install $(TOP)/$(LIB_DIR) \ + -install $(TOP)/$(LIB_DIR)/gallium \ $(MKLIB_OPTIONS) $(XLIB_WINSYS_OBJECTS) \ --start-group $(LIBS) --end-group $(GL_LIB_DEPS) -- cgit v1.2.3 From e94b4dd4f0c7f2e199e4fb2d1b81ac818d0d6078 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Wed, 11 Feb 2009 02:25:10 +0100 Subject: gallium: Disable nouveau by default Most piep drivers should be able to build by default, but since the nouveau ones depend drm they can't be enabled by default. --- configs/default | 2 +- configs/linux-dri | 2 +- configure.ac | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'configs') diff --git a/configs/default b/configs/default index 4c8698ccc4..a90d46f18e 100644 --- a/configs/default +++ b/configs/default @@ -92,7 +92,7 @@ EGL_DRIVERS_DIRS = demo GALLIUM_DIRS = auxiliary drivers state_trackers GALLIUM_AUXILIARY_DIRS = draw translate cso_cache pipebuffer tgsi sct rtasm util indices GALLIUM_AUXILIARIES = $(foreach DIR,$(GALLIUM_AUXILIARY_DIRS),$(TOP)/src/gallium/auxiliary/$(DIR)/lib$(DIR).a) -GALLIUM_DRIVER_DIRS = softpipe i915simple i965simple nv04 nv10 nv20 nv30 nv40 nv50 failover trace +GALLIUM_DRIVER_DIRS = softpipe i915simple i965simple failover trace GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVER_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a) GALLIUM_WINSYS_DIRS = xlib egl_xlib GALLIUM_WINSYS_DRM_DIRS = diff --git a/configs/linux-dri b/configs/linux-dri index 8632170408..c5e30d3060 100644 --- a/configs/linux-dri +++ b/configs/linux-dri @@ -60,7 +60,7 @@ EGL_DRIVERS_DIRS = demo glx DRIVER_DIRS = dri WINDOW_SYSTEM = dri GALLIUM_WINSYS_DIRS = drm -GALLIUM_WINSYS_DRM_DIRS = intel nouveau +GALLIUM_WINSYS_DRM_DIRS = intel GALLIUM_STATE_TRACKERS_DIRS = egl DRI_DIRS = i810 i915 i965 mach64 mga r128 r200 r300 radeon s3v \ diff --git a/configure.ac b/configure.ac index 451902dd38..d94cfd26fc 100644 --- a/configure.ac +++ b/configure.ac @@ -427,7 +427,7 @@ dri) DRIVER_DIRS="" WINDOW_SYSTEM="dri" GALLIUM_WINSYS_DIRS="drm $GALLIUM_WINSYS_DIRS" - GALLIUM_DRIVER_DIRS="$GALLIUM_DRIVER_DIRS i915simple i965simple nv04 nv10 nv20 nv30 nv40 nv50" + GALLIUM_DRIVER_DIRS="$GALLIUM_DRIVER_DIRS i915simple i965simple" ;; osmesa) DRIVER_DIRS="osmesa" -- cgit v1.2.3 From 7e54d7d3d6153895c5301cd16c7ba76a126f06ee Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Wed, 11 Feb 2009 02:38:21 +0100 Subject: gallium: Update autoconf to latest gallium build --- configs/autoconf.in | 7 +++++-- configure.ac | 39 ++++++++++++++++++++++++++++++++++++--- 2 files changed, 41 insertions(+), 5 deletions(-) (limited to 'configs') diff --git a/configs/autoconf.in b/configs/autoconf.in index 3fc5e6c721..41173481af 100644 --- a/configs/autoconf.in +++ b/configs/autoconf.in @@ -62,9 +62,12 @@ LIB_DIR = @LIB_DIR@ SRC_DIRS = @SRC_DIRS@ GLU_DIRS = @GLU_DIRS@ DRIVER_DIRS = @DRIVER_DIRS@ +GALLIUM_DIRS = @GALLIUM_DIRS@ GALLIUM_AUXILIARY_DIRS = @GALLIUM_AUXILIARY_DIRS@ GALLIUM_DRIVER_DIRS = @GALLIUM_DRIVER_DIRS@ -GALLIUM_WINSYS_DIRS = @GALLIUM_WINSYS_DIRS@ +GALLIUM_WINSYS_DIRS = @GALLIUM_WINSYS_DIRS@ +GALLIUM_WINSYS_DRM_DIRS = @GALLIUM_WINSYS_DRM_DIRS@ +GALLIUM_STATE_TRACKERS_DIRS = @GALLIUM_STATE_TRACKERS_DIRS@ GALLIUM_AUXILIARIES = $(foreach DIR,$(GALLIUM_AUXILIARY_DIRS),$(TOP)/src/gallium/auxiliary/$(DIR)/lib$(DIR).a) GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVER_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a) @@ -72,7 +75,7 @@ GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVER_DIRS),$(TOP)/src/gallium/driver PROGRAM_DIRS = @PROGRAM_DIRS@ # Driver specific build vars -#DRI_DIRS = @DRI_DIRS@ +DRI_DIRS = @DRI_DIRS@ WINDOW_SYSTEM = @WINDOW_SYSTEM@ USING_EGL = @USING_EGL@ diff --git a/configure.ac b/configure.ac index d94cfd26fc..fa9c3b082a 100644 --- a/configure.ac +++ b/configure.ac @@ -412,22 +412,28 @@ esac dnl dnl Driver specific build directories dnl -SRC_DIRS="mesa gallium egl gallium/winsys" +SRC_DIRS="mesa egl" GLU_DIRS="sgi" WINDOW_SYSTEM="" +GALLIUM_DIRS="auxiliary drivers state_trackers" GALLIUM_WINSYS_DIRS="" +GALLIUM_WINSYS_DRM_DIRS="" GALLIUM_AUXILIARY_DIRS="draw translate cso_cache pipebuffer tgsi sct rtasm util" -GALLIUM_DRIVER_DIRS="softpipe failover" +GALLIUM_DRIVER_DIRS="softpipe failover trace" +GALLIUM_STATE_TRACKERS_DIRS="" + case "$mesa_driver" in xlib) DRIVER_DIRS="x11" ;; dri) SRC_DIRS="glx/x11 $SRC_DIRS" - DRIVER_DIRS="" + DRIVER_DIRS="dri" WINDOW_SYSTEM="dri" GALLIUM_WINSYS_DIRS="drm $GALLIUM_WINSYS_DIRS" + GALLIUM_WINSYS_DRM_DIRS="intel" GALLIUM_DRIVER_DIRS="$GALLIUM_DRIVER_DIRS i915simple i965simple" + GALLIUM_STATE_TRACKERS_DIRS="egl" ;; osmesa) DRIVER_DIRS="osmesa" @@ -437,9 +443,12 @@ AC_SUBST([SRC_DIRS]) AC_SUBST([GLU_DIRS]) AC_SUBST([DRIVER_DIRS]) AC_SUBST([WINDOW_SYSTEM]) +AC_SUBST([GALLIUM_DIRS]) AC_SUBST([GALLIUM_WINSYS_DIRS]) +AC_SUBST([GALLIUM_WINSYS_DRM_DIRS]) AC_SUBST([GALLIUM_DRIVER_DIRS]) AC_SUBST([GALLIUM_AUXILIARY_DIRS]) +AC_SUBST([GALLIUM_STATE_TRACKERS_DIRS]) dnl dnl User supplied program configuration @@ -1060,6 +1069,17 @@ fi AC_SUBST([APP_LIB_DEPS]) AC_SUBST([PROGRAM_DIRS]) +dnl +dnl Gallium configuration +dnl +AC_ARG_ENABLE([gallium], + [AS_HELP_STRING([--disable-gallium], + [build gallium @<:@default=enabled@:>@])], + [enable_gallium="$enableval"], + [enable_gallium=yes]) +if test "x$enable_gallium" = xyes; then + SRC_DIRS="$SRC_DIRS gallium gallium/winsys" +fi dnl Restore LDFLAGS and CPPFLAGS LDFLAGS="$_SAVE_LDFLAGS" @@ -1107,6 +1127,19 @@ fi fi echo " Use XCB: $enable_xcb" +echo "" +if echo "$SRC_DIRS" | grep 'gallium' >/dev/null 2>&1; then + echo " Gallium: yes" + echo " Gallium dirs: $GALLIUM_DIRS" + echo " Winsys dirs: $GALLIUM_WINSYS_DIRS" + echo " Winsys drm dirs: $GALLIUM_WINSYS_DRM_DIRS" + echo " Auxiliary dirs: $GALLIUM_AUXILIARY_DIRS" + echo " Driver dirs: $GALLIUM_DRIVER_DIRS" + echo " Trackers dirs: $GALLIUM_STATE_TRACKERS_DIRS" +else + echo " Gallium: no" +fi + dnl Libraries echo "" echo " Shared libs: $enable_shared" -- cgit v1.2.3 From 0996a23e3d21383712295d52dccd98ff0e166c6e Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 10 Feb 2009 19:33:02 -0700 Subject: cell: asst build fixes in linux-cell config Add -D_SVID_SOURCE to silence warnings when building glx files. Don't build the non-gallium drivers. --- configs/linux-cell | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'configs') diff --git a/configs/linux-cell b/configs/linux-cell index df08d262bd..d58a7a6ec7 100644 --- a/configs/linux-cell +++ b/configs/linux-cell @@ -28,13 +28,16 @@ SDK = /opt/cell/sdk/usr CFLAGS = $(OPT_FLAGS) -Wall -Winline -Wmissing-prototypes \ -fPIC -m32 -std=c99 -mabi=altivec -maltivec \ -I. -I$(SDK)/include \ - -DGALLIUM_CELL -DUSE_XSHM -D_BSD_SOURCE + -DGALLIUM_CELL -DUSE_XSHM -D_BSD_SOURCE -D_SVID_SOURCE CXXFLAGS = $(CFLAGS) # Omitting glw here: SRC_DIRS = gallium mesa gallium/winsys glu glut/glx glew +# Build no traditional Mesa drivers: +DRIVER_DIRS = + MKDEP_OPTIONS = -fdepend -Y -- cgit v1.2.3 From c5bae14245192e83e7a91a6b72dc8451dd76f8ef Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Wed, 11 Feb 2009 11:04:29 -0800 Subject: autoconf: Adjust to new asm SOURCES variables Commit 90b2beb661f630966788a6e909dc759c99e38973 changed the assembly variables. Without this change, the glapi assembly wasn't being built when it was supposed to, resulting in missing symbols in libGL. Signed-off-by: Dan Nicholson --- configs/autoconf.in | 4 ++-- configure.ac | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'configs') diff --git a/configs/autoconf.in b/configs/autoconf.in index 41173481af..b352974a4c 100644 --- a/configs/autoconf.in +++ b/configs/autoconf.in @@ -22,8 +22,8 @@ LDFLAGS = @LDFLAGS@ EXTRA_LIB_PATH = @EXTRA_LIB_PATH@ # Assembler -ASM_SOURCES = @ASM_SOURCES@ -ASM_API = @ASM_API@ +MESA_ASM_SOURCES = @MESA_ASM_SOURCES@ +GLAPI_ASM_SOURCES = @GLAPI_ASM_SOURCES@ # Misc tools and flags MAKE = @MAKE@ diff --git a/configure.ac b/configure.ac index a124f42603..be5bcad0f3 100644 --- a/configure.ac +++ b/configure.ac @@ -273,8 +273,8 @@ AC_ARG_ENABLE([asm], ) asm_arch="" ASM_FLAGS="" -ASM_SOURCES="" -ASM_API="" +MESA_ASM_SOURCES="" +GLAPI_ASM_SOURCES="" AC_MSG_CHECKING([whether to enable assembly]) test "x$enable_asm" = xno && AC_MSG_RESULT([no]) # disable if cross compiling on x86/x86_64 since we must run gen_matypes @@ -315,19 +315,19 @@ if test "x$enable_asm" = xyes; then case "$asm_arch" in x86) ASM_FLAGS="-DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM" - ASM_SOURCES='$(X86_SOURCES)' - ASM_API='$(X86_API)' + MESA_ASM_SOURCES='$(X86_SOURCES)' + GLAPI_ASM_SOURCES='$(X86_API)' AC_MSG_RESULT([yes, x86]) ;; x86_64) ASM_FLAGS="-DUSE_X86_64_ASM" - ASM_SOURCES='$(X86-64_SOURCES)' - ASM_API='$(X86-64_API)' + MESA_ASM_SOURCES='$(X86-64_SOURCES)' + GLAPI_ASM_SOURCES='$(X86-64_API)' AC_MSG_RESULT([yes, x86_64]) ;; ppc) ASM_FLAGS="-DUSE_PPC_ASM -DUSE_VMX_ASM" - ASM_SOURCES='$(PPC_SOURCES)' + MESA_ASM_SOURCES='$(PPC_SOURCES)' AC_MSG_RESULT([yes, ppc]) ;; *) @@ -336,8 +336,8 @@ if test "x$enable_asm" = xyes; then esac fi AC_SUBST([ASM_FLAGS]) -AC_SUBST([ASM_SOURCES]) -AC_SUBST([ASM_API]) +AC_SUBST([MESA_ASM_SOURCES]) +AC_SUBST([GLAPI_ASM_SOURCES]) dnl PIC code macro MESA_PIC_FLAGS -- cgit v1.2.3