diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2013-07-04 12:11:36 -0700 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2013-10-13 00:10:43 -0700 |
commit | 6e9f427ed8a20d78e7d832b163d757827dd3e74f (patch) | |
tree | 512ebcd753f3387aa857f4d7cbb8c2738b0a3711 /src/mesa/drivers/dri/i965/brw_device_info.h | |
parent | 4a29b9a066737398890755ed9987e49841aac60f (diff) | |
download | external_mesa3d-6e9f427ed8a20d78e7d832b163d757827dd3e74f.zip external_mesa3d-6e9f427ed8a20d78e7d832b163d757827dd3e74f.tar.gz external_mesa3d-6e9f427ed8a20d78e7d832b163d757827dd3e74f.tar.bz2 |
i965: Add a new brw_device_info structure.
The idea is that struct brw_device_info should store statically-known
information about hardware features. Using the new family name in the
PCI ID table, we can easily grab the right structure.
This is basically the equivalent of intel_device_info in the kernel.
This patch also makes the new structure available from intel_screen, but
nothing uses it. Right now, it looks very redundant with existing
fields, but that will change.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_device_info.h')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_device_info.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_device_info.h b/src/mesa/drivers/dri/i965/brw_device_info.h new file mode 100644 index 0000000..9c2fecb --- /dev/null +++ b/src/mesa/drivers/dri/i965/brw_device_info.h @@ -0,0 +1,44 @@ + /* + * Copyright © 2013 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + */ + +#pragma once +#include <stdbool.h> + +struct brw_device_info +{ + int gen; /**< Generation number: 4, 5, 6, 7, ... */ + int gt; + + bool is_g4x; + bool is_ivybridge; + bool is_baytrail; + bool is_haswell; + + bool has_hiz_and_separate_stencil; + bool must_use_separate_stencil; + + bool has_llc; +}; + +const struct brw_device_info *brw_get_device_info(int devid); |