panfrost: Use nir_gather_info information about discards
[mesa.git] / src / gallium / drivers / svga / svga_pipe_constants.c
index 8150879ea13b9b826cc56fcd9a250cb3182343f4..4ef8fb7379638c373442f343cf47ddf002392510 100644 (file)
 #include "svga_context.h"
 #include "svga_resource_buffer.h"
 
-/***********************************************************************
- * Constant buffers 
- */
 
-struct svga_constbuf 
+struct svga_constbuf
 {
    unsigned type;
    float (*data)[4];
@@ -44,9 +41,10 @@ struct svga_constbuf
 
 
 
-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);
@@ -64,7 +62,7 @@ static void svga_set_constant_buffer(struct pipe_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;
 
@@ -95,8 +93,8 @@ static void svga_set_constant_buffer(struct pipe_context *pipe,
 }
 
 
-
-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;
 }