diff options
author | Kevin Rogovin <[email protected]> | 2017-08-30 13:57:48 +0300 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2017-08-30 08:21:38 -0700 |
commit | 783f2b70c0013c4079af842c5e6e91f3ff9f5535 (patch) | |
tree | b957ca2d5c8fe0b8efdcd33c29ae3a306ce8b6e0 /src | |
parent | d808f44ae555d16369afe357e0983186da61efda (diff) |
i965: add 2xMSAA 16xMSAA modes to DRI configs.
For Gen8, add 2xMSAA. For Gen9, add 2xMSAA and 16xMSAA.
Special thanks to Eero Tamminen for reporting rasterizer
numbers being twice what it should be for 2xMSAA under
a benchmark.
V2: Make pointer name less ugly + add 2xMSAA for Gen8
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_screen.c | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c index f98475997d3..e0827cab36c 100644 --- a/src/mesa/drivers/dri/i965/intel_screen.c +++ b/src/mesa/drivers/dri/i965/intel_screen.c @@ -1882,7 +1882,6 @@ intel_screen_make_configs(__DRIscreen *dri_screen) }; static const uint8_t singlesample_samples[1] = {0}; - static const uint8_t multisample_samples[2] = {4, 8}; struct intel_screen *screen = dri_screen->driverPrivate; const struct gen_device_info *devinfo = &screen->devinfo; @@ -1966,6 +1965,7 @@ intel_screen_make_configs(__DRIscreen *dri_screen) __DRIconfig **new_configs; const int num_depth_stencil_bits = 2; int num_msaa_modes = 0; + const uint8_t *multisample_samples = NULL; depth_bits[0] = 0; stencil_bits[0] = 0; @@ -1978,10 +1978,23 @@ intel_screen_make_configs(__DRIscreen *dri_screen) stencil_bits[1] = 8; } - if (devinfo->gen >= 7) - num_msaa_modes = 2; - else if (devinfo->gen == 6) - num_msaa_modes = 1; + if (devinfo->gen >= 9) { + static const uint8_t multisample_samples_gen9[] = {2, 4, 8, 16}; + multisample_samples = multisample_samples_gen9; + num_msaa_modes = ARRAY_SIZE(multisample_samples_gen9); + } else if (devinfo->gen == 8) { + static const uint8_t multisample_samples_gen8[] = {2, 4, 8}; + multisample_samples = multisample_samples_gen8; + num_msaa_modes = ARRAY_SIZE(multisample_samples_gen8); + } else if (devinfo->gen == 7) { + static const uint8_t multisample_samples_gen7[] = {4, 8}; + multisample_samples = multisample_samples_gen7; + num_msaa_modes = ARRAY_SIZE(multisample_samples_gen7); + } else if (devinfo->gen == 6) { + static const uint8_t multisample_samples_gen6[] = {4}; + multisample_samples = multisample_samples_gen6; + num_msaa_modes = ARRAY_SIZE(multisample_samples_gen6); + } new_configs = driCreateConfigs(formats[i], depth_bits, |