<div dir="ltr"><div>Reviewed-by: Marek Olšák <<a href="mailto:marek.olsak@amd.com">marek.olsak@amd.com</a>></div><div><br></div><div>Marek</div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Dec 14, 2018 at 8:43 PM Ilia Mirkin <<a href="mailto:imirkin@alum.mit.edu">imirkin@alum.mit.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">A long time ago, when this was first implemented, not having a sampler<br>
bound would cause problems on Fermi. I didn't work out the reasons, but<br>
the solution was simple -- just put the samplers back in.<br>
<br>
Since then, regular texturing paths appear to have lost their associated<br>
samplers which required a fuller investigation and fix in nouveau. Now<br>
that this is done, this code should no longer need a sampler state for<br>
fetching texels from a buffer texture.<br>
<br>
Signed-off-by: Ilia Mirkin <<a href="mailto:imirkin@alum.mit.edu" target="_blank">imirkin@alum.mit.edu</a>><br>
---<br>
<br>
This was introduced in 2b938a390 which fixed a number of legitimate<br>
issues, as well as this which ultimately was an issue in nouveau which<br>
in turn were fixed in 153d3fc5f9.<br>
<br>
At the time this was the only way for the condition to occur. However<br>
now more bits have changed and a txf on a buffer could end up happening<br>
without a sampler bound under "usual" circumstances, which necessitated<br>
an investigation and proper fix.<br>
<br>
src/mesa/state_tracker/st_cb_texture.c | 5 -----<br>
1 file changed, 5 deletions(-)<br>
<br>
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c<br>
index b8cc616d8f2..45918e425ac 100644<br>
--- a/src/mesa/state_tracker/st_cb_texture.c<br>
+++ b/src/mesa/state_tracker/st_cb_texture.c<br>
@@ -1192,7 +1192,6 @@ try_pbo_upload_common(struct gl_context *ctx,<br>
return false;<br>
<br>
cso_save_state(cso, (CSO_BIT_FRAGMENT_SAMPLER_VIEWS |<br>
- CSO_BIT_FRAGMENT_SAMPLERS |<br>
CSO_BIT_VERTEX_ELEMENTS |<br>
CSO_BIT_AUX_VERTEX_BUFFER_SLOT |<br>
CSO_BIT_FRAMEBUFFER |<br>
@@ -1216,8 +1215,6 @@ try_pbo_upload_common(struct gl_context *ctx,<br>
{<br>
struct pipe_sampler_view templ;<br>
struct pipe_sampler_view *sampler_view;<br>
- struct pipe_sampler_state sampler = {0};<br>
- const struct pipe_sampler_state *samplers[1] = {&sampler};<br>
<br>
memset(&templ, 0, sizeof(templ));<br>
templ.target = PIPE_BUFFER;<br>
@@ -1237,8 +1234,6 @@ try_pbo_upload_common(struct gl_context *ctx,<br>
cso_set_sampler_views(cso, PIPE_SHADER_FRAGMENT, 1, &sampler_view);<br>
<br>
pipe_sampler_view_reference(&sampler_view, NULL);<br>
-<br>
- cso_set_samplers(cso, PIPE_SHADER_FRAGMENT, 1, samplers);<br>
}<br>
<br>
/* Framebuffer_state */<br>
-- <br>
2.18.1<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</blockquote></div>