diff options
author | Brian Paul <[email protected]> | 2015-02-28 09:11:13 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2015-03-02 08:55:30 -0700 |
commit | 70b401029cf800f22e6c4318cfd2ab9bf118bb6c (patch) | |
tree | 1fdd2e991241324280d68533ca90167e91c7aef4 | |
parent | 2f0143ca968d739e8b9cefb213ac61402a7f6587 (diff) |
st/dri: replace Elements() with ARRAY_SIZE()
Acked-by: Ilia Mirkin <[email protected]>
-rw-r--r-- | src/gallium/state_trackers/dri/dri_screen.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/dri/dri_screen.c b/src/gallium/state_trackers/dri/dri_screen.c index 9cdebf8e269..1b14ab162f1 100644 --- a/src/gallium/state_trackers/dri/dri_screen.c +++ b/src/gallium/state_trackers/dri/dri_screen.c @@ -178,10 +178,10 @@ dri_fill_in_modes(struct dri_screen *screen) stencil_bits_array[depth_buffer_factor++] = 0; } - assert(Elements(mesa_formats) == Elements(pipe_formats)); + assert(ARRAY_SIZE(mesa_formats) == ARRAY_SIZE(pipe_formats)); /* Add configs. */ - for (format = 0; format < Elements(mesa_formats); format++) { + for (format = 0; format < ARRAY_SIZE(mesa_formats); format++) { __DRIconfig **new_configs = NULL; unsigned num_msaa_modes = 0; /* includes a single-sample mode */ uint8_t msaa_modes[MSAA_VISUAL_MAX_SAMPLES]; @@ -201,7 +201,7 @@ dri_fill_in_modes(struct dri_screen *screen) new_configs = driCreateConfigs(mesa_formats[format], depth_bits_array, stencil_bits_array, depth_buffer_factor, back_buffer_modes, - Elements(back_buffer_modes), + ARRAY_SIZE(back_buffer_modes), msaa_modes, 1, GL_TRUE); configs = driConcatConfigs(configs, new_configs); @@ -211,7 +211,7 @@ dri_fill_in_modes(struct dri_screen *screen) new_configs = driCreateConfigs(mesa_formats[format], depth_bits_array, stencil_bits_array, depth_buffer_factor, back_buffer_modes, - Elements(back_buffer_modes), + ARRAY_SIZE(back_buffer_modes), msaa_modes+1, num_msaa_modes-1, GL_FALSE); configs = driConcatConfigs(configs, new_configs); |