<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
I am perfectly fine not submitting into stable. And can remove the assert, since it’s causing trouble.
<div class=""><br class="">
</div>
<div class="">FWIW, piglit llvmpipe.py fixes 3 tests with no regressions.</div>
<div class=""><br class="">
</div>
<div class="">George</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Apr 25, 2017, at 9:23 PM, Rowley, Timothy O <<a href="mailto:timothy.o.rowley@intel.com" class="">timothy.o.rowley@intel.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Additionally I don’t think this should go into stable - without the corresponding rasterizer commit (which feels like a risky change post -rc1) it is of limited use.
<div class=""><br class="">
<div class="">
<blockquote type="cite" class="">
<div class="">On Apr 25, 2017, at 6:58 PM, Ilia Mirkin <<a href="mailto:imirkin@alum.mit.edu" class="">imirkin@alum.mit.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="auto" class="">This will cause asserts on piglit and dEQP runs instead of failures. This is incredibly inconvenient, as e.g. dEQP runs everything in a single process.</div>
<div class="gmail_extra"><br class="">
<div class="gmail_quote">On Apr 25, 2017 7:29 PM, "George Kyriazis" <<a href="mailto:george.kyriazis@intel.com" class="">george.kyriazis@intel.com</a>> wrote:<br type="attribution" class="">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Add logic for converting enums and also making sure stipple works.<br class="">
<br class="">
CC: <<a href="mailto:mesa-stable@lists.freedesktop.org" class="">mesa-stable@lists.<wbr class="">freedesktop.org</a>><br class="">
<br class="">
---<br class="">
src/gallium/drivers/swr/swr_<wbr class="">state.cpp | 14 +++++++++++++-<br class="">
src/gallium/drivers/swr/swr_<wbr class="">state.h | 20 ++++++++++++++++++++<br class="">
2 files changed, 33 insertions(+), 1 deletion(-)<br class="">
<br class="">
diff --git a/src/gallium/drivers/swr/swr_<wbr class="">state.cpp b/src/gallium/drivers/swr/swr_<wbr class="">state.cpp<br class="">
index 56b1374..24a6759 100644<br class="">
--- a/src/gallium/drivers/swr/swr_<wbr class="">state.cpp<br class="">
+++ b/src/gallium/drivers/swr/swr_<wbr class="">state.cpp<br class="">
@@ -201,6 +201,12 @@ swr_create_rasterizer_state(<wbr class="">struct pipe_context *pipe,<br class="">
struct pipe_rasterizer_state *state;<br class="">
state = (pipe_rasterizer_state *)mem_dup(rast, sizeof *rast);<br class="">
<br class="">
+ if (state) {<br class="">
+ if (state->fill_front != state->fill_back) {<br class="">
+ assert(0 && "front != back polygon mode not supported");<br class="">
+ }<br class="">
+ }<br class="">
+<br class="">
return state;<br class="">
}<br class="">
<br class="">
@@ -1153,6 +1159,10 @@ swr_update_derived(struct pipe_context *pipe,<br class="">
rastState-><wbr class="">slopeScaledDepthBias = 0;<br class="">
rastState->depthBiasClamp = 0;<br class="">
}<br class="">
+<br class="">
+ /* translate polygon mode, at least for the front==back case */<br class="">
+ rastState->fillMode = swr_convert_fill_mode(<wbr class="">rasterizer->fill_front);<br class="">
+<br class="">
struct pipe_surface *zb = fb->zsbuf;<br class="">
if (zb && swr_resource(zb->texture)-><wbr class="">has_depth)<br class="">
rastState->depthFormat = swr_resource(zb->texture)-><wbr class="">swr.format;<br class="">
@@ -1423,7 +1433,9 @@ swr_update_derived(struct pipe_context *pipe,<br class="">
/* and points, since we rasterize them as triangles, too */<br class="">
/* Has to be before fragment shader, since it sets SWR_NEW_FS */<br class="">
if (p_draw_info) {<br class="">
- bool new_prim_is_poly = (u_reduced_prim(p_draw_info-><wbr class="">mode) == PIPE_PRIM_TRIANGLES);<br class="">
+ bool new_prim_is_poly =<br class="">
+ (u_reduced_prim(p_draw_info-><wbr class="">mode) == PIPE_PRIM_TRIANGLES) &&<br class="">
+ (ctx->derived.rastState.<wbr class="">fillMode == SWR_FILLMODE_SOLID);<br class="">
if (new_prim_is_poly != ctx->poly_stipple.prim_is_<wbr class="">poly) {<br class="">
ctx->dirty |= SWR_NEW_FS;<br class="">
ctx->poly_stipple.prim_is_poly = new_prim_is_poly;<br class="">
diff --git a/src/gallium/drivers/swr/swr_<wbr class="">state.h b/src/gallium/drivers/swr/swr_<wbr class="">state.h<br class="">
index 9a8c4e1..7940a96 100644<br class="">
--- a/src/gallium/drivers/swr/swr_<wbr class="">state.h<br class="">
+++ b/src/gallium/drivers/swr/swr_<wbr class="">state.h<br class="">
@@ -376,4 +376,24 @@ swr_convert_prim_topology(<wbr class="">const unsigned mode)<br class="">
return TOP_UNKNOWN;<br class="">
}<br class="">
};<br class="">
+<br class="">
+/*<br class="">
+ * convert mesa PIPE_POLYGON_MODE_X to SWR enum SWR_FILLMODE<br class="">
+ */<br class="">
+static INLINE enum SWR_FILLMODE<br class="">
+swr_convert_fill_mode(const unsigned mode)<br class="">
+{<br class="">
+ switch(mode) {<br class="">
+ case PIPE_POLYGON_MODE_FILL:<br class="">
+ return SWR_FILLMODE_SOLID;<br class="">
+ case PIPE_POLYGON_MODE_LINE:<br class="">
+ return SWR_FILLMODE_WIREFRAME;<br class="">
+ case PIPE_POLYGON_MODE_POINT:<br class="">
+ return SWR_FILLMODE_POINT;<br class="">
+ default:<br class="">
+ assert(0 && "Unknown fillmode");<br class="">
+ return SWR_FILLMODE_SOLID; // at least do something sensible<br class="">
+ }<br class="">
+}<br class="">
+<br class="">
#endif<br class="">
--<br class="">
2.7.4<br class="">
<br class="">
______________________________<wbr class="">_________________<br class="">
mesa-dev mailing list<br class="">
<a href="mailto:mesa-dev@lists.freedesktop.org" class="">mesa-dev@lists.freedesktop.org</a><br class="">
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank" class="">https://lists.freedesktop.org/<wbr class="">mailman/listinfo/mesa-dev</a><br class="">
</blockquote>
</div>
</div>
_______________________________________________<br class="">
mesa-dev mailing list<br class="">
<a href="mailto:mesa-dev@lists.freedesktop.org" class="">mesa-dev@lists.freedesktop.org</a><br class="">
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" class="">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>