summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ilo/ilo_screen.c
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2014-09-12 10:55:58 +0800
committerChia-I Wu <[email protected]>2014-09-12 16:58:30 +0800
commit56d2ebb019f38d727a41f8f4a8ebd4f1aeee19e0 (patch)
tree44e84ab2aa0481e9f75a924ed2803bd7326f8064 /src/gallium/drivers/ilo/ilo_screen.c
parentea5de3e0bd82c52130633b1f01b5e0ed226b3b76 (diff)
ilo: use an accessor for dev->gen
It should enable us to do specialized builds by making the accessor return a constant.
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_screen.c')
-rw-r--r--src/gallium/drivers/ilo/ilo_screen.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gallium/drivers/ilo/ilo_screen.c b/src/gallium/drivers/ilo/ilo_screen.c
index c56e0e54456..82fda2c0aeb 100644
--- a/src/gallium/drivers/ilo/ilo_screen.c
+++ b/src/gallium/drivers/ilo/ilo_screen.c
@@ -310,18 +310,18 @@ ilo_get_param(struct pipe_screen *screen, enum pipe_cap param)
* GEN6 8192x8192x512 2048x2048x2048
* GEN7 16384x16384x2048 2048x2048x2048
*/
- return (is->dev.gen >= ILO_GEN(7)) ? 15 : 14;
+ return (ilo_dev_gen(&is->dev) >= ILO_GEN(7)) ? 15 : 14;
case PIPE_CAP_MAX_TEXTURE_3D_LEVELS:
return 12;
case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
- return (is->dev.gen >= ILO_GEN(7)) ? 15 : 14;
+ return (ilo_dev_gen(&is->dev) >= ILO_GEN(7)) ? 15 : 14;
case PIPE_CAP_TEXTURE_MIRROR_CLAMP:
return false;
case PIPE_CAP_BLEND_EQUATION_SEPARATE:
case PIPE_CAP_SM3:
return true;
case PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS:
- if (is->dev.gen >= ILO_GEN(7) && !is->dev.has_gen7_sol_reset)
+ if (ilo_dev_gen(&is->dev) >= ILO_GEN(7) && !is->dev.has_gen7_sol_reset)
return 0;
return ILO_MAX_SO_BUFFERS;
case PIPE_CAP_PRIMITIVE_RESTART:
@@ -330,7 +330,7 @@ ilo_get_param(struct pipe_screen *screen, enum pipe_cap param)
case PIPE_CAP_INDEP_BLEND_FUNC:
return true;
case PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS:
- return (is->dev.gen >= ILO_GEN(7)) ? 2048 : 512;
+ return (ilo_dev_gen(&is->dev) >= ILO_GEN(7)) ? 2048 : 512;
case PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT:
case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT:
case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER:
@@ -363,7 +363,7 @@ ilo_get_param(struct pipe_screen *screen, enum pipe_cap param)
case PIPE_CAP_MAX_STREAM_OUTPUT_INTERLEAVED_COMPONENTS:
return ILO_MAX_SO_BINDINGS;
case PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME:
- if (is->dev.gen >= ILO_GEN(7))
+ if (ilo_dev_gen(&is->dev) >= ILO_GEN(7))
return is->dev.has_gen7_sol_reset;
else
return false; /* TODO */
@@ -690,18 +690,18 @@ init_dev(struct ilo_dev_info *dev, const struct intel_winsys_info *info)
*/
if (gen_is_hsw(info->devid)) {
- dev->gen = ILO_GEN(7.5);
+ dev->gen_opaque = ILO_GEN(7.5);
dev->gt = gen_get_hsw_gt(info->devid);
dev->urb_size = ((dev->gt == 3) ? 512 :
(dev->gt == 2) ? 256 : 128) * 1024;
}
else if (gen_is_ivb(info->devid) || gen_is_vlv(info->devid)) {
- dev->gen = ILO_GEN(7);
+ dev->gen_opaque = ILO_GEN(7);
dev->gt = (gen_is_ivb(info->devid)) ? gen_get_ivb_gt(info->devid) : 1;
dev->urb_size = ((dev->gt == 2) ? 256 : 128) * 1024;
}
else if (gen_is_snb(info->devid)) {
- dev->gen = ILO_GEN(6);
+ dev->gen_opaque = ILO_GEN(6);
dev->gt = gen_get_snb_gt(info->devid);
dev->urb_size = ((dev->gt == 2) ? 64 : 32) * 1024;
}