#include "svga_context.h"
#include "svga_resource_buffer.h"
-/***********************************************************************
- * Constant buffers
- */
-struct svga_constbuf
+struct svga_constbuf
{
unsigned type;
float (*data)[4];
-static void svga_set_constant_buffer(struct pipe_context *pipe,
- uint shader, uint index,
- struct pipe_constant_buffer *cb)
+static void
+svga_set_constant_buffer(struct pipe_context *pipe,
+ enum pipe_shader_type shader, uint index,
+ const struct pipe_constant_buffer *cb)
{
struct svga_screen *svgascreen = svga_screen(pipe->screen);
struct svga_context *svga = svga_context(pipe);
}
assert(shader < PIPE_SHADER_TYPES);
- assert(index < Elements(svga->curr.constbufs[shader]));
+ assert(index < ARRAY_SIZE(svga->curr.constbufs[shader]));
assert(index < svgascreen->max_const_buffers);
(void) svgascreen;
}
-
-void svga_init_constbuffer_functions( struct svga_context *svga )
+void
+svga_init_constbuffer_functions(struct svga_context *svga)
{
svga->pipe.set_constant_buffer = svga_set_constant_buffer;
}