meson: Add Haiku platform support v4
[mesa.git] / src / gallium / targets / haiku-softpipe / GalliumContext.h
index e156ef895b422f44945a8fb4a2202790accad615..d8d75b91c06004b79ed6ce499af3f4e51f130702 100644 (file)
 #include <stddef.h>
 #include <kernel/image.h>
 
-extern "C" {
-#include "state_tracker/st_api.h"
 #include "pipe/p_compiler.h"
 #include "pipe/p_screen.h"
 #include "postprocess/filters.h"
-#include "os/os_thread.h"
-}
-#include "bitmap_wrapper.h"
-#include "GalliumFramebuffer.h"
-
-
-#define CONTEXT_MAX 32
-
-
-typedef int64 context_id;
-
-struct hgl_context
-{
-       struct st_api* api;
-               // State Tracker API
-       struct st_manager* manager;
-               // State Tracker Manager
-       struct st_context_iface* st;
-               // State Tracker Interface Object
-       struct st_visual* stVisual;
-               // State Tracker Visual
+#include "hgl_context.h"
 
-       struct pipe_resource* textures[ST_ATTACHMENT_COUNT];
-
-       // Post processing
-       struct pp_queue_t* postProcess;
-       unsigned int postProcessEnable[PP_FILTERS];
-
-       Bitmap* bitmap;
-       color_space colorSpace;
+#include "bitmap_wrapper.h"
 
-       GalliumFramebuffer* draw;
-       GalliumFramebuffer* read;
-};
 
 
 class GalliumContext {
@@ -68,7 +36,9 @@ public:
                                                                context_id contextID);
 
                status_t                        SwapBuffers(context_id contextID);
-               void                            ResizeViewport(int32 width, int32 height);
+
+               bool                            Validate(uint32 width, uint32 height);
+               void                            Invalidate(uint32 width, uint32 height);
 
 private:
                status_t                        CreateScreen();
@@ -80,8 +50,8 @@ private:
                // Context Management
                struct hgl_context*     fContext[CONTEXT_MAX];
                context_id                      fCurrentContext;
-               pipe_mutex                      fMutex;
+               mtx_t                   fMutex;
 };
-       
+
 
 #endif /* GALLIUMCONTEXT_H */