34cd0d114f
Rather than open-coding various resource -> type accessors, just stick a type enum in the buffer struct. Signed-off-by: Daniel Stone <daniels@collabora.com>