[Piglit] [PATCH] arb_shader_image_load_store: set mipmap filtering to ensure texture are complete
Alejandro PiƱeiro
apinheiro at igalia.com
Fri Jul 15 08:56:42 UTC 2016
>From the OpenGL 4.3 Core Specification, section 8.25 ("Texture
Image Loads and Stores"):
"An access is considered invalid if:
* the texture bound to the selected image unit is incomplete;"
So when creating a texture in order to test cases that should work,
we need to ensure that the texture is complete.
---
tests/spec/arb_shader_image_load_store/common.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tests/spec/arb_shader_image_load_store/common.c b/tests/spec/arb_shader_image_load_store/common.c
index cbeaac7..3977458 100644
--- a/tests/spec/arb_shader_image_load_store/common.c
+++ b/tests/spec/arb_shader_image_load_store/common.c
@@ -141,6 +141,11 @@ upload_image_levels(const struct image_info img, unsigned num_levels,
glGenTextures(1, &textures[unit]);
glBindTexture(img.target->target, textures[unit]);
+ if (img.target->target != GL_TEXTURE_BUFFER) {
+ glTexParameteri(img.target->target, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ glTexParameteri(img.target->target, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ }
+
switch (img.target->target) {
case GL_TEXTURE_1D:
for (l = 0; l < num_levels; ++l) {
--
2.7.4
More information about the Piglit
mailing list