a4cb756e4d
Right now opcode_desc struct, used to define data for all the operations to pack/unpack, include a version field. In theory that could be used to check if we are retrieving a opcode valid for our hw version, or to get the correct opcode if a given one changed across hw versions, or just the same if it didn't change. In practice that field was not used. So for example, if by mistake we asked for an opcode defined at version 41, while being on version 33 hardware, we would still get that opcode description. This commit fixes that, and as we are here we expand the functionality to allow to define version ranges, just in case a given opcode number and their description is only valid for a given range. v2 (from Iago feedback): * Fixed some comment typos * Simplified filtering opcode method * Rename filtering opcode method Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12301>