[Mesa-dev] [PATCH 2/2] panfrost: Implement Midgard shader toolchain
Eric Anholt
eric at anholt.net
Mon Feb 4 18:19:57 UTC 2019
Alyssa Rosenzweig <alyssa at rosenzweig.io> writes:
>> Looks like you leak the constants? You could pass ctx->ssa_constants
>> instead of NULL and the allocation would be automatically freed.
>
> Hm, alright. Is there documentation anywhere on how memctx works in
> general?
Top of src/util/ralloc.h?
>> > + nir_foreach_variable(var, &nir->uniforms) {
>> > + if (glsl_get_base_type(var->type) == GLSL_TYPE_SAMPLER) continue;
>> > +
>> > + unsigned length = glsl_get_aoa_size(var->type);
>> > +
>> > + if (!length) {
>> > + length = glsl_get_length(var->type);
>> > + }
>> > +
>> > + if (!length) {
>> > + length = glsl_get_matrix_columns(var->type);
>> > + }
>>
>> This seems suspicious -- I don't have anything like this for my uniforms.
>
> Suspicious indeed... what is the correct way to map, then, without
> allocating a uniform for samplers and other not-real-uniform-uniforms?
> The hardware just wants a vec4 index; NIR mirrors the GLSL; poof?
>
> I think I had troubles there, but I can't recall exactly.
Counting uniforms/attributes is all a confusing mess. I can confirm
that what I do in v3d works, I just can't explain how without going and
re-studying it.
>> All of this is suggestions for future work. I'm mostly glad to see the
>> driver coming into the tree at last. Both patches are:
>>
>> Acked-by: Eric Anholt <eric at anholt.net>
>
> Thank you! As I mentioned in the other email (to Rob), is there anything
> particular blocking a push into master?
Basically the only thing I have any concern about is allowing
end-user/distro builds of a panfrost_dri.so that doesn't actually work
(so, some day when panfrost.ko shows up upstream, suddenly the loader
starts trying to load this panfrost_dri.so and things break). For V3D I
had the build disabled on ARM until I had the kernel ABI settled (since
I was doing dev on x86 using a simulator), but I don't have a good
solution if you're doing all your work on ARMs. Maybe keep it out of
the list of drivers available in meson for now, since you're clearly
carrying out-of-tree code anyway?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20190204/54883334/attachment.sig>
More information about the mesa-dev
mailing list