Skip to content

gallium: pipe_resource union for texture/buffer properties

This series is a proposal to fix #2053 (comment 286218)

The goal is to store a struct pipe_resource buffer size in a intptr_t to match GL API (currently mesa uses a unsigned). To do so:

  • the first commit moves buffers-only and textures-only properties to separate structs
  • the second commit stores buffer.size in a intptr_t

I only quickly tested this branch with radeonsi and llvmpipe (and compile tested a few other drivers). I'll do more testing/fixing if the approach seems correct to other developers.

Another possibility would be to only keep the 2nd commit: sizeof(struct pipe_resource) is the same in both cases (56 bytes) but the change is less massive.

Thoughts?

Edited by Pierre-Eric Pelloux-Prayer

Merge request reports