DXGL r550 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r549‎ | r550 | r551 >
Date:21:16, 12 October 2014
Author:admin
Status:new
Tags:
Comment:
Add several raster operations.
Modified paths:
  • /ddraw/ShaderGen2D.cpp (modified) (history)

Diff [purge]

Index: ddraw/ShaderGen2D.cpp
@@ -116,7 +116,7 @@
117117 };
118118
119119 const DWORD supported_rops[8] = {
120 - 0x00028001,
 120+ 0xFFFFFFFF,
121121 0x00080000,
122122 0x04200010,
123123 0x00000040,
@@ -212,37 +212,37 @@
213213 // ROP Operations
214214 static const char *op_ROP[256] = {
215215 "pixel = ivec4(0);\n",//00 BLACKNESS
216 -"",
217 -"",
218 -"",
219 -"",
220 -"",
221 -"",
222 -"",
223 -"",
224 -"",
225 -"",
226 -"",
227 -"",
228 -"",
229 -"",
 216+"pixel = (dest | (pattern | pixel)) ^ colorsizedest;",
 217+"pixel = dest & ((pattern | pixel) ^ colorsizedest);",
 218+"pixel = (pattern | pixel) ^ colorsizedest;",
 219+"pixel = pixel & ((dest | pattern) ^ colorsizedest);",
 220+"pixel = (dest | pattern) ^ colorsizedest;",
 221+"pixel = (pattern | ((dest ^ pixel) ^ colorsizedest)) ^ colorsizedest;",
 222+"pixel = (pattern | (dest & pixel)) ^ colorsizedest;",
 223+"pixel = pixel & dest & (pattern ^ colorsizedest);",
 224+"pixel = (pattern | (dest ^ pixel)) ^ colorsizedest;",
 225+"pixel = dest & (pattern ^ colorsizedest);",
 226+"pixel = (pattern | (pixel & (dest ^ colorsizedest))) ^ colorsizedest;",
 227+"pixel = pixel & (pattern ^ colorsizedest);",
 228+"pixel = (pattern | (dest & (pixel ^ colorsizedest))) ^ colorsizedest;",
 229+"pixel = (pattern | ((dest | pixel) ^ colorsizedest)) ^ colorsizedest;",
230230 "pixel = pattern ^ colorsizedest;\n",//0F
231 -"",//10
 231+"pixel = pattern & ((pixel | dest) ^ colorsizedest);",//10
232232 "pixel = (dest | pixel) ^ colorsizedest;\n",//11 NOTSRCERASE
233 -"",
234 -"",
235 -"",
236 -"",
237 -"",
238 -"",
239 -"",
240 -"",
241 -"",
242 -"",
243 -"",
244 -"",
245 -"",
246 -"",//1F
 233+"pixel = (pixel | ((dest ^ pattern) ^ colorsizedest)) ^ colorsizedest;",
 234+"pixel = (pixel | (dest & pattern)) ^ colorsizedest;",
 235+"pixel = (dest | ((pattern ^ pixel) ^ colorsizedest)) ^ colorsizedest;",
 236+"pixel = (dest | (pattern & pixel)) ^ colorsizedest;",
 237+"pixel = pattern ^ pixel ^ (dest & ((pattern & pixel) ^ colorsizedest));",
 238+"pixel = (pixel ^ colorsizedest) ^ ((pixel ^ pattern) & (pixel ^ dest));",
 239+"pixel = (pixel ^ pattern) & (dest ^ pattern);",
 240+"pixel = (pixel ^ colorsizedest) ^ (dest & ((pattern & pixel) ^ colorsizedest));",
 241+"pixel = pattern ^ (dest | (pixel & pattern));",
 242+"pixel = (pixel ^ colorsizedest) ^ (dest & (pattern ^ pixel));",
 243+"pixel = pattern ^ (pixel | (dest & pattern));",
 244+"pixel = (dest ^ colorsizedest) ^ (pixel & (dest ^ pattern));",
 245+"pixel = pattern ^ (dest | pixel);",
 246+"pixel = (pattern & (dest | pixel)) ^ colorsizedest;",//1F
247247 "",//20
248248 "",
249249 "",