DOS updates for new tree (Daniel Borca)
This commit is contained in:
108
Makefile.DJ
Normal file
108
Makefile.DJ
Normal file
@@ -0,0 +1,108 @@
|
||||
# Mesa 3-D graphics library
|
||||
# Version: 4.0
|
||||
#
|
||||
# Copyright (C) 1999 Brian Paul 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
|
||||
# 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
|
||||
# BRIAN PAUL 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.
|
||||
|
||||
# DOS/DJGPP makefile v1.4 for Mesa
|
||||
#
|
||||
# Copyright (C) 2002 - Borca Daniel
|
||||
# Email : dborca@yahoo.com
|
||||
# Web : http://www.geocities.com/dborca
|
||||
|
||||
|
||||
#
|
||||
# Available options:
|
||||
#
|
||||
# Environment variables:
|
||||
# CPU optimize for the given processor.
|
||||
# default = k6
|
||||
# GLU=[mesa|sgi] specify GLU directory; can be `sgi' (requires GNU/C++)
|
||||
# or `mesa'.
|
||||
# default = mesa
|
||||
# GLIDE path to Glide3 SDK include files; used with FX.
|
||||
# default = $(TOP)/include/glide3
|
||||
# FX=1 build for 3dfx Glide3. Note that this disables
|
||||
# compilation of most DMesa code and requires fxMesa.
|
||||
# As a consequence, you'll need the DJGPP Glide3
|
||||
# library to build any application.
|
||||
# default = no
|
||||
# MATROX=1 build for Matrox Millennium I (MGA2064W) cards.
|
||||
# This is experimental and not intensively tested.
|
||||
# default = no
|
||||
# HAVE_X86=1 optimize for i386.
|
||||
# default = no
|
||||
# HAVE_MMX=1 allow MMX specializations, provided your assembler
|
||||
# supports MMX instruction set. However, the true CPU
|
||||
# capabilities are checked at run-time to avoid crashes.
|
||||
# default = no
|
||||
# HAVE_SSE=1 (see HAVE_MMX)
|
||||
# default = no
|
||||
# HAVE_3DNOW=1 (see HAVE_MMX)
|
||||
# default = no
|
||||
#
|
||||
# Targets:
|
||||
# all: build everything
|
||||
# libgl: build GL
|
||||
# libglu: build GLU
|
||||
# libglut: build GLUT
|
||||
# clean: remove object files
|
||||
# realclean: remove all generated files
|
||||
#
|
||||
|
||||
|
||||
|
||||
.PHONY : all libgl libglu libglut clean realclean
|
||||
|
||||
CPU ?= k6
|
||||
|
||||
GLU ?= mesa
|
||||
|
||||
CFLAGS = -Wall -W -pedantic
|
||||
CFLAGS += -O2 -ffast-math -mcpu=$(CPU)
|
||||
|
||||
export CFLAGS
|
||||
|
||||
ifeq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),)
|
||||
UNLINK = del $(subst /,\,$(1))
|
||||
else
|
||||
UNLINK = $(RM) $(1)
|
||||
endif
|
||||
|
||||
all: libgl libglu libglut
|
||||
|
||||
libgl: lib
|
||||
$(MAKE) -f Makefile.DJ -C src/mesa
|
||||
libglu: lib
|
||||
$(MAKE) -f Makefile.DJ -C src/glu/$(GLU)
|
||||
libglut: lib
|
||||
$(MAKE) -f Makefile.DJ -C src/glut/dos
|
||||
|
||||
lib:
|
||||
mkdir lib
|
||||
|
||||
clean:
|
||||
$(MAKE) -f Makefile.DJ clean -C src/mesa
|
||||
$(MAKE) -f Makefile.DJ clean -C src/glu/mesa
|
||||
$(MAKE) -f Makefile.DJ clean -C src/glu/sgi
|
||||
$(MAKE) -f Makefile.DJ clean -C src/glut/dos
|
||||
|
||||
realclean: clean
|
||||
-$(call UNLINK,lib/*.a)
|
||||
-$(call UNLINK,lib/*.dxe)
|
@@ -1,4 +1,4 @@
|
||||
Mesa 5.0.1 DOS/DJGPP Port v1.3
|
||||
Mesa 5.0.1 DOS/DJGPP Port v1.4
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
@@ -32,9 +32,9 @@ Available options:
|
||||
Environment variables:
|
||||
CPU optimize for the given processor.
|
||||
default = k6
|
||||
GLU=[src|si] specify GLU directory; can be `src' (src-glu = Mesa)
|
||||
or `si' (si-glu = SGI's GLU -- requires GNU/C++).
|
||||
default = src
|
||||
GLU=[mesa|sgi] specify GLU directory; can be `sgi' (requires GNU/C++)
|
||||
or `mesa'.
|
||||
default = mesa
|
||||
GLIDE path to Glide3 SDK include files; used with FX.
|
||||
default = $(TOP)/include/glide3
|
||||
FX=1 build for 3dfx Glide3. Note that this disables
|
||||
@@ -67,11 +67,11 @@ Available options:
|
||||
|
||||
|
||||
Tested on:
|
||||
CPU: K6-2 (CXT) @500(412.5) MHz
|
||||
Mainboard: ViA Apollo VP2/97 w/ 128 MB SDRAM
|
||||
Video card: PowerColor EvilKing3 (Voodoo3 3000 PCI) w/ 16 MB SDRAM
|
||||
CPU: AMD Duron @800 MHz
|
||||
Mainboard: EP-8KTA3 w/ 128 MB SDRAM
|
||||
Video card: Voodoo5 5500 AGP w/ 64 MB SDRAM
|
||||
DJGPP: djdev 2.04 + gcc v3.2.2 + make v3.79.1
|
||||
OS: DOS and Win9x
|
||||
OS: DOS and Win98SE
|
||||
|
||||
|
||||
|
||||
@@ -97,19 +97,17 @@ FAQ:
|
||||
Q) `make' complains about DXE3 or something, yet it builds the libraries.
|
||||
A) DXE3 refers to the DJGPP dynamic modules. You'll need either the latest
|
||||
DJGPP distro, or download the separate package from my web page. Read the
|
||||
DXE3 documentation on how to use them. Hint: build your export object
|
||||
file; then link it with your application. For example:
|
||||
dxe3res -o dxe3tbl.c gl.dxe glu.dxe glut.dxe
|
||||
gcc -o dxe3tbl.o -c dxe3tbl.c
|
||||
gcc -o OUT.exe dxe3tbl.o IN.c -liglut -liglu -ligl -ldl
|
||||
DXE3 documentation on how to use them.
|
||||
A) When compiling for Glide (FX=1), make sure `glid3.dxe' can be found in
|
||||
LD_LIBRARY_PATH (or top `lib' directory).
|
||||
|
||||
2. Using Mesa for DJGPP
|
||||
|
||||
Q) DMesa is so SLOOOW! The Win32 OpenGL performs so much better...
|
||||
A) Is that a question? If you have a Voodoo3/Banshee card, you're lucky (the
|
||||
Glide port is on my web page). If you have a Matrox Millennium I card,
|
||||
you just MIGHT be lucky... If you haven't, sorry; everything is done in
|
||||
software. Suggestions?
|
||||
A) Is that a question? If you have a 3dfx Voodoo Banshee or higher card,
|
||||
you're lucky (check http://sourceforge.net/projects/glide for the DJGPP
|
||||
port). If you have a Matrox Millennium I card, you just MIGHT be lucky...
|
||||
If you haven't, sorry; everything is done in software. Suggestions?
|
||||
|
||||
Q) I tried to set refresh rate w/ DMesa, but without success.
|
||||
A) Refresh rate control works only for VESA 3.0. If you were compiling for
|
||||
@@ -215,6 +213,9 @@ v1.3 (mar-2003)
|
||||
* revamped GLUT
|
||||
* switched to DXE3
|
||||
|
||||
v1.4 (jun-2003)
|
||||
* accomodated makefiles with the new sourcetree
|
||||
|
||||
|
||||
|
||||
Contact:
|
||||
|
@@ -20,7 +20,7 @@
|
||||
# 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.
|
||||
|
||||
# DOS/DJGPP samples makefile v1.3 for Mesa
|
||||
# DOS/DJGPP samples makefile v1.4 for Mesa
|
||||
#
|
||||
# Copyright (C) 2002 - Borca Daniel
|
||||
# Email : dborca@yahoo.com
|
||||
@@ -40,9 +40,7 @@
|
||||
# As a consequence, you'll need the DJGPP Glide3
|
||||
# library to build any application.
|
||||
# default = no
|
||||
# DXE=1 use DXE modules. The resolution object file must be
|
||||
# present in the `lib' directory in order to use this
|
||||
# option (see README.DJ for details).
|
||||
# DXE=1 use DXE modules (see README.DJ for details).
|
||||
# default = no
|
||||
#
|
||||
# Targets:
|
||||
@@ -54,21 +52,20 @@
|
||||
.PHONY : all
|
||||
.SUFFIXES : .c .o .exe
|
||||
|
||||
TOP = ..
|
||||
TOP = ../..
|
||||
CPU ?= k6
|
||||
GLIDE ?= $(TOP)/lib/glide3
|
||||
|
||||
CC = gcc
|
||||
CFLAGS = -Wall -W -pedantic
|
||||
CFLAGS += -O2 -ffast-math -mcpu=$(CPU)
|
||||
CFLAGS += -I$(TOP)/include
|
||||
CFLAGS += -I$(TOP)/include -I../util
|
||||
|
||||
LD = gxx
|
||||
LDFLAGS = -s -L$(TOP)/lib
|
||||
|
||||
ifeq ($(DXE),1)
|
||||
DXE3TABLE = $(TOP)/lib/dxe3tbl.o
|
||||
LDLIBS += -liglut -liglu -ligl -ldl
|
||||
LDLIBS += -liglut -liglu -ligl
|
||||
else
|
||||
LDLIBS = -lglut -lglu -lgl
|
||||
ifeq ($(FX),1)
|
||||
@@ -80,7 +77,7 @@ endif
|
||||
.c.o:
|
||||
$(CC) -o $@ $(CFLAGS) -c $<
|
||||
.o.exe:
|
||||
$(LD) -o $@ $(LDFLAGS) $(DXE3TABLE) $< $(LDLIBS)
|
||||
$(LD) -o $@ $(LDFLAGS) $< $(LDLIBS)
|
||||
|
||||
all:
|
||||
$(error Must specify <filename.exe> to build)
|
||||
|
@@ -20,7 +20,7 @@
|
||||
# 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.
|
||||
|
||||
# DOS/DJGPP glu makefile v1.3 for Mesa
|
||||
# DOS/DJGPP glu makefile v1.4 for Mesa
|
||||
#
|
||||
# Copyright (C) 2002 - Borca Daniel
|
||||
# Email : dborca@yahoo.com
|
||||
@@ -42,12 +42,14 @@
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
TOP = ..
|
||||
TOP = ../../..
|
||||
LIBDIR = $(TOP)/lib
|
||||
GLU_LIB = libglu.a
|
||||
GLU_DXE = glu.dxe
|
||||
GLU_IMP = libiglu.a
|
||||
|
||||
export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH);$(LIBDIR)
|
||||
|
||||
CC = gcc
|
||||
CFLAGS += -I$(TOP)/include
|
||||
|
||||
@@ -91,7 +93,7 @@ $(LIBDIR)/$(GLU_DXE) $(LIBDIR)/$(GLU_IMP): $(OBJECTS)
|
||||
ifeq ($(HAVEDXE3),)
|
||||
$(warning Missing DXE3 package... Skipping $(GLU_DXE))
|
||||
else
|
||||
-dxe3gen -o $(LIBDIR)/$(GLU_DXE) -I $(LIBDIR)/$(GLU_IMP) -D "MesaGLU DJGPP" -E _glu -P gl.dxe -U $(OBJECTS)
|
||||
-dxe3gen -o $(LIBDIR)/$(GLU_DXE) -Y $(LIBDIR)/$(GLU_IMP) -D "MesaGLU DJGPP" -E _glu -P gl.dxe -U $(OBJECTS)
|
||||
endif
|
||||
|
||||
clean:
|
||||
|
@@ -20,7 +20,7 @@
|
||||
# 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.
|
||||
|
||||
# DOS/DJGPP glu makefile v1.3 for Mesa
|
||||
# DOS/DJGPP glu makefile v1.4 for Mesa
|
||||
#
|
||||
# Copyright (C) 2002 - Borca Daniel
|
||||
# Email : dborca@yahoo.com
|
||||
@@ -42,12 +42,14 @@
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
TOP = ..
|
||||
TOP = ../../..
|
||||
LIBDIR = $(TOP)/lib
|
||||
GLU_LIB = libglu.a
|
||||
GLU_DXE = glu.dxe
|
||||
GLU_IMP = libiglu.a
|
||||
|
||||
export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH);$(LIBDIR)
|
||||
|
||||
CC = gcc
|
||||
CFLAGS += -DNDEBUG -DLIBRARYBUILD -I$(TOP)/include -Iinclude
|
||||
CXX = gpp
|
||||
@@ -175,7 +177,7 @@ $(LIBDIR)/$(GLU_DXE) $(LIBDIR)/$(GLU_IMP): $(OBJECTS)
|
||||
ifeq ($(HAVEDXE3),)
|
||||
$(warning Missing DXE3 package... Skipping $(GLU_DXE))
|
||||
else
|
||||
-dxe3gen -o $(LIBDIR)/$(GLU_DXE) -I $(LIBDIR)/$(GLU_IMP) -D "MesaGLU/SGI DJGPP" -E _glu -P gl.dxe -U $(OBJECTS)
|
||||
-dxe3gen -o $(LIBDIR)/$(GLU_DXE) -Y $(LIBDIR)/$(GLU_IMP) -D "MesaGLU/SGI DJGPP" -E _glu -P gl.dxe -U $(OBJECTS)
|
||||
endif
|
||||
|
||||
clean:
|
||||
|
@@ -20,7 +20,7 @@
|
||||
# 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.
|
||||
|
||||
# DOS/DJGPP glut makefile v1.3 for Mesa
|
||||
# DOS/DJGPP glut makefile v1.4 for Mesa
|
||||
#
|
||||
# Copyright (C) 2002 - Borca Daniel
|
||||
# Email : dborca@yahoo.com
|
||||
@@ -45,14 +45,16 @@
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
TOP = ..
|
||||
TOP = ../../..
|
||||
GLIDE ?= $(TOP)/include/glide3
|
||||
MKGLUT ?= $(TOP)/src-glut
|
||||
MKGLUT ?= $(TOP)/src/glut/glx
|
||||
LIBDIR = $(TOP)/lib
|
||||
GLUT_LIB = libglut.a
|
||||
GLUT_DXE = glut.dxe
|
||||
GLUT_IMP = libiglut.a
|
||||
|
||||
export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH);$(LIBDIR)
|
||||
|
||||
CC = gcc
|
||||
CFLAGS += -I- -I$(TOP)/include -I. -I$(MKGLUT) -IPC_HW
|
||||
|
||||
@@ -123,7 +125,7 @@ $(LIBDIR)/$(GLUT_DXE) $(LIBDIR)/$(GLUT_IMP): $(OBJECTS)
|
||||
ifeq ($(HAVEDXE3),)
|
||||
$(warning Missing DXE3 package... Skipping $(GLUT_DXE))
|
||||
else
|
||||
-dxe3gen -o $(LIBDIR)/$(GLUT_DXE) -I $(LIBDIR)/$(GLUT_IMP) -D "MesaGLUT DJGPP" -E _glut -P gl.dxe -P glu.dxe -U $(OBJECTS)
|
||||
-dxe3gen -o $(LIBDIR)/$(GLUT_DXE) -Y $(LIBDIR)/$(GLUT_IMP) -D "MesaGLUT DJGPP" -E _glut -P gl.dxe -P glu.dxe -U $(OBJECTS)
|
||||
endif
|
||||
|
||||
clean:
|
||||
|
@@ -20,7 +20,7 @@
|
||||
# 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.
|
||||
|
||||
# DOS/DJGPP core makefile v1.3 for Mesa
|
||||
# DOS/DJGPP core makefile v1.4 for Mesa
|
||||
#
|
||||
# Copyright (C) 2002 - Borca Daniel
|
||||
# Email : dborca@yahoo.com
|
||||
@@ -62,17 +62,19 @@
|
||||
|
||||
|
||||
.PHONY: all clean
|
||||
.INTERMEDIATE: X86/gen_matypes.exe
|
||||
.INTERMEDIATE: x86/gen_matypes.exe
|
||||
|
||||
TOP = ..
|
||||
TOP = ../..
|
||||
GLIDE ?= $(TOP)/include/glide3
|
||||
LIBDIR = $(TOP)/lib
|
||||
GL_LIB = libgl.a
|
||||
GL_DXE = gl.dxe
|
||||
GL_IMP = libigl.a
|
||||
|
||||
export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH);$(LIBDIR)
|
||||
|
||||
CC = gcc
|
||||
CFLAGS += -I$(TOP)/include -I.
|
||||
CFLAGS += -I$(TOP)/include -I. -Imain -Iglapi
|
||||
ifeq ($(FX),1)
|
||||
CFLAGS += -D__DOS__ -DH3
|
||||
CFLAGS += -I$(GLIDE) -DFX -DFX_GLIDE3 -DFXMESA_USE_ARGB
|
||||
@@ -97,62 +99,67 @@ else
|
||||
UNLINK = $(RM) $(1)
|
||||
endif
|
||||
|
||||
CORE_SOURCES = \
|
||||
api_arrayelt.c \
|
||||
api_loopback.c \
|
||||
api_noop.c \
|
||||
api_validate.c \
|
||||
accum.c \
|
||||
arbprogram.c \
|
||||
attrib.c \
|
||||
blend.c \
|
||||
bufferobj.c \
|
||||
buffers.c \
|
||||
clip.c \
|
||||
colortab.c \
|
||||
context.c \
|
||||
convolve.c \
|
||||
debug.c \
|
||||
depth.c \
|
||||
dispatch.c \
|
||||
dlist.c \
|
||||
drawpix.c \
|
||||
enable.c \
|
||||
enums.c \
|
||||
eval.c \
|
||||
extensions.c \
|
||||
feedback.c \
|
||||
fog.c \
|
||||
get.c \
|
||||
glapi.c \
|
||||
glthread.c \
|
||||
hash.c \
|
||||
hint.c \
|
||||
histogram.c \
|
||||
image.c \
|
||||
imports.c \
|
||||
light.c \
|
||||
lines.c \
|
||||
matrix.c \
|
||||
mmath.c \
|
||||
pixel.c \
|
||||
points.c \
|
||||
polygon.c \
|
||||
rastpos.c \
|
||||
state.c \
|
||||
stencil.c \
|
||||
texcompress.c \
|
||||
texformat.c \
|
||||
teximage.c \
|
||||
texobj.c \
|
||||
texstate.c \
|
||||
texstore.c \
|
||||
texutil.c \
|
||||
varray.c \
|
||||
vpexec.c \
|
||||
vpparse.c \
|
||||
vpstate.c \
|
||||
vtxfmt.c \
|
||||
MAIN_SOURCES = \
|
||||
main/api_arrayelt.c \
|
||||
main/api_loopback.c \
|
||||
main/api_noop.c \
|
||||
main/api_validate.c \
|
||||
main/accum.c \
|
||||
main/arbprogram.c \
|
||||
main/attrib.c \
|
||||
main/blend.c \
|
||||
main/bufferobj.c \
|
||||
main/buffers.c \
|
||||
main/clip.c \
|
||||
main/colortab.c \
|
||||
main/context.c \
|
||||
main/convolve.c \
|
||||
main/debug.c \
|
||||
main/depth.c \
|
||||
main/dispatch.c \
|
||||
main/dlist.c \
|
||||
main/drawpix.c \
|
||||
main/enable.c \
|
||||
main/enums.c \
|
||||
main/eval.c \
|
||||
main/extensions.c \
|
||||
main/feedback.c \
|
||||
main/fog.c \
|
||||
main/get.c \
|
||||
main/hash.c \
|
||||
main/hint.c \
|
||||
main/histogram.c \
|
||||
main/image.c \
|
||||
main/imports.c \
|
||||
main/light.c \
|
||||
main/lines.c \
|
||||
main/matrix.c \
|
||||
main/nvprogram.c \
|
||||
main/nvfragparse.c \
|
||||
main/nvvertexec.c \
|
||||
main/nvvertparse.c \
|
||||
main/occlude.c \
|
||||
main/pixel.c \
|
||||
main/points.c \
|
||||
main/polygon.c \
|
||||
main/rastpos.c \
|
||||
main/state.c \
|
||||
main/stencil.c \
|
||||
main/texcompress.c \
|
||||
main/texformat.c \
|
||||
main/teximage.c \
|
||||
main/texobj.c \
|
||||
main/texstate.c \
|
||||
main/texstore.c \
|
||||
main/texutil.c \
|
||||
main/varray.c \
|
||||
main/vtxfmt.c
|
||||
|
||||
GLAPI_SOURCES = \
|
||||
glapi/glapi.c \
|
||||
glapi/glthread.c
|
||||
|
||||
MATH_SOURCES = \
|
||||
math/m_debug_clip.c \
|
||||
math/m_debug_norm.c \
|
||||
math/m_debug_xform.c \
|
||||
@@ -160,9 +167,13 @@ CORE_SOURCES = \
|
||||
math/m_matrix.c \
|
||||
math/m_translate.c \
|
||||
math/m_vector.c \
|
||||
math/m_xform.c \
|
||||
math/m_xform.c
|
||||
|
||||
ARRAY_CACHE_SOURCES = \
|
||||
array_cache/ac_context.c \
|
||||
array_cache/ac_import.c \
|
||||
array_cache/ac_import.c
|
||||
|
||||
SWRAST_SOURCES = \
|
||||
swrast/s_aaline.c \
|
||||
swrast/s_aatriangle.c \
|
||||
swrast/s_accum.c \
|
||||
@@ -177,11 +188,11 @@ CORE_SOURCES = \
|
||||
swrast/s_drawpix.c \
|
||||
swrast/s_feedback.c \
|
||||
swrast/s_fog.c \
|
||||
swrast/s_histogram.c \
|
||||
swrast/s_imaging.c \
|
||||
swrast/s_lines.c \
|
||||
swrast/s_logic.c \
|
||||
swrast/s_masking.c \
|
||||
swrast/s_nvfragprog.c \
|
||||
swrast/s_pixeltex.c \
|
||||
swrast/s_points.c \
|
||||
swrast/s_readpix.c \
|
||||
@@ -190,10 +201,14 @@ CORE_SOURCES = \
|
||||
swrast/s_texture.c \
|
||||
swrast/s_texstore.c \
|
||||
swrast/s_triangle.c \
|
||||
swrast/s_zoom.c \
|
||||
swrast/s_zoom.c
|
||||
|
||||
SWRAST_SETUP_SOURCES = \
|
||||
swrast_setup/ss_context.c \
|
||||
swrast_setup/ss_triangle.c \
|
||||
swrast_setup/ss_vb.c \
|
||||
swrast_setup/ss_vb.c
|
||||
|
||||
TNL_SOURCES = \
|
||||
tnl/t_array_api.c \
|
||||
tnl/t_array_import.c \
|
||||
tnl/t_context.c \
|
||||
@@ -218,31 +233,40 @@ CORE_SOURCES = \
|
||||
tnl/t_vb_vertex.c
|
||||
|
||||
X86_SOURCES = \
|
||||
X86/x86.c \
|
||||
X86/glapi_x86.S \
|
||||
X86/common_x86.c \
|
||||
X86/common_x86_asm.S \
|
||||
X86/x86_xform2.S \
|
||||
X86/x86_xform3.S \
|
||||
X86/x86_xform4.S \
|
||||
X86/x86_cliptest.S
|
||||
x86/x86.c \
|
||||
x86/glapi_x86.S \
|
||||
x86/common_x86.c \
|
||||
x86/common_x86_asm.S \
|
||||
x86/x86_xform2.S \
|
||||
x86/x86_xform3.S \
|
||||
x86/x86_xform4.S \
|
||||
x86/x86_cliptest.S
|
||||
|
||||
MMX_SOURCES = \
|
||||
X86/mmx_blend.S
|
||||
x86/mmx_blend.S
|
||||
|
||||
SSE_SOURCES = \
|
||||
X86/sse.c \
|
||||
X86/sse_xform2.S \
|
||||
X86/sse_xform3.S \
|
||||
X86/sse_xform4.S \
|
||||
X86/sse_normal.S
|
||||
x86/sse.c \
|
||||
x86/sse_xform2.S \
|
||||
x86/sse_xform3.S \
|
||||
x86/sse_xform4.S \
|
||||
x86/sse_normal.S
|
||||
|
||||
K3D_SOURCES = \
|
||||
X86/3dnow.c \
|
||||
X86/3dnow_xform2.S \
|
||||
X86/3dnow_xform3.S \
|
||||
X86/3dnow_xform4.S \
|
||||
X86/3dnow_normal.S
|
||||
x86/3dnow.c \
|
||||
x86/3dnow_xform2.S \
|
||||
x86/3dnow_xform3.S \
|
||||
x86/3dnow_xform4.S \
|
||||
x86/3dnow_normal.S
|
||||
|
||||
CORE_SOURCES = \
|
||||
$(MAIN_SOURCES) \
|
||||
$(GLAPI_SOURCES) \
|
||||
$(MATH_SOURCES) \
|
||||
$(ARRAY_CACHE_SOURCES) \
|
||||
$(SWRAST_SOURCES) \
|
||||
$(SWRAST_SETUP_SOURCES) \
|
||||
$(TNL_SOURCES)
|
||||
|
||||
ifeq ($(HAVE_MMX),1)
|
||||
X86_SOURCES += $(MMX_SOURCES)
|
||||
@@ -266,33 +290,33 @@ X86_SOURCES =
|
||||
endif
|
||||
|
||||
DRIVER_SOURCES = \
|
||||
DOS/dmesa.c
|
||||
drivers/dos/dmesa.c
|
||||
ifeq ($(FX),1)
|
||||
DRIVER_SOURCES += \
|
||||
FX/fxapi.c \
|
||||
FX/fxdd.c \
|
||||
FX/fxddspan.c \
|
||||
FX/fxddtex.c \
|
||||
FX/fxsetup.c \
|
||||
FX/fxtexman.c \
|
||||
FX/fxtris.c \
|
||||
FX/fxvb.c \
|
||||
FX/fxglidew.c
|
||||
drivers/glide/fxapi.c \
|
||||
drivers/glide/fxdd.c \
|
||||
drivers/glide/fxddspan.c \
|
||||
drivers/glide/fxddtex.c \
|
||||
drivers/glide/fxsetup.c \
|
||||
drivers/glide/fxtexman.c \
|
||||
drivers/glide/fxtris.c \
|
||||
drivers/glide/fxvb.c \
|
||||
drivers/glide/fxglidew.c
|
||||
else
|
||||
ifeq ($(MATROX),1)
|
||||
DRIVER_SOURCES += \
|
||||
DOS/mga/mga.c \
|
||||
DOS/mga/mga_hw.c \
|
||||
DOS/mga/mga_mode.c \
|
||||
DOS/dpmi.c
|
||||
drivers/dos/mga/mga.c \
|
||||
drivers/dos/mga/mga_hw.c \
|
||||
drivers/dos/mga/mga_mode.c \
|
||||
drivers/dos/dpmi.c
|
||||
else
|
||||
DRIVER_SOURCES += \
|
||||
DOS/video.c \
|
||||
DOS/virtual.S \
|
||||
DOS/vesa.c \
|
||||
DOS/blit.S \
|
||||
DOS/vga.c \
|
||||
DOS/dpmi.c
|
||||
drivers/dos/video.c \
|
||||
drivers/dos/virtual.S \
|
||||
drivers/dos/vesa.c \
|
||||
drivers/dos/blit.S \
|
||||
drivers/dos/vga.c \
|
||||
drivers/dos/dpmi.c
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -319,30 +343,31 @@ ifeq ($(HAVEDXE3),)
|
||||
$(warning Missing DXE3 package... Skipping $(GL_DXE))
|
||||
else
|
||||
ifeq ($(FX),1)
|
||||
-dxe3gen -o $(LIBDIR)/$(GL_DXE) -I $(LIBDIR)/$(GL_IMP) -D $(LIBNAME) -E _gl -E _DMesa -P glid3.dxe -U $(OBJECTS)
|
||||
-dxe3gen -o $(LIBDIR)/$(GL_DXE) -Y $(LIBDIR)/$(GL_IMP) -D $(LIBNAME) -E _gl -E _DMesa -P glid3.dxe -U $(OBJECTS)
|
||||
else
|
||||
-dxe3gen -o $(LIBDIR)/$(GL_DXE) -I $(LIBDIR)/$(GL_IMP) -D $(LIBNAME) -E _gl -E _DMesa -U $(OBJECTS)
|
||||
-dxe3gen -o $(LIBDIR)/$(GL_DXE) -Y $(LIBDIR)/$(GL_IMP) -D $(LIBNAME) -E _gl -E _DMesa -U $(OBJECTS)
|
||||
endif
|
||||
endif
|
||||
|
||||
$(X86_OBJECTS): X86/matypes.h
|
||||
$(X86_OBJECTS): x86/matypes.h
|
||||
|
||||
X86/matypes.h: X86/gen_matypes.exe
|
||||
x86/matypes.h: x86/gen_matypes.exe
|
||||
$< > $@
|
||||
|
||||
X86/gen_matypes.exe: X86/gen_matypes.c
|
||||
x86/gen_matypes.exe: x86/gen_matypes.c
|
||||
$(CC) -o $@ $(CFLAGS) -s $<
|
||||
|
||||
clean:
|
||||
-$(call UNLINK,*.o)
|
||||
-$(call UNLINK,array_cache/*.o)
|
||||
-$(call UNLINK,glapi/*.o)
|
||||
-$(call UNLINK,main/*.o)
|
||||
-$(call UNLINK,math/*.o)
|
||||
-$(call UNLINK,swrast/*.o)
|
||||
-$(call UNLINK,swrast_setup/*.o)
|
||||
-$(call UNLINK,tnl/*.o)
|
||||
-$(call UNLINK,X86/*.o)
|
||||
-$(call UNLINK,DOS/*.o)
|
||||
-$(call UNLINK,DOS/mga/*.o)
|
||||
-$(call UNLINK,FX/*.o)
|
||||
-$(call UNLINK,x86/*.o)
|
||||
-$(call UNLINK,drivers/dos/*.o)
|
||||
-$(call UNLINK,drivers/dos/mga/*.o)
|
||||
-$(call UNLINK,drivers/glide/*.o)
|
||||
|
||||
-include depend
|
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* DOS/DJGPP device driver v1.3 for Mesa
|
||||
* DOS/DJGPP device driver v1.4 for Mesa
|
||||
*
|
||||
* Copyright (c) 2003 - Borca Daniel
|
||||
* Email : dborca@yahoo.com
|
||||
@@ -37,15 +37,16 @@
|
||||
#include "extensions.h"
|
||||
#include "macros.h"
|
||||
#include "matrix.h"
|
||||
#include "mmath.h"
|
||||
#include "mtypes.h"
|
||||
#include "texformat.h"
|
||||
#include "teximage.h"
|
||||
#include "texstore.h"
|
||||
#include "imports.h"
|
||||
#include "array_cache/acache.h"
|
||||
#include "swrast/s_context.h"
|
||||
#include "swrast/s_depth.h"
|
||||
#include "swrast/s_lines.h"
|
||||
#include "swrast/s_triangle.h"
|
||||
#include "swrast/s_trispan.h"
|
||||
#include "swrast/swrast.h"
|
||||
#include "swrast_setup/swrast_setup.h"
|
||||
#include "tnl/tnl.h"
|
||||
@@ -57,7 +58,7 @@
|
||||
#include "mga/mga.h"
|
||||
#endif /* MATROX */
|
||||
#else /* FX */
|
||||
#include "../FX/fxdrv.h"
|
||||
#include "../glide/fxdrv.h"
|
||||
#endif /* FX */
|
||||
|
||||
#include "GL/dmesa.h"
|
||||
@@ -568,17 +569,15 @@ static void read_depth_pixels (GLcontext *ctx, GLuint n,
|
||||
/*
|
||||
* NON-depth-buffered flat triangle.
|
||||
*/
|
||||
static void tri_rgb_flat (GLcontext *ctx,
|
||||
const SWvertex *v0,
|
||||
const SWvertex *v1,
|
||||
const SWvertex *v2)
|
||||
{
|
||||
const DMesaContext dmesa = (DMesaContext)ctx;
|
||||
GLuint _b_ = dmesa->Buffer->height - 1;
|
||||
#ifndef MATROX
|
||||
GLuint _w_ = dmesa->Buffer->width;
|
||||
|
||||
#define SETUP_CODE GLuint rgb = vl_mixrgb(v2->color);
|
||||
#define NAME tri_rgb_flat
|
||||
|
||||
#define SETUP_CODE \
|
||||
const DMesaContext dmesa = (DMesaContext)ctx; \
|
||||
GLuint _b_ = dmesa->Buffer->height - 1; \
|
||||
GLuint _w_ = dmesa->Buffer->width; \
|
||||
GLuint rgb = vl_mixrgb(v2->color);
|
||||
|
||||
#define RENDER_SPAN(span) \
|
||||
GLuint i, offset = FLIP2(span.y)*_w_ + span.x; \
|
||||
@@ -587,7 +586,16 @@ static void tri_rgb_flat (GLcontext *ctx,
|
||||
}
|
||||
|
||||
#include "swrast/s_tritemp.h"
|
||||
|
||||
#else /* MATROX */
|
||||
|
||||
static void tri_rgb_flat (GLcontext *ctx,
|
||||
const SWvertex *v0,
|
||||
const SWvertex *v1,
|
||||
const SWvertex *v2)
|
||||
{
|
||||
const DMesaContext dmesa = (DMesaContext)ctx;
|
||||
GLuint _b_ = dmesa->Buffer->height - 1;
|
||||
MGAvertex m0, m1, m2;
|
||||
m0.win[0] = v0->win[0];
|
||||
m0.win[1] = FLIP2(v0->win[1]);
|
||||
@@ -597,27 +605,26 @@ static void tri_rgb_flat (GLcontext *ctx,
|
||||
m2.win[1] = FLIP2(v2->win[1]);
|
||||
*(unsigned long *)m2.color = *(unsigned long *)v2->color;
|
||||
mga_draw_tri_rgb_flat((int)SWRAST_CONTEXT(ctx)->_backface_sign, &m0, &m1, &m2);
|
||||
#endif /* MATROX */
|
||||
}
|
||||
#endif /* MATROX */
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Z-less flat triangle.
|
||||
*/
|
||||
static void tri_rgb_flat_zless (GLcontext *ctx,
|
||||
const SWvertex *v0,
|
||||
const SWvertex *v1,
|
||||
const SWvertex *v2)
|
||||
{
|
||||
const DMesaContext dmesa = (DMesaContext)ctx;
|
||||
GLuint _b_ = dmesa->Buffer->height - 1;
|
||||
#ifndef MATROX
|
||||
GLuint _w_ = dmesa->Buffer->width;
|
||||
|
||||
#define NAME tri_rgb_flat_zless
|
||||
|
||||
#define INTERP_Z 1
|
||||
#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE
|
||||
#define SETUP_CODE GLuint rgb = vl_mixrgb(v2->color);
|
||||
|
||||
#define SETUP_CODE \
|
||||
const DMesaContext dmesa = (DMesaContext)ctx; \
|
||||
GLuint _b_ = dmesa->Buffer->height - 1; \
|
||||
GLuint _w_ = dmesa->Buffer->width; \
|
||||
GLuint rgb = vl_mixrgb(v2->color);
|
||||
|
||||
#define RENDER_SPAN(span) \
|
||||
GLuint i, offset = FLIP2(span.y)*_w_ + span.x; \
|
||||
@@ -631,7 +638,16 @@ static void tri_rgb_flat_zless (GLcontext *ctx,
|
||||
}
|
||||
|
||||
#include "swrast/s_tritemp.h"
|
||||
|
||||
#else /* MATROX */
|
||||
|
||||
static void tri_rgb_flat_zless (GLcontext *ctx,
|
||||
const SWvertex *v0,
|
||||
const SWvertex *v1,
|
||||
const SWvertex *v2)
|
||||
{
|
||||
const DMesaContext dmesa = (DMesaContext)ctx;
|
||||
GLuint _b_ = dmesa->Buffer->height - 1;
|
||||
MGAvertex m0, m1, m2;
|
||||
m0.win[0] = v0->win[0];
|
||||
m0.win[1] = FLIP2(v0->win[1]);
|
||||
@@ -644,25 +660,25 @@ static void tri_rgb_flat_zless (GLcontext *ctx,
|
||||
m2.win[2] = v2->win[2];
|
||||
*(unsigned long *)m2.color = *(unsigned long *)v2->color;
|
||||
mga_draw_tri_rgb_flat_zless((int)SWRAST_CONTEXT(ctx)->_backface_sign, &m0, &m1, &m2);
|
||||
#endif /* MATROX */
|
||||
}
|
||||
#endif /* MATROX */
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* NON-depth-buffered iterated triangle.
|
||||
*/
|
||||
static void tri_rgb_iter (GLcontext *ctx,
|
||||
const SWvertex *v0,
|
||||
const SWvertex *v1,
|
||||
const SWvertex *v2)
|
||||
{
|
||||
const DMesaContext dmesa = (DMesaContext)ctx;
|
||||
GLuint _b_ = dmesa->Buffer->height - 1;
|
||||
#ifndef MATROX
|
||||
GLuint _w_ = dmesa->Buffer->width;
|
||||
|
||||
#define NAME tri_rgb_iter
|
||||
|
||||
#define INTERP_RGB 1
|
||||
|
||||
#define SETUP_CODE \
|
||||
const DMesaContext dmesa = (DMesaContext)ctx; \
|
||||
GLuint _b_ = dmesa->Buffer->height - 1; \
|
||||
GLuint _w_ = dmesa->Buffer->width;
|
||||
|
||||
#define RENDER_SPAN(span) \
|
||||
GLuint i, offset = FLIP2(span.y)*_w_ + span.x; \
|
||||
for (i = 0; i < span.end; i++, offset++) { \
|
||||
@@ -673,7 +689,16 @@ static void tri_rgb_iter (GLcontext *ctx,
|
||||
}
|
||||
|
||||
#include "swrast/s_tritemp.h"
|
||||
|
||||
#else /* MATROX */
|
||||
|
||||
static void tri_rgb_iter (GLcontext *ctx,
|
||||
const SWvertex *v0,
|
||||
const SWvertex *v1,
|
||||
const SWvertex *v2)
|
||||
{
|
||||
const DMesaContext dmesa = (DMesaContext)ctx;
|
||||
GLuint _b_ = dmesa->Buffer->height - 1;
|
||||
MGAvertex m0, m1, m2;
|
||||
m0.win[0] = v0->win[0];
|
||||
m0.win[1] = FLIP2(v0->win[1]);
|
||||
@@ -685,28 +710,27 @@ static void tri_rgb_iter (GLcontext *ctx,
|
||||
*(unsigned long *)m1.color = *(unsigned long *)v1->color;
|
||||
*(unsigned long *)m2.color = *(unsigned long *)v2->color;
|
||||
mga_draw_tri_rgb_iter((int)SWRAST_CONTEXT(ctx)->_backface_sign, &m0, &m1, &m2);
|
||||
#endif /* MATROX */
|
||||
}
|
||||
#endif /* MATROX */
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Z-less iterated triangle.
|
||||
*/
|
||||
static void tri_rgb_iter_zless (GLcontext *ctx,
|
||||
const SWvertex *v0,
|
||||
const SWvertex *v1,
|
||||
const SWvertex *v2)
|
||||
{
|
||||
const DMesaContext dmesa = (DMesaContext)ctx;
|
||||
GLuint _b_ = dmesa->Buffer->height - 1;
|
||||
#ifndef MATROX
|
||||
GLuint _w_ = dmesa->Buffer->width;
|
||||
|
||||
#define NAME tri_rgb_iter_zless
|
||||
|
||||
#define INTERP_Z 1
|
||||
#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE
|
||||
#define INTERP_RGB 1
|
||||
|
||||
#define SETUP_CODE \
|
||||
const DMesaContext dmesa = (DMesaContext)ctx; \
|
||||
GLuint _b_ = dmesa->Buffer->height - 1; \
|
||||
GLuint _w_ = dmesa->Buffer->width;
|
||||
|
||||
#define RENDER_SPAN(span) \
|
||||
GLuint i, offset = FLIP2(span.y)*_w_ + span.x; \
|
||||
for (i = 0; i < span.end; i++, offset++) { \
|
||||
@@ -722,7 +746,16 @@ static void tri_rgb_iter_zless (GLcontext *ctx,
|
||||
}
|
||||
|
||||
#include "swrast/s_tritemp.h"
|
||||
|
||||
#else /* MATROX */
|
||||
|
||||
static void tri_rgb_iter_zless (GLcontext *ctx,
|
||||
const SWvertex *v0,
|
||||
const SWvertex *v1,
|
||||
const SWvertex *v2)
|
||||
{
|
||||
const DMesaContext dmesa = (DMesaContext)ctx;
|
||||
GLuint _b_ = dmesa->Buffer->height - 1;
|
||||
MGAvertex m0, m1, m2;
|
||||
m0.win[0] = v0->win[0];
|
||||
m0.win[1] = FLIP2(v0->win[1]);
|
||||
@@ -737,8 +770,8 @@ static void tri_rgb_iter_zless (GLcontext *ctx,
|
||||
*(unsigned long *)m1.color = *(unsigned long *)v1->color;
|
||||
*(unsigned long *)m2.color = *(unsigned long *)v2->color;
|
||||
mga_draw_tri_rgb_iter_zless((int)SWRAST_CONTEXT(ctx)->_backface_sign, &m0, &m1, &m2);
|
||||
#endif /* MATROX */
|
||||
}
|
||||
#endif /* MATROX */
|
||||
|
||||
|
||||
|
||||
@@ -826,48 +859,58 @@ static __inline void matrox_line_clip_hack (GLcontext *ctx, int _b_, MGAvertex *
|
||||
/*
|
||||
* NON-depth-buffered flat line.
|
||||
*/
|
||||
#ifndef MATROX
|
||||
|
||||
#define NAME line_rgb_flat
|
||||
|
||||
#define INTERP_XY 1
|
||||
#define CLIP_HACK 1
|
||||
|
||||
#define SETUP_CODE \
|
||||
const DMesaContext dmesa = (DMesaContext)ctx; \
|
||||
GLuint _b_ = dmesa->Buffer->height - 1; \
|
||||
GLuint _w_ = dmesa->Buffer->width; \
|
||||
GLuint rgb = vl_mixrgb(vert1->color);
|
||||
|
||||
#define PLOT(X,Y) vl_putpixel(FLIP2(Y) * _w_ + X, rgb);
|
||||
|
||||
#include "swrast/s_linetemp.h"
|
||||
|
||||
#else /* MATROX */
|
||||
|
||||
static void line_rgb_flat (GLcontext *ctx,
|
||||
const SWvertex *vert0,
|
||||
const SWvertex *vert1)
|
||||
{
|
||||
const DMesaContext dmesa = (DMesaContext)ctx;
|
||||
GLuint _b_ = dmesa->Buffer->height - 1;
|
||||
#ifndef MATROX
|
||||
GLuint _w_ = dmesa->Buffer->width;
|
||||
GLuint rgb = vl_mixrgb(vert1->color);
|
||||
|
||||
#define INTERP_XY 1
|
||||
#define CLIP_HACK 1
|
||||
#define PLOT(X,Y) vl_putpixel(FLIP2(Y) * _w_ + X, rgb);
|
||||
|
||||
#include "swrast/s_linetemp.h"
|
||||
#else
|
||||
MGAvertex m0, m1;
|
||||
matrox_line_clip_hack(ctx, _b_, &m0, vert0, &m1, vert1);
|
||||
*(unsigned long *)m1.color = *(unsigned long *)vert1->color;
|
||||
mga_draw_line_rgb_flat(&m0, &m1);
|
||||
#endif
|
||||
}
|
||||
#endif /* MATROX */
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Z-less flat line.
|
||||
*/
|
||||
static void line_rgb_flat_zless (GLcontext *ctx,
|
||||
const SWvertex *vert0,
|
||||
const SWvertex *vert1)
|
||||
{
|
||||
const DMesaContext dmesa = (DMesaContext)ctx;
|
||||
GLuint _b_ = dmesa->Buffer->height - 1;
|
||||
#ifndef MATROX
|
||||
GLuint _w_ = dmesa->Buffer->width;
|
||||
GLuint rgb = vl_mixrgb(vert1->color);
|
||||
|
||||
#define NAME line_rgb_flat_zless
|
||||
|
||||
#define INTERP_XY 1
|
||||
#define INTERP_Z 1
|
||||
#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE
|
||||
#define CLIP_HACK 1
|
||||
|
||||
#define SETUP_CODE \
|
||||
const DMesaContext dmesa = (DMesaContext)ctx; \
|
||||
GLuint _b_ = dmesa->Buffer->height - 1; \
|
||||
GLuint _w_ = dmesa->Buffer->width; \
|
||||
GLuint rgb = vl_mixrgb(vert1->color);
|
||||
|
||||
#define PLOT(X,Y) \
|
||||
if (Z < *zPtr) { \
|
||||
*zPtr = Z; \
|
||||
@@ -875,15 +918,23 @@ static void line_rgb_flat_zless (GLcontext *ctx,
|
||||
}
|
||||
|
||||
#include "swrast/s_linetemp.h"
|
||||
#else
|
||||
|
||||
#else /* MATROX */
|
||||
|
||||
static void line_rgb_flat_zless (GLcontext *ctx,
|
||||
const SWvertex *vert0,
|
||||
const SWvertex *vert1)
|
||||
{
|
||||
const DMesaContext dmesa = (DMesaContext)ctx;
|
||||
GLuint _b_ = dmesa->Buffer->height - 1;
|
||||
MGAvertex m0, m1;
|
||||
matrox_line_clip_hack(ctx, _b_, &m0, vert0, &m1, vert1);
|
||||
m0.win[2] = vert0->win[2];
|
||||
m1.win[2] = vert1->win[2];
|
||||
*(unsigned long *)m1.color = *(unsigned long *)vert1->color;
|
||||
mga_draw_line_rgb_flat_zless(&m0, &m1);
|
||||
#endif
|
||||
}
|
||||
#endif /* MATROX */
|
||||
|
||||
|
||||
|
||||
|
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* DOS/DJGPP device driver v1.3 for Mesa
|
||||
* DOS/DJGPP device driver v1.4 for Mesa
|
||||
*
|
||||
* Copyright (C) 2002 - Borca Daniel
|
||||
* Email : dborca@yahoo.com
|
||||
@@ -140,8 +140,8 @@ void _remove_selector (int *segment)
|
||||
int _can_mmx (void)
|
||||
{
|
||||
#ifdef USE_MMX_ASM
|
||||
extern int _mesa_identify_x86_cpu_features (void);
|
||||
return (_mesa_identify_x86_cpu_features() & 0x00800000);
|
||||
extern int _mesa_x86_cpu_features;
|
||||
return (_mesa_x86_cpu_features & 0x00800000);
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
|
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* DOS/DJGPP device driver v1.3 for Mesa
|
||||
* DOS/DJGPP device driver v1.4 for Mesa
|
||||
*
|
||||
* Copyright (C) 2002 - Borca Daniel
|
||||
* Email : dborca@yahoo.com
|
||||
@@ -34,7 +34,7 @@
|
||||
#ifndef INTERNAL_H_included
|
||||
#define INTERNAL_H_included
|
||||
|
||||
#include "../mmath.h"
|
||||
#include "../main/mtypes.h"
|
||||
|
||||
/*
|
||||
* general purpose defines, etc.
|
||||
|
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* DOS/DJGPP device driver v1.3 for Mesa -- MGA2064W HW mapping
|
||||
* DOS/DJGPP device driver v1.4 for Mesa -- MGA2064W HW mapping
|
||||
*
|
||||
* Copyright (c) 2003 - Borca Daniel
|
||||
* Email : dborca@yahoo.com
|
||||
@@ -248,7 +248,7 @@ int mga_hw_init (unsigned long *vram, int *interleave, char *name)
|
||||
dirty = FALSE;
|
||||
} else {
|
||||
if (__djgpp_nearptr_enable() == 0)
|
||||
return NULL;
|
||||
return 0;
|
||||
|
||||
dirty = TRUE;
|
||||
}
|
||||
@@ -298,7 +298,7 @@ int mga_hw_init (unsigned long *vram, int *interleave, char *name)
|
||||
}
|
||||
|
||||
if (!linear_base || !io_mem_base[0])
|
||||
return NULL;
|
||||
return 0;
|
||||
|
||||
/* deal with the memory mapping crap */
|
||||
io_mem_size[0] = 0x4000;
|
||||
@@ -307,7 +307,7 @@ int mga_hw_init (unsigned long *vram, int *interleave, char *name)
|
||||
if (io_mem_base[i]) {
|
||||
if (_create_mmap(&mgaptr.io_mem_map[i], io_mem_base[i], io_mem_size[i])) {
|
||||
mga_hw_fini();
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -316,7 +316,7 @@ int mga_hw_init (unsigned long *vram, int *interleave, char *name)
|
||||
|
||||
if (_create_mmap(&mgaptr.linear_map, linear_base, linear_size)) {
|
||||
mga_hw_fini();
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* fill in user data */
|
||||
|
Reference in New Issue
Block a user