<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, May 28, 2018 at 3:21 PM, Ilia Mirkin <span dir="ltr"><<a href="mailto:imirkin@alum.mit.edu" target="_blank">imirkin@alum.mit.edu</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 Mon, May 28, 2018 at 3:12 PM, Marek Olšák <<a href="mailto:maraeo@gmail.com">maraeo@gmail.com</a>> wrote:<br>
> On Mon, May 28, 2018 at 3:05 PM, Ilia Mirkin <<a href="mailto:imirkin@alum.mit.edu">imirkin@alum.mit.edu</a>> wrote:<br>
>><br>
>> On Mon, May 28, 2018 at 2:48 PM, Marek Olšák <<a href="mailto:maraeo@gmail.com">maraeo@gmail.com</a>> wrote:<br>
>> > On Mon, May 28, 2018 at 5:29 AM, Nicolai Hähnle <<a href="mailto:nhaehnle@gmail.com">nhaehnle@gmail.com</a>><br>
>> > wrote:<br>
>> >><br>
>> >> On 25.05.2018 23:03, Marek Olšák wrote:<br>
>> >>><br>
>> >>> From: Marek Olšák <<a href="mailto:marek.olsak@amd.com">marek.olsak@amd.com</a>><br>
>> >>><br>
>> >>> Bindless texture handles can be passed via vertex attribs using this<br>
>> >>> type.<br>
>> >>> This fixes a bunch of bindless piglit tests on radeonsi.<br>
>> >>><br>
>> >>> Cc: 18.0 18.1 <<a href="mailto:mesa-stable@lists.freedesktop.org">mesa-stable@lists.<wbr>freedesktop.org</a>><br>
>> >>> ---<br>
>> >>>   src/mesa/state_tracker/st_<wbr>atom_array.c | 3 +++<br>
>> >>>   1 file changed, 3 insertions(+)<br>
>> >>><br>
>> >>> diff --git a/src/mesa/state_tracker/st_<wbr>atom_array.c<br>
>> >>> b/src/mesa/state_tracker/st_<wbr>atom_array.c<br>
>> >>> index 9a0935e21a5..76dc81975c8 100644<br>
>> >>> --- a/src/mesa/state_tracker/st_<wbr>atom_array.c<br>
>> >>> +++ b/src/mesa/state_tracker/st_<wbr>atom_array.c<br>
>> >>> @@ -292,20 +292,23 @@ st_pipe_vertex_format(const struct<br>
>> >>> gl_array_attributes *attrib)<br>
>> >>>         assert(size == 3 && !integer && format == GL_RGBA);<br>
>> >>>         return PIPE_FORMAT_R11G11B10_FLOAT;<br>
>> >>>        case GL_UNSIGNED_BYTE:<br>
>> >>>         if (format == GL_BGRA) {<br>
>> >>>            /* this is an odd-ball case */<br>
>> >>>            assert(normalized);<br>
>> >>>            return PIPE_FORMAT_B8G8R8A8_UNORM;<br>
>> >>>         }<br>
>> >>>         break;<br>
>> >>> +<br>
>> >>> +   case GL_UNSIGNED_INT64_ARB:<br>
>> >>> +      return PIPE_FORMAT_R32G32_UINT;<br>
>> >><br>
>> >><br>
>> >> Is it not possible to have vectors of uint64 as attributes?<br>
>> ><br>
>> ><br>
>> > I don't think we support uint64 in shaders. We only support bindless<br>
>> > samplers, which can't be vectors.<br>
>><br>
>> While we do support them in theory [i64vecN attributes], in practice<br>
>> they get lowered in init_velement_lowered (ideally attrib->Doubles is<br>
>> set there). Given that the 64-bit bindless attributes have the same<br>
>> counting issues, I think they should go through the same lowering<br>
>> logic, even though in practice it won't matter (since it always fits<br>
>> into a single attribute).<br>
>><br>
>> I did do a bit of tracing, and it seemed like that should already work<br>
>> with the current code, but clearly it doesn't for some reason.<br>
>><br>
>> This patch seems like a workaround, although in practice, it will work<br>
>> too.<br>
><br>
><br>
> Vector uint64 vertex attributes are only supported with the NV extension.<br>
<br>
</div></div>Indeed you're right -- I thought ARB_gpu_shader_int64 would support<br>
them, but I had misread it earlier. However the remainder of my<br>
arguments applies, I think.<br>
<br>
_mesa_VertexAttribLPointer sets doubles to true, so it should already work.<br></blockquote><div><br></div><div>It doesn't work with immediate mode (stride=0). I'll send out a new series.</div><div><br></div><div>Marek<br></div></div></div></div>