#include "pipe/p_state.h"
-/* u_memory.h conflicts with st/mesa */
-#ifndef Elements
-#define Elements(x) (sizeof(x)/sizeof((x)[0]))
-#endif
-
-
#ifdef __cplusplus
extern "C" {
#endif
unsigned num_sampler_states,
void **sampler_states)
{
- assert(num_sampler_states <= Elements(blitter->saved_sampler_states));
+ assert(num_sampler_states <= ARRAY_SIZE(blitter->saved_sampler_states));
blitter->saved_num_sampler_states = num_sampler_states;
memcpy(blitter->saved_sampler_states, sampler_states,
struct pipe_sampler_view **views)
{
unsigned i;
- assert(num_views <= Elements(blitter->saved_sampler_views));
+ assert(num_views <= ARRAY_SIZE(blitter->saved_sampler_views));
blitter->saved_num_sampler_views = num_views;
for (i = 0; i < num_views; i++)
struct pipe_stream_output_target **targets)
{
unsigned i;
- assert(num_targets <= Elements(blitter->saved_so_targets));
+ assert(num_targets <= ARRAY_SIZE(blitter->saved_so_targets));
blitter->saved_num_so_targets = num_targets;
for (i = 0; i < num_targets; i++)