gallium: replace get_param+PIPE_CAP with struct pipe_caps access
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 originalget_param
andget_paramf
implementation - replace the usage of
get_param
andget_paramf
topipe_caps
in upper layer - remove the
get_param
andget_paramf
implementations in each driver - cleanups for the
get_param
andget_paramf
in code and doc