hopefully bring everything in line now.
This commit is contained in:
@@ -30,4 +30,3 @@ Here are a few notes about building Glide3x from CVS.
|
||||
is also shared with the glide2x branch. N.B.: If you use the CVS
|
||||
module Glide3, swlibs will be in the right place, and does not
|
||||
need to be moved.
|
||||
|
||||
|
||||
@@ -27,9 +27,6 @@ cpudtect.asm Page 1 - 1
|
||||
;; Syncing up with 3dfx internal source repository. These changes contain a
|
||||
;; number of bug fixes.
|
||||
;;
|
||||
;; Revision 1.2.2.1 2000/11/16 19:32:33 alanh
|
||||
;; merge trunk into 64bit branch.
|
||||
;;
|
||||
;; Revision 1.1 2000/06/15 00:27:42 joseph
|
||||
;; Initial checkin into SourceForge.
|
||||
;;
|
||||
|
||||
@@ -1,18 +1,21 @@
|
||||
/*
|
||||
** Copyright (c) 1997, 3Dfx Interactive, Inc.
|
||||
** All Rights Reserved.
|
||||
**
|
||||
** This is UNPUBLISHED PROPRIETARY SOURCE CODE of 3Dfx Interactive, Inc.;
|
||||
** the contents of this file may not be disclosed to third parties, copied or
|
||||
** duplicated in any form, in whole or in part, without the prior written
|
||||
** permission of 3Dfx Interactive, Inc.
|
||||
**
|
||||
** RESTRICTED RIGHTS LEGEND:
|
||||
** Use, duplication or disclosure by the Government is subject to restrictions
|
||||
** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
|
||||
** and Computer Software clause at DFARS 252.227-7013, and/or in similar or
|
||||
** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
|
||||
** rights reserved under the Copyright Laws of the United States.
|
||||
** THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY
|
||||
** PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT
|
||||
** TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX
|
||||
** INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE
|
||||
** DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com).
|
||||
** THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
** EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A
|
||||
** FULL TEXT OF THE NON-WARRANTY PROVISIONS.
|
||||
**
|
||||
** USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO
|
||||
** RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN
|
||||
** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013,
|
||||
** AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR
|
||||
** SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF
|
||||
** THE UNITED STATES.
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Header$
|
||||
** $Log:
|
||||
|
||||
@@ -604,7 +604,7 @@ GR_ENTRY(grLfbLock, FxBool,(GrLock_t type, GrBuffer_t buffer,
|
||||
/* Get the current lfb buffer */
|
||||
{
|
||||
/* FixMe: Is this true if we're triple buffering? */
|
||||
FxU32 colBufferIndex;
|
||||
FxU32 colBufferIndex = 0;
|
||||
|
||||
switch(buffer) {
|
||||
case GR_BUFFER_FRONTBUFFER:
|
||||
@@ -644,15 +644,17 @@ GR_ENTRY(grLfbLock, FxBool,(GrLock_t type, GrBuffer_t buffer,
|
||||
|
||||
if (rv) {
|
||||
#ifdef __linux__
|
||||
if (!colBufferIndex)
|
||||
info->strideInBytes = driInfo.stride;
|
||||
else
|
||||
info->strideInBytes = 0x1000; /* This is the default for 3D LFBs,
|
||||
* which are always 2048
|
||||
pixels wide. */
|
||||
if (!colBufferIndex) {
|
||||
info->strideInBytes = driInfo.stride;
|
||||
} else {
|
||||
info->strideInBytes = gc->bInfo->buffInfo.bufLfbStride;
|
||||
}
|
||||
#else /* defined(__linux__) */
|
||||
info->strideInBytes = 0x1000; /* This is the default for 3D LFBs,
|
||||
* which are always 2048 pixels wide. */
|
||||
/*
|
||||
* This is the default for 3D LFBs,
|
||||
* which are always 2048 pixels wide.
|
||||
*/
|
||||
info->strideInBytes = 0x1000;
|
||||
#endif /* defined(__linux__) */
|
||||
info->origin = origin;
|
||||
|
||||
@@ -695,9 +697,8 @@ GR_ENTRY(grLfbLock, FxBool,(GrLock_t type, GrBuffer_t buffer,
|
||||
info->strideInBytes = gc->textureBuffer.stride ;
|
||||
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
else {
|
||||
info->lfbPtr = (void *)gc->lfb_ptr;
|
||||
#ifdef __linux__
|
||||
/*
|
||||
* For Linux, we just return the correct address and
|
||||
@@ -728,7 +729,15 @@ GR_ENTRY(grLfbLock, FxBool,(GrLock_t type, GrBuffer_t buffer,
|
||||
} else /* else !gc->textureBuffer.on */ {
|
||||
if (type == GR_LFB_READ_ONLY) {
|
||||
info->lfbPtr = (void *)gc->lfbBuffers[colBufferIndex];
|
||||
#if defined(__linux__)
|
||||
if (colBufferIndex == 0) {
|
||||
info->strideInBytes = driInfo.stride;
|
||||
} else {
|
||||
info->strideInBytes = gc->bInfo->buffInfo.bufLfbStride;
|
||||
}
|
||||
#else /* defined(__linux__) */
|
||||
info->strideInBytes = gc->bInfo->buffInfo.bufLfbStride;
|
||||
#endif /* defined(__linux__) */
|
||||
#if __POWERPC__
|
||||
if(IS_NAPALM(gc->bInfo->pciInfo.deviceID)) {
|
||||
if(gc->grPixelSize == 2) {
|
||||
@@ -778,7 +787,16 @@ GR_ENTRY(grLfbLock, FxBool,(GrLock_t type, GrBuffer_t buffer,
|
||||
/* Make sure dither rotation is disabled for 3D LFBs. */
|
||||
_3dlfb = FXTRUE;
|
||||
|
||||
#if defined(__linux__)
|
||||
/*
|
||||
* For Linux, we just return the correct address and
|
||||
* stride.
|
||||
*/
|
||||
info->strideInBytes = gc->bInfo->buffInfo.bufLfbStride;
|
||||
info->lfbPtr = (void *)gc->lfbBuffers[colBufferIndex];
|
||||
#else /* defined(__linux__) */
|
||||
info->lfbPtr = (void *)gc->lfb_ptr;
|
||||
#endif /* defined(__linux__) */
|
||||
|
||||
#ifndef __linux__
|
||||
switch (writeMode) {
|
||||
|
||||
@@ -2800,7 +2800,12 @@ GR_EXT_ENTRY(grSstWinOpenExt, GrContext_t, ( FxU32 hWnd,
|
||||
REG_GROUP_BEGIN(BROADCAST_ID, colBufferAddr, 4, 0xf);
|
||||
{
|
||||
REG_GROUP_SET(hw, colBufferAddr, gc->state.shadow.colBufferAddr);
|
||||
REG_GROUP_SET(hw, colBufferStride, gc->state.shadow.colBufferStride);
|
||||
#ifdef __linux__
|
||||
REG_GROUP_SET(hw, colBufferStride, (!gc->curBuffer) ? driInfo.stride :
|
||||
gc->state.shadow.colBufferStride );
|
||||
#else
|
||||
REG_GROUP_SET(hw, colBufferStride, gc->state.shadow.colBufferStride );
|
||||
#endif
|
||||
REG_GROUP_SET(hw, auxBufferAddr, gc->state.shadow.auxBufferAddr);
|
||||
REG_GROUP_SET(hw, auxBufferStride, gc->state.shadow.auxBufferStride);
|
||||
}
|
||||
@@ -2811,7 +2816,15 @@ GR_EXT_ENTRY(grSstWinOpenExt, GrContext_t, ( FxU32 hWnd,
|
||||
REG_GROUP_BEGIN(BROADCAST_ID, colBufferAddr, 4, 0xf);
|
||||
{
|
||||
REG_GROUP_SET(hw, colBufferAddr, gc->buffers1[gc->curBuffer] | SST_BUFFER_BASE_SELECT);
|
||||
REG_GROUP_SET(hw, colBufferStride, gc->state.shadow.colBufferStride);
|
||||
#ifdef __linux__
|
||||
REG_GROUP_SET(hw, colBufferStride, (!gc->curBuffer) ? driInfo.stride :
|
||||
gc->state.shadow.colBufferStride );
|
||||
#else
|
||||
REG_GROUP_SET(hw, colBufferStride, gc->state.shadow.colBufferStride );
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
REG_GROUP_SET(hw, auxBufferAddr, gc->buffers1[nColBuffers] | SST_BUFFER_BASE_SELECT);
|
||||
REG_GROUP_SET(hw, auxBufferStride, gc->state.shadow.auxBufferStride);
|
||||
}
|
||||
@@ -2872,7 +2885,12 @@ GR_EXT_ENTRY(grSstWinOpenExt, GrContext_t, ( FxU32 hWnd,
|
||||
REG_GROUP_BEGIN(BROADCAST_ID, colBufferAddr, 4, 0xf);
|
||||
{
|
||||
REG_GROUP_SET(hw, colBufferAddr, gc->state.shadow.colBufferAddr);
|
||||
REG_GROUP_SET(hw, colBufferStride, gc->state.shadow.colBufferStride);
|
||||
#ifdef __linux__
|
||||
REG_GROUP_SET(hw, colBufferStride, (!gc->curBuffer) ? driInfo.stride :
|
||||
gc->state.shadow.colBufferStride );
|
||||
#else
|
||||
REG_GROUP_SET(hw, colBufferStride, gc->state.shadow.colBufferStride );
|
||||
#endif
|
||||
REG_GROUP_SET(hw, auxBufferAddr, gc->state.shadow.auxBufferAddr);
|
||||
REG_GROUP_SET(hw, auxBufferStride, gc->state.shadow.auxBufferStride);
|
||||
}
|
||||
@@ -2881,7 +2899,12 @@ GR_EXT_ENTRY(grSstWinOpenExt, GrContext_t, ( FxU32 hWnd,
|
||||
REG_GROUP_BEGIN(BROADCAST_ID, colBufferAddr, 4, 0xf);
|
||||
{
|
||||
REG_GROUP_SET(hw, colBufferAddr, gc->buffers1[gc->curBuffer] | SST_BUFFER_BASE_SELECT);
|
||||
REG_GROUP_SET(hw, colBufferStride, gc->state.shadow.colBufferStride);
|
||||
#ifdef __linux__
|
||||
REG_GROUP_SET(hw, colBufferStride, (!gc->curBuffer) ? driInfo.stride :
|
||||
gc->state.shadow.colBufferStride );
|
||||
#else
|
||||
REG_GROUP_SET(hw, colBufferStride, gc->state.shadow.colBufferStride );
|
||||
#endif
|
||||
REG_GROUP_SET(hw, auxBufferAddr, gc->buffers1[nColBuffers] | SST_BUFFER_BASE_SELECT);
|
||||
REG_GROUP_SET(hw, auxBufferStride, gc->state.shadow.auxBufferStride);
|
||||
}
|
||||
|
||||
@@ -211,14 +211,10 @@ _grDrawVertexList(FxU32 pktype, FxU32 type, FxI32 mode, FxI32 count, void *point
|
||||
FxU32 dataElem;
|
||||
float *vPtr;
|
||||
|
||||
if (mode) {
|
||||
vPtr = *(float **)pointers;
|
||||
(float **)pointers += stride;
|
||||
}
|
||||
else {
|
||||
vPtr = (float *)pointers;
|
||||
(float *)pointers += stride;
|
||||
}
|
||||
vPtr = pointers;
|
||||
if (mode)
|
||||
vPtr = *(float **)vPtr;
|
||||
(float *)pointers += stride;
|
||||
|
||||
TRI_SETF(FARRAY(vPtr, 0));
|
||||
dataElem = 0;
|
||||
@@ -249,20 +245,16 @@ _grDrawVertexList(FxU32 pktype, FxU32 type, FxI32 mode, FxI32 count, void *point
|
||||
for (k = 0; k < vcount; k++) {
|
||||
float *vPtr;
|
||||
|
||||
if (mode) {
|
||||
vPtr = *(float **)pointers;
|
||||
(float **)pointers += stride;
|
||||
}
|
||||
else {
|
||||
vPtr = (float *)pointers;
|
||||
(float *)pointers += stride;
|
||||
}
|
||||
vPtr = pointers;
|
||||
if (mode)
|
||||
vPtr = *(float **)vPtr;
|
||||
oow = 1.0f / FARRAY(vPtr, gc->state.vData.wInfo.offset);
|
||||
/* x, y */
|
||||
TRI_SETF(FARRAY(vPtr, 0)
|
||||
*oow*gc->state.Viewport.hwidth + gc->state.Viewport.ox);
|
||||
TRI_SETF(FARRAY(vPtr, 4)
|
||||
*oow*gc->state.Viewport.hheight + gc->state.Viewport.oy);
|
||||
(float *)pointers += stride;
|
||||
|
||||
TRI_VP_SETFS(vPtr, oow);
|
||||
}
|
||||
|
||||
@@ -23,28 +23,15 @@
|
||||
/* $Header$ *
|
||||
/* $Revision$ *
|
||||
/* $Log$
|
||||
/* Revision 1.5 2000/11/17 21:31:06 joseph
|
||||
/* Restored changes that were lost when I imported new sources from 3dfx's
|
||||
/* internal source repository.
|
||||
/*
|
||||
/* Revision 1.4 2000/11/15 23:32:54 joseph
|
||||
/* Syncing up with 3dfx internal source repository. These changes contain a
|
||||
/* number of bug fixes.
|
||||
/*
|
||||
/* Revision 1.3 2000/10/20 19:07:00 billwhite
|
||||
/* 1.) Added changes for AMD 3DNow instructions in h5/glide3 and
|
||||
/* h3/glide3.
|
||||
/* 2.) Fixed a typographical error in configure.in. The default
|
||||
/* texture utility library is texus2, not texus.
|
||||
/*
|
||||
/* Revision 1.2.2.3 2000/11/16 20:01:31 alanh
|
||||
/* merge trunk into 64bit branch.
|
||||
/*
|
||||
/* Revision 1.2.2.2 2000/11/16 19:32:35 alanh
|
||||
/* merge trunk into 64bit branch.
|
||||
/*
|
||||
/* Revision 1.2.2.1 2000/11/14 14:11:19 alanh
|
||||
/* merge in trunk updates, fixup pci code, and fix texus2 code pointers.
|
||||
/* Revision 1.1 2000/06/15 00:27:43 joseph
|
||||
/* Initial checkin into SourceForge.
|
||||
/
|
||||
/* Revision 1.1.1.1 2000/04/26 20:35:32 poppa
|
||||
/* Initial Napalm Glide from Precision Insight
|
||||
/*
|
||||
/* Revision 1.2 2000/04/18 15:58:15 poppa
|
||||
/* h5/glide3/src/glide.h: Define grSwapBuffers as grDRISwapBuffers. This
|
||||
@@ -58,13 +45,6 @@
|
||||
/* this file.
|
||||
/* h5/minihwc/gdebug.c: Apparently fclose(NULL) fails in Linux. This
|
||||
/* is the POSIX behavior as I recall.
|
||||
/*
|
||||
/* Revision 1.1 2000/06/15 00:27:43 joseph
|
||||
/* Initial checkin into SourceForge.
|
||||
/*
|
||||
/* Revision 1.1.1.1 2000/04/26 20:35:32 poppa
|
||||
/* Initial Napalm Glide from Precision Insight
|
||||
/*
|
||||
/* */
|
||||
/* */
|
||||
/* 2 10/30/97 6:53p Peter */
|
||||
@@ -167,7 +147,7 @@
|
||||
push %esi /* save caller's register variable */
|
||||
push %ebx /* save caller's register variable */
|
||||
|
||||
mov _gc-4(%esp), gc
|
||||
mov _gc(%esp), gc
|
||||
mov _vb-4(%esp) , fb /* get base address of vertex B */
|
||||
push %ebp /* save frame pointer */
|
||||
|
||||
|
||||
@@ -27,9 +27,6 @@ xdraw2.asm Page 1 - 1
|
||||
;; Syncing up with 3dfx internal source repository. These changes contain a
|
||||
;; number of bug fixes.
|
||||
;;
|
||||
;; Revision 1.2.2.1 2000/11/16 19:32:35 alanh
|
||||
;; merge trunk into 64bit branch.
|
||||
;;
|
||||
;; Revision 1.1 2000/06/15 00:27:43 joseph
|
||||
;; Initial checkin into SourceForge.
|
||||
;;
|
||||
@@ -295,9 +292,6 @@ xdraw2.asm Page 1 - 1
|
||||
C ;; Syncing up with 3dfx internal source repository. These changes contain a
|
||||
C ;; number of bug fixes.
|
||||
C ;;
|
||||
C ;; Revision 1.2.2.1 2000/11/16 19:32:35 alanh
|
||||
C ;; merge trunk into 64bit branch.
|
||||
C ;;
|
||||
C ;; Revision 1.1 2000/06/15 00:27:43 joseph
|
||||
C ;; Initial checkin into SourceForge.
|
||||
C ;;
|
||||
@@ -1283,9 +1277,6 @@ xdraw2.asm Page 1 - 1
|
||||
C ;; Syncing up with 3dfx internal source repository. These changes contain a
|
||||
C ;; number of bug fixes.
|
||||
C ;;
|
||||
C ;; Revision 1.2.2.1 2000/11/16 19:32:35 alanh
|
||||
C ;; merge trunk into 64bit branch.
|
||||
C ;;
|
||||
C ;; Revision 1.1 2000/06/15 00:27:43 joseph
|
||||
C ;; Initial checkin into SourceForge.
|
||||
C ;;
|
||||
@@ -2271,9 +2262,6 @@ xdraw2.asm Page 1 - 1
|
||||
C ;; Syncing up with 3dfx internal source repository. These changes contain a
|
||||
C ;; number of bug fixes.
|
||||
C ;;
|
||||
C ;; Revision 1.2.2.1 2000/11/16 19:32:35 alanh
|
||||
C ;; merge trunk into 64bit branch.
|
||||
C ;;
|
||||
C ;; Revision 1.1 2000/06/15 00:27:43 joseph
|
||||
C ;; Initial checkin into SourceForge.
|
||||
C ;;
|
||||
@@ -3259,9 +3247,6 @@ xdraw2.asm Page 1 - 1
|
||||
C ;; Syncing up with 3dfx internal source repository. These changes contain a
|
||||
C ;; number of bug fixes.
|
||||
C ;;
|
||||
C ;; Revision 1.2.2.1 2000/11/16 19:32:35 alanh
|
||||
C ;; merge trunk into 64bit branch.
|
||||
C ;;
|
||||
C ;; Revision 1.1 2000/06/15 00:27:43 joseph
|
||||
C ;; Initial checkin into SourceForge.
|
||||
C ;;
|
||||
@@ -4247,9 +4232,6 @@ xdraw2.asm Page 1 - 1
|
||||
C ;; Syncing up with 3dfx internal source repository. These changes contain a
|
||||
C ;; number of bug fixes.
|
||||
C ;;
|
||||
C ;; Revision 1.2.2.1 2000/11/16 19:32:35 alanh
|
||||
C ;; merge trunk into 64bit branch.
|
||||
C ;;
|
||||
C ;; Revision 1.1 2000/06/15 00:27:43 joseph
|
||||
C ;; Initial checkin into SourceForge.
|
||||
C ;;
|
||||
@@ -5304,9 +5286,6 @@ ENDM ; GR_FIFO_WRITE
|
||||
C ;; Syncing up with 3dfx internal source repository. These changes contain a
|
||||
C ;; number of bug fixes.
|
||||
C ;;
|
||||
C ;; Revision 1.2.2.1 2000/11/16 19:32:35 alanh
|
||||
C ;; merge trunk into 64bit branch.
|
||||
C ;;
|
||||
C ;; Revision 1.1 2000/06/15 00:27:43 joseph
|
||||
C ;; Initial checkin into SourceForge.
|
||||
C ;;
|
||||
@@ -6360,9 +6339,6 @@ ENDM ; GR_FIFO_WRITE
|
||||
C ;; Syncing up with 3dfx internal source repository. These changes contain a
|
||||
C ;; number of bug fixes.
|
||||
C ;;
|
||||
C ;; Revision 1.2.2.1 2000/11/16 19:32:35 alanh
|
||||
C ;; merge trunk into 64bit branch.
|
||||
C ;;
|
||||
C ;; Revision 1.1 2000/06/15 00:27:43 joseph
|
||||
C ;; Initial checkin into SourceForge.
|
||||
C ;;
|
||||
@@ -7416,9 +7392,6 @@ ENDM ; GR_FIFO_WRITE
|
||||
C ;; Syncing up with 3dfx internal source repository. These changes contain a
|
||||
C ;; number of bug fixes.
|
||||
C ;;
|
||||
C ;; Revision 1.2.2.1 2000/11/16 19:32:35 alanh
|
||||
C ;; merge trunk into 64bit branch.
|
||||
C ;;
|
||||
C ;; Revision 1.1 2000/06/15 00:27:43 joseph
|
||||
C ;; Initial checkin into SourceForge.
|
||||
C ;;
|
||||
|
||||
@@ -21,23 +21,15 @@
|
||||
/* $Header$ *
|
||||
/* $Revision$ *
|
||||
/* $Log$
|
||||
/* Revision 1.4 2000/11/17 21:31:06 joseph
|
||||
/* Restored changes that were lost when I imported new sources from 3dfx's
|
||||
/* internal source repository.
|
||||
/*
|
||||
/* Revision 1.3 2000/11/15 23:32:54 joseph
|
||||
/* Syncing up with 3dfx internal source repository. These changes contain a
|
||||
/* number of bug fixes.
|
||||
/*
|
||||
/* Revision 1.2.2.2 2000/11/16 20:01:31 alanh
|
||||
/* merge trunk into 64bit branch.
|
||||
/* Revision 1.1 2000/06/15 00:27:43 joseph
|
||||
/* Initial checkin into SourceForge.
|
||||
/*
|
||||
/* Revision 1.2.2.1 2000/11/16 19:32:35 alanh
|
||||
/* merge trunk into 64bit branch.
|
||||
/*
|
||||
/* Revision 1.2 2000/06/27 19:59:34 joseph
|
||||
/* Previous checkin of asm files were already preprocessed.
|
||||
/* Fixed build rules for 3DNow optimized assembly.
|
||||
/* Revision 1.1.1.1 2000/04/26 20:35:33 poppa
|
||||
/* Initial Napalm Glide from Precision Insight
|
||||
/*
|
||||
/* Revision 1.2 2000/04/18 15:58:15 poppa
|
||||
/* h5/glide3/src/glide.h: Define grSwapBuffers as grDRISwapBuffers. This
|
||||
@@ -51,13 +43,6 @@
|
||||
/* this file.
|
||||
/* h5/minihwc/gdebug.c: Apparently fclose(NULL) fails in Linux. This
|
||||
/* is the POSIX behavior as I recall.
|
||||
/*
|
||||
/* Revision 1.1 2000/06/15 00:27:43 joseph
|
||||
/* Initial checkin into SourceForge.
|
||||
/*
|
||||
/* Revision 1.1.1.1 2000/04/26 20:35:33 poppa
|
||||
/* Initial Napalm Glide from Precision Insight
|
||||
/*
|
||||
/* */
|
||||
/* */
|
||||
/* 4 4/06/99 3:54p Dow */
|
||||
|
||||
@@ -27,9 +27,6 @@ xtexdl.asm Page 1 - 1
|
||||
;; Syncing up with 3dfx internal source repository. These changes contain a
|
||||
;; number of bug fixes.
|
||||
;;
|
||||
;; Revision 1.2.2.1 2000/11/16 19:32:35 alanh
|
||||
;; merge trunk into 64bit branch.
|
||||
;;
|
||||
;; Revision 1.1 2000/06/15 00:27:43 joseph
|
||||
;; Initial checkin into SourceForge.
|
||||
;;
|
||||
|
||||
@@ -21,21 +21,10 @@
|
||||
/* $Header$ *
|
||||
/* $Revision$ *
|
||||
/* $Log$
|
||||
/* Revision 1.4 2000/11/17 21:31:06 joseph
|
||||
/* Restored changes that were lost when I imported new sources from 3dfx's
|
||||
/* internal source repository.
|
||||
/*
|
||||
/* Revision 1.3 2000/11/15 23:32:54 joseph
|
||||
/* Syncing up with 3dfx internal source repository. These changes contain a
|
||||
/* number of bug fixes.
|
||||
/*
|
||||
/* Revision 1.2.2.2 2000/11/16 20:01:31 alanh
|
||||
/* merge trunk into 64bit branch.
|
||||
/*
|
||||
/* Revision 1.2 2000/06/27 19:59:34 joseph
|
||||
/* Previous checkin of asm files were already preprocessed.
|
||||
/* Fixed build rules for 3DNow optimized assembly.
|
||||
/*
|
||||
/* Revision 1.1 2000/06/15 00:27:43 josep
|
||||
/* Initial checkin into SourceForge
|
||||
/
|
||||
|
||||
@@ -603,6 +603,7 @@ _grTexDownload_Default_32_WideS(struct GrGC_s* gc, const FxU32 tmuBaseAddr,
|
||||
FxI32
|
||||
s;
|
||||
|
||||
|
||||
LINEAR_WRITE_BEGIN(maxS, PACKET5_MODE,
|
||||
(FxU32)tex_address, 0x00UL, 0x00UL);
|
||||
for (s = 0; s < maxS; s += 2) {
|
||||
|
||||
@@ -11,14 +11,14 @@
|
||||
** EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR
|
||||
** FULL TEXT OF THE NON-WARRANTY PROVISIONS.
|
||||
**
|
||||
** USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT T
|
||||
** RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS I
|
||||
** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013
|
||||
** AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FA
|
||||
** SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS O
|
||||
** USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO
|
||||
** RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN
|
||||
** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013,
|
||||
** AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR
|
||||
** SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF
|
||||
** THE UNITED STATES.
|
||||
**
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVE
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
**
|
||||
** $Revision$
|
||||
** $Date$
|
||||
|
||||
@@ -127,8 +127,8 @@ void grDRIOpen(char *pFB, char *pRegs, int deviceID, int width, int height,
|
||||
driInfo.depthOffset=depthOffset;
|
||||
driInfo.textureOffset=textureOffset;
|
||||
driInfo.textureSize=textureSize;
|
||||
driInfo.fifoPtr=fifoPtr;
|
||||
driInfo.fifoRead=fifoRead;
|
||||
driInfo.fifoPtr=(volatile int **)fifoPtr;
|
||||
driInfo.fifoRead=(volatile int **)fifoRead;
|
||||
}
|
||||
|
||||
void grDRIPosition(int x, int y, int w, int h,
|
||||
@@ -146,7 +146,8 @@ static void loadEnvFile() {
|
||||
char data[128];
|
||||
char *env, *val;
|
||||
envitem *item;
|
||||
int first=1;
|
||||
unsigned int sawError=0;
|
||||
envitem *first=(envitem *)0;
|
||||
|
||||
if (envinit) return;
|
||||
envinit=1;
|
||||
@@ -158,9 +159,9 @@ static void loadEnvFile() {
|
||||
if (*data=='\n') continue;
|
||||
val=strchr(data, '=');
|
||||
if (!val) {
|
||||
if (first) {
|
||||
if (sawError) {
|
||||
fprintf(stderr, "In config file /etc/conf.3dfx/voodoo3:\n");
|
||||
first=0;
|
||||
sawError=1;
|
||||
}
|
||||
fprintf(stderr, "Malformed line: %s\n", data);
|
||||
continue;
|
||||
@@ -372,7 +373,7 @@ hwcBufferLfbAddr(const hwcBoardInfo *bInfo, FxU32 physAddress)
|
||||
lfbYOffset = ((tileRow * 32 + tileScanline) << (bInfo->h3nwaySli >> 1));
|
||||
|
||||
/* Compute LFB address of tile start */
|
||||
lfbAddress = bInfo->primaryOffset + lfbYOffset * HWC_LFB_STRIDE + tileXOffset * 128;
|
||||
lfbAddress = bInfo->primaryOffset + lfbYOffset * lfbBufferStride + tileXOffset * 128;
|
||||
|
||||
GDBG_INFO(80, "\tlfbAddress: %08lx\n", lfbAddress);
|
||||
retVal = lfbAddress;
|
||||
@@ -382,6 +383,20 @@ hwcBufferLfbAddr(const hwcBoardInfo *bInfo, FxU32 physAddress)
|
||||
return retVal;
|
||||
}
|
||||
|
||||
static FxU32
|
||||
calculateLfbStride(FxU32 screenWidth)
|
||||
{
|
||||
#if 1
|
||||
int TileAperturePitch;
|
||||
for (TileAperturePitch = 1024;
|
||||
(TileAperturePitch < (16 << 10)) && (TileAperturePitch < screenWidth);
|
||||
TileAperturePitch <<= 1);
|
||||
return(TileAperturePitch);
|
||||
#else
|
||||
return(0x1000);
|
||||
#endif
|
||||
}
|
||||
|
||||
FxBool
|
||||
hwcAllocBuffers(hwcBoardInfo *bInfo, FxU32 nColBuffers, FxU32 nAuxBuffers)
|
||||
{
|
||||
@@ -410,6 +425,7 @@ hwcAllocBuffers(hwcBoardInfo *bInfo, FxU32 nColBuffers, FxU32 nAuxBuffers)
|
||||
|
||||
bInfo->buffInfo.bufStride = bufStride;
|
||||
bInfo->buffInfo.bufSize = bufSize;
|
||||
bInfo->buffInfo.bufLfbStride = calculateLfbStride(bufStride);
|
||||
|
||||
if (bInfo->vidInfo.tiled) {
|
||||
bInfo->buffInfo.bufStrideInTiles = (bufStride >> 7);
|
||||
@@ -466,6 +482,7 @@ hwcAllocBuffers(hwcBoardInfo *bInfo, FxU32 nColBuffers, FxU32 nAuxBuffers)
|
||||
GDBG_INFO(80, "\tbufStride: 0x%x\n", bInfo->buffInfo.bufStride);
|
||||
GDBG_INFO(80, "\tbufStrideInTiles:0x%x\n", bInfo->buffInfo.bufStrideInTiles);
|
||||
GDBG_INFO(80, "\tbufHeightInTiles:0x%x\n", bInfo->buffInfo.bufHeightInTiles);
|
||||
GDBG_INFO(80, "\tbufLfbStride :0x%x\n", bInfo->buffInfo.bufLfbStride);
|
||||
GDBG_INFO(80, "\tnColBuffers: 0x%x\n", bInfo->buffInfo.nColBuffers);
|
||||
GDBG_INFO(80, "\tcolBuffStart0[0]: 0x%x\n", bInfo->buffInfo.colBuffStart0[0]);
|
||||
GDBG_INFO(80, "\tcolBuffEnd0[0]: 0x%x\n", bInfo->buffInfo.colBuffEnd0[0]);
|
||||
@@ -590,7 +607,7 @@ calcBufferStride(hwcBoardInfo *bInfo, FxU32 xres, FxBool tiled)
|
||||
if (tiled == FXTRUE) {
|
||||
/* Calculate tile width stuff */
|
||||
strideInTiles = (xres << shift) >> 7;
|
||||
if ((xres << 1) & (HWC_TILE_WIDTH - 1))
|
||||
if ((xres << shift) & (HWC_TILE_WIDTH - 1))
|
||||
strideInTiles++;
|
||||
|
||||
return (strideInTiles * HWC_TILE_WIDTH);
|
||||
|
||||
Reference in New Issue
Block a user