#include "pipe/p_format.h"
#include "util/u_atomic.h"
-#include "util/u_format.h"
+#include "util/format/u_format.h"
#include "util/u_memory.h"
#include "util/u_inlines.h"
#include "state_tracker/st_gl_api.h" /* for st_gl_api_create */
// Perform a safe void to hgl_buffer cast
-static inline struct hgl_buffer*
+//static inline struct hgl_buffer*
+struct hgl_buffer*
hgl_st_framebuffer(struct st_framebuffer_iface *stfbi)
{
struct hgl_buffer* buffer;
}
-static boolean
+static bool
hgl_st_framebuffer_flush_front(struct st_context_iface *stctxi,
struct st_framebuffer_iface* stfbi, enum st_attachment_type statt)
{
CALLED();
//struct hgl_context* context = hgl_st_context(stctxi);
- //struct hgl_buffer* buffer = hgl_st_context(stfbi);
+ // struct hgl_buffer* buffer = hgl_st_context(stfbi);
+ struct hgl_buffer* buffer = hgl_st_framebuffer(stfbi);
+ //buffer->surface
#if 0
struct stw_st_framebuffer *stwfb = stw_st_framebuffer(stfb);
- pipe_mutex_lock(stwfb->fb->mutex);
+ mtx_lock(&stwfb->fb->mutex);
struct pipe_resource* resource = textures[statt];
if (resource)
stw_framebuffer_present_locked(...);
#endif
- return TRUE;
+ return true;
}
-static boolean
+static bool
hgl_st_framebuffer_validate_textures(struct st_framebuffer_iface *stfbi,
unsigned width, unsigned height, unsigned mask)
{
buffer->height = height;
buffer->mask = mask;
- return TRUE;
+ return true;
}
* Called by the st manager to validate the framebuffer (allocate
* its resources).
*/
-static boolean
+static bool
hgl_st_framebuffer_validate(struct st_context_iface *stctxi,
struct st_framebuffer_iface *stfbi, const enum st_attachment_type *statts,
unsigned count, struct pipe_resource **out)
struct hgl_buffer* buffer;
unsigned stAttachmentMask, newMask;
unsigned i;
- boolean resized;
+ bool resized;
CALLED();
//}
}
- for (i = 0; i < count; i++) {
- out[i] = NULL;
+ for (i = 0; i < count; i++)
pipe_resource_reference(&out[i], buffer->textures[statts[i]]);
- }
- return TRUE;
+ return true;
}
//manager->display = dpy;
manager->screen = context->screen;
manager->get_param = hgl_st_manager_get_param;
-
+ manager->st_manager_private = (void *)context;
+
return manager;
}