Skip to content

gallium: replace get_param+PIPE_CAP with struct pipe_caps access

Qiang Yu requested to merge yuq825/mesa:topic/remove-screen-cap into main

As enum pipe_cap grow bigger and bigger, it's too expensive to access each PIPE_CAP with a big switch. And it's not convenient to add cap with different types and elements (array or struct). This MR introduce a pipe_caps struct for access anytime. Now I just move pipe_cap and pipe_capf to it. Shader caps, compute caps and video caps could be done the same way latter.

Commits in this MR is in following steps:

  • add and init pipe_caps for each driver which map from the original get_param and get_paramf implementation
  • replace the usage of get_param and get_paramf to pipe_caps in upper layer
  • remove the get_param and get_paramf implementations in each driver
  • cleanups for the get_param and get_paramf in code and doc
Edited by Qiang Yu

Merge request reports

Loading