<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [SNB] The graphic corruption when we reuse the GS compiled and used for TFB when statebuffer contain magic trash in the unused space"
href="https://bugs.freedesktop.org/show_bug.cgi?id=107579#c7">Comment # 7</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [SNB] The graphic corruption when we reuse the GS compiled and used for TFB when statebuffer contain magic trash in the unused space"
href="https://bugs.freedesktop.org/show_bug.cgi?id=107579">bug 107579</a>
from <span class="vcard"><a class="email" href="mailto:andrey.simiklit@gmail.com" title="asimiklit <andrey.simiklit@gmail.com>"> <span class="fn">asimiklit</span></a>
</span></b>
<pre>Created <span class=""><a href="attachment.cgi?id=141137" name="attach_141137" title="simple program and makefile">attachment 141137</a> <a href="attachment.cgi?id=141137&action=edit" title="simple program and makefile">[details]</a></span>
simple program and makefile
Added simple reproducer program
Note: I was a bit wrong the magic value 0xFFFFFFFF is enough for HANG only for
the graphical corruption we need the following values:
((uint32_t*)vbuffer0Ptr)[0] = 0x2003625aU;
((uint32_t*)vbuffer0Ptr)[1] = 0x02040110U;
((uint32_t*)vbuffer0Ptr)[2] = 0x2027625aU;
((uint32_t*)vbuffer0Ptr)[3] = 0x02040210U;
They are used in the following function:
<span class="quote">>bool allocBufferWithMagicTrash(GLuint idx)
>{
> bool oval = false;
> enum { kSize = 16384 };
> glBindBuffer(GL_ARRAY_BUFFER, idx);
> glBufferData(GL_ARRAY_BUFFER, kSize, NULL, GL_STATIC_DRAW);
> void * vbuffer0Ptr = glMapBuffer(GL_ARRAY_BUFFER, GL_READ_WRITE);
> assert(vbuffer0Ptr);
> if(vbuffer0Ptr)
> {
> memset(vbuffer0Ptr, 0xFF, kSize);
> ((uint32_t*)vbuffer0Ptr)[0] = 0x2003625aU;
> ((uint32_t*)vbuffer0Ptr)[1] = 0x02040110U;
> ((uint32_t*)vbuffer0Ptr)[2] = 0x2027625aU;
> ((uint32_t*)vbuffer0Ptr)[3] = 0x02040210U;
> glUnmapBuffer(GL_ARRAY_BUFFER);
> glBindBuffer(GL_ARRAY_BUFFER, 0);
> }
> return oval;
>}</span ></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>