I found a problem with texture buffers that I missed before. We need to
discard the texture's sampler view if the texture buffer offset/size
params change. The cleanest way to tell the state tracker about this is
to use the ctx->Driver.TexParameter() callback. I've made that change,
Actually, I just need to bracket some of the assertions with the test
for GL_TEXTURE_BUFFER. I'll make that change and re-test before
pushing. I suspect I did my piglit run w/ a release build on Windows.
Thanks for reviewing.
-Brian
On 10/02/2016 02:53 PM, Marek Olšák wrote:
One more fix
One more fix for TBOs is needed:
diff --git a/src/mesa/state_tracker/st_sampler_view.c
b/src/mesa/state_tracker/st_sampler_view.c
index da1df86..a0bea46 100644
--- a/src/mesa/state_tracker/st_sampler_view.c
+++ b/src/mesa/state_tracker/st_sampler_view.c
@@ -459,7 +459,7 @@
FYI, the series breaks this test:
piglit/bin/glsl-resource-not-bound Buffer -auto -fbo
glsl-resource-not-bound: state_tracker/st_sampler_view.c:456:
st_get_texture_sampler_view_from_stobj: Assertion `stObj->pt' failed.
Aborted
Removing the assertion fixes it. Note that empty TBO slots are NULL.
You also need this:
diff --git a/src/mesa/state_tracker/st_vdpau.c
b/src/mesa/state_tracker/st_vdpau.c
index 4f599dd..cafbd3d 100644
--- a/src/mesa/state_tracker/st_vdpau.c
+++ b/src/mesa/state_tracker/st_vdpau.c
@@ -44,6 +44,7 @@
#include "st_vdpau.h"
#include "st_context.h"
#include
Previously, the sampler view code was scattered across several different
files.
Note, the previous REALLOC(), FREE() for st_texture_object::sampler_views
are replaced by realloc(), free() to avoid conflicting macros in Mesa vs.
Gallium.
---
src/mesa/Makefile.sources | 2 +