gallium: use cso state handling for pipe_vertex_element state
[mesa.git] / src / gallium / include / pipe / p_video_state.h
index 4da26d608cf23326ed4c3412125368d2aeba7516..77e22d0a566a2ee512e9a6c6e843da364a81714c 100644 (file)
 
 /* u_reduce_video_profile() needs these */
 #include <pipe/p_compiler.h>
-#include <util/u_debug.h>
 
 #include <pipe/p_defines.h>
 #include <pipe/p_format.h>
-#include <pipe/p_refcnt.h>
+#include <pipe/p_state.h>
 #include <pipe/p_screen.h>
+#include <util/u_inlines.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -56,8 +56,9 @@ pipe_video_surface_reference(struct pipe_video_surface **ptr, struct pipe_video_
 {
    struct pipe_video_surface *old_surf = *ptr;
 
-   if (pipe_reference((struct pipe_reference **)ptr, &surf->reference))
+   if (pipe_reference(&(*ptr)->reference, &surf->reference))
       old_surf->screen->video_surface_destroy(old_surf);
+   *ptr = surf;
 }
 
 struct pipe_video_rect