Changeset 44147
- Timestamp:
- 10/12/19 01:15:36 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/titan/bcm.h
r42165 r44147 24 24 static int ptr; 25 25 static bool supportblendingflags = true; 26 static bool accumulateoperations = false; 26 27 27 28 #define P(x, y) do { displaylist[ptr++] = x; displaylist[ptr++] = y; } while (0) … … 89 90 { 90 91 return supportblendingflags; 92 } 93 94 int bcm_accel_accumulate() 95 { 96 #ifdef SUPPORT_ACCUMULATED_ACCELERATION_OPERATIONS 97 accumulateoperations = true; 98 return 0; 99 #else 100 return -1; 101 #endif 102 } 103 104 int bcm_accel_sync() 105 { 106 int retval = 0; 107 if (accumulateoperations) 108 { 109 if (ptr) 110 { 111 fprintf(stderr, "bcm_accel_sync: ptr %d\n", ptr); 112 113 retval = exec_list(); 114 } 115 accumulateoperations = false; 116 } 117 return retval; 91 118 } 92 119 … … 98 125 int pal_addr, int flags) 99 126 { 127 if (accumulateoperations) 128 { 129 if (((sizeof(displaylist) / sizeof(displaylist[0]) - ptr) / 2) < 40) 130 { 131 fprintf(stderr, "bcm_accel_blit: not enough space to accumulate\n"); 132 bcm_accel_sync(); 133 bcm_accel_accumulate(); 134 } 135 } 136 100 137 C(0x43); // reset source 101 138 C(0x53); // reset dest … … 149 186 C(0x77); // do it 150 187 151 exec_list();188 if (!accumulateoperations) exec_list(); 152 189 } 153 190 … … 157 194 unsigned long color) 158 195 { 196 if (accumulateoperations) 197 { 198 if (((sizeof(displaylist) / sizeof(displaylist[0]) - ptr) / 2) < 40) 199 { 200 fprintf(stderr, "bcm_accel_fill: not enough space to accumulate\n"); 201 bcm_accel_sync(); 202 bcm_accel_accumulate(); 203 } 204 } 205 159 206 C(0x43); // reset source 160 207 C(0x53); // reset dest … … 202 249 C(0x77); // do it 203 250 204 exec_list();251 if (!accumulateoperations) exec_list(); 205 252 } 206 253
Note: See TracChangeset
for help on using the changeset viewer.