projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
radeonsi: use shader_info::cs::local_size_variable to clean up some code
[mesa.git]
/
src
/
gallium
/
drivers
/
softpipe
/
sp_quad_stipple.c
diff --git
a/src/gallium/drivers/softpipe/sp_quad_stipple.c
b/src/gallium/drivers/softpipe/sp_quad_stipple.c
index 07162db7b6e0864dc1b374bf19d3ca2057a6b017..4b29c2eb221b926729889727917351eb050f7eac 100644
(file)
--- a/
src/gallium/drivers/softpipe/sp_quad_stipple.c
+++ b/
src/gallium/drivers/softpipe/sp_quad_stipple.c
@@
-14,14
+14,20
@@
* Apply polygon stipple to quads produced by triangle rasterization
*/
static void
* Apply polygon stipple to quads produced by triangle rasterization
*/
static void
-stipple_quad(struct quad_stage *qs, struct quad_header *quad)
+stipple_quad(struct quad_stage *qs, struct quad_header *quad
s[], unsigned nr
)
{
{
- static const uint bit31 = 1 << 31;
- static const uint bit30 = 1 << 30;
+ static const uint bit31 = 1u << 31;
+ static const uint bit30 = 1u << 30;
+ unsigned pass = nr;
+
+ struct softpipe_context *softpipe = qs->softpipe;
+ unsigned q;
+
+ pass = 0;
+
+ for (q = 0; q < nr; q++) {
+ struct quad_header *quad = quads[q];
- if (quad->input.prim == QUAD_PRIM_TRI) {
- struct softpipe_context *softpipe = qs->softpipe;
- /* need to invert Y to index into OpenGL's stipple pattern */
const int col0 = quad->input.x0 % 32;
const int y0 = quad->input.y0;
const int y1 = y0 + 1;
const int col0 = quad->input.x0 % 32;
const int y0 = quad->input.y0;
const int y1 = y0 + 1;
@@
-41,13
+47,11
@@
stipple_quad(struct quad_stage *qs, struct quad_header *quad)
if ((stipple1 & (bit30 >> col0)) == 0)
quad->inout.mask &= ~MASK_BOTTOM_RIGHT;
if ((stipple1 & (bit30 >> col0)) == 0)
quad->inout.mask &= ~MASK_BOTTOM_RIGHT;
- if (!quad->inout.mask) {
- /* all fragments failed stipple test, end of quad pipeline */
- return;
- }
+ if (quad->inout.mask)
+ quads[pass++] = quad;
}
}
- qs->next->run(qs->next, quad);
+ qs->next->run(qs->next, quad
s, pass
);
}
}