* stored in a drm_intel_bo.
*/
+#include <stdbool.h>
#include <xf86drm.h>
#include "main/mtypes.h"
#include "intel_bufmgr.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct intel_context;
struct intel_buffer_object;
uint32_t tiling,
GLuint cpp, GLuint width,
GLuint height,
- GLboolean expect_accelerated_upload);
+ bool expect_accelerated_upload);
struct intel_region *
intel_region_alloc_for_handle(struct intel_screen *screen,
GLuint width, GLuint height, GLuint pitch,
unsigned int handle, const char *name);
-GLboolean
+bool
intel_region_flink(struct intel_region *region, uint32_t *name);
void intel_region_reference(struct intel_region **dst,
void intel_recreate_static_regions(struct intel_context *intel);
-/* Map/unmap regions. This is refcounted also:
+/**
+ * Map/unmap regions. This is refcounted also:
+ *
+ * \param mode bitmask of GL_MAP_READ_BIT, GL_MAP_WRITE_BIT
*/
-GLubyte *intel_region_map(struct intel_context *intel,
- struct intel_region *ib);
+void *intel_region_map(struct intel_context *intel,
+ struct intel_region *ib,
+ GLbitfield mode);
void intel_region_unmap(struct intel_context *intel, struct intel_region *ib);
/* Copy rectangular sub-regions
*/
-GLboolean
+bool
intel_region_copy(struct intel_context *intel,
struct intel_region *dest,
GLuint dest_offset,
struct intel_region *src,
GLuint src_offset,
GLuint srcx, GLuint srcy, GLuint width, GLuint height,
- GLboolean flip,
+ bool flip,
GLenum logicop);
void _mesa_copy_rect(GLubyte * dst,
const GLubyte * src,
GLuint src_pitch, GLuint src_x, GLuint src_y);
+void
+intel_region_get_tile_masks(struct intel_region *region,
+ uint32_t *mask_x, uint32_t *mask_y);
+
+uint32_t
+intel_region_get_aligned_offset(struct intel_region *region, uint32_t x,
+ uint32_t y);
+
struct __DRIimageRec {
struct intel_region *region;
GLenum internal_format;
+ uint32_t dri_format;
GLuint format;
- GLenum data_type;
+ uint32_t offset;
void *data;
};
+#ifdef __cplusplus
+}
+#endif
+
#endif