DXGL r397 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r396‎ | r397 | r398 >
Date:23:13, 4 August 2013
Author:admin
Status:new
Tags:
Comment:
Map texture usage for all 256 ROP codes.
Add SRCCOPY supported ROP to DDCAPS structure.
Modified paths:
  • /ddraw/glDirectDraw.cpp (modified) (history)
  • /ddraw/shadergen2d.cpp (modified) (history)
  • /ddraw/shadergen2d.h (modified) (history)

Diff [purge]

Index: ddraw/glDirectDraw.cpp
@@ -18,6 +18,7 @@
1919 #include "common.h"
2020 #include "util.h"
2121 #include "shaders.h"
 22+#include "shadergen2d.h"
2223 #include "ddraw.h"
2324 #include "timer.h"
2425 #include "glDirect3D.h"
@@ -951,6 +952,11 @@
952953 DDSCAPS_FRONTBUFFER | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_PALETTE |
953954 DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOMEMORY | DDSCAPS_3DDEVICE;
954955 ddCaps.dwCKeyCaps = DDCKEYCAPS_SRCBLT;
 956+ memcpy(ddCaps.dwRops,supported_rops,8*sizeof(DWORD));
 957+ memcpy(ddCaps.dwNLVBRops,supported_rops,8*sizeof(DWORD));
 958+ memcpy(ddCaps.dwSSBRops,supported_rops,8*sizeof(DWORD));
 959+ memcpy(ddCaps.dwSVBRops,supported_rops,8*sizeof(DWORD));
 960+ memcpy(ddCaps.dwVSBRops,supported_rops,8*sizeof(DWORD));
955961 GetAvailableVidMem(NULL,&ddCaps.dwVidMemTotal,&ddCaps.dwVidMemFree);
956962 if(lpDDDriverCaps)
957963 {
Index: ddraw/shadergen2d.cpp
@@ -97,4 +97,27 @@
9898 7,3,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
9999 7,7,3,7,7,7,7,7,7,7,7,7,7,7,7,7,
100100 5,7,7,1,7,7,7,7,7,7,7,7,5,7,7,5,
 101+ 7,7,7,7,3,7,7,7,7,7,7,7,7,7,7,7,
 102+ 6,7,7,7,7,2,7,7,7,7,6,7,7,7,7,6,
 103+ 7,7,7,7,7,7,3,7,7,7,7,7,7,7,7,7,
 104+ 7,7,7,7,7,7,7,3,7,7,7,7,7,7,7,7,
 105+ 7,7,7,7,7,7,7,7,3,7,7,7,7,7,7,7,
 106+ 7,7,7,7,7,7,7,7,7,3,7,7,7,7,7,7,
 107+ 6,7,7,7,7,6,7,7,7,7,2,7,7,7,7,6,
 108+ 7,7,7,7,7,7,7,7,7,7,7,3,7,7,7,7,
 109+ 5,7,7,5,7,7,7,7,7,7,7,7,1,7,7,5,
 110+ 7,7,7,7,7,7,7,7,7,7,7,7,7,3,7,7,
 111+ 7,7,7,7,7,7,7,7,7,7,7,7,7,7,3,7,
 112+ 4,7,7,5,7,6,7,7,7,7,6,7,5,7,7,0
 113+};
 114+
 115+const DWORD supported_rops[8] = {
 116+ 0x00000000,
 117+ 0x00000000,
 118+ 0x00000000,
 119+ 0x00000000,
 120+ 0x00000000,
 121+ 0x00000000,
 122+ 0x00001000,
 123+ 0x00000000
101124 };
\ No newline at end of file
Index: ddraw/shadergen2d.h
@@ -14,3 +14,7 @@
1515 // You should have received a copy of the GNU Lesser General Public
1616 // License along with this library; if not, write to the Free Software
1717 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 18+
 19+extern const DWORD valid_rop_codes[256];
 20+extern const DWORD rop_texture_usage[256];
 21+extern const DWORD supported_rops[8];
\ No newline at end of file