<div dir="ltr">This has been squashed into the patch for testing glGetNamedBufferParameteri[64]v.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 1, 2015 at 4:54 AM, Martin Peres <span dir="ltr"><<a href="mailto:martin.peres@linux.intel.com" target="_blank">martin.peres@linux.intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 23/01/15 21:03, Laura Ekstrand wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
---<br>
.../arb_direct_state_access/<u></u>getnamedbufferparameter.c | 16 ++++++++++++----<br>
1 file changed, 12 insertions(+), 4 deletions(-)<br>
<br>
diff --git a/tests/spec/arb_direct_state_<u></u>access/<u></u>getnamedbufferparameter.c b/tests/spec/arb_direct_state_<u></u>access/<u></u>getnamedbufferparameter.c<br>
index 82bbfe2..45fc021 100644<br>
--- a/tests/spec/arb_direct_state_<u></u>access/<u></u>getnamedbufferparameter.c<br>
+++ b/tests/spec/arb_direct_state_<u></u>access/<u></u>getnamedbufferparameter.c<br>
@@ -22,8 +22,9 @@<br>
*/<br>
/**<br>
- * Adapted to test glGetNamedBufferParameteri[64]<u></u>v by Laura Ekstrand<br>
- * <<a href="mailto:laura@jlekstrand.net" target="_blank">laura@jlekstrand.net</a>>.<br>
+ * Adapted to test glGetNamedBufferParameteri[64]<u></u>v and<br>
+ * glGetNamedBufferPointerv by Laura Ekstrand <<a href="mailto:laura@jlekstrand.net" target="_blank">laura@jlekstrand.net</a>>, January<br>
+ * 2015.<br>
*/<br>
#include "piglit-util-gl.h"<br>
@@ -110,6 +111,7 @@ piglit_display(void)<br>
bool pass = true;<br>
GLuint bufname;<br>
GLint64 data = -2;<br>
+ void *dataptr = NULL;<br>
GLint dataint = -2;<br>
int stuff[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};<br>
@@ -167,13 +169,19 @@ piglit_display(void)<br>
/* Is it mapped? */<br>
glGetNamedBufferParameteri64v(<u></u>bufname, GL_BUFFER_MAPPED, &data);<br>
- if (data != GL_TRUE)<br>
- {<br>
+ if (data != GL_TRUE) {<br>
printf("GL_BUFFER_MAPPED: expected GL_TRUE, got GL_FALSE.\n");<br>
pass = false;<br>
}<br>
pass = piglit_check_gl_error(GL_NO_<u></u>ERROR) && pass;<br>
+ /* Check the pointer. */<br>
+ glGetNamedBufferPointerv(<u></u>bufname, GL_BUFFER_MAP_POINTER, &dataptr);<br>
+ if (!dataptr) {<br>
+ printf("GL_BUFFER_MAP_POINTER: Got NULL.\n");<br>
+ pass = false;<br>
+ }<br>
+ pass = piglit_check_gl_error(GL_NO_<u></u>ERROR) && pass;<br>
/* What is the offset? */<br>
glGetNamedBufferParameteri64v(<u></u>bufname, GL_BUFFER_MAP_OFFSET,<br>
</blockquote></div></div>
Could this be squashed in the previous commit? Same comment as for patch 4.<br>
</blockquote></div><br></div>