/** cast wrapper */
-static INLINE struct st_buffer_object *
+static inline struct st_buffer_object *
st_buffer_object(struct gl_buffer_object *obj)
{
return (struct st_buffer_object *) obj;
/**
* Helper function to set the fragment shaders.
*/
-static INLINE void
+static inline void
set_fragment_shader(struct st_context *st)
{
if (!st->clear.fs)
/**
* Helper function to set the vertex shader.
*/
-static INLINE void
+static inline void
set_vertex_shader(struct st_context *st)
{
/* vertex shader - still required to provide the linkage between
/**
* Return if the scissor must be enabled during the clear.
*/
-static INLINE GLboolean
+static inline GLboolean
is_scissor_enabled(struct gl_context *ctx, struct gl_renderbuffer *rb)
{
return (ctx->Scissor.EnableFlags & 1) &&
/**
* Return if all of the color channels are masked.
*/
-static INLINE GLboolean
+static inline GLboolean
is_color_disabled(struct gl_context *ctx, int i)
{
return !ctx->Color.ColorMask[i][0] &&
/**
* Return if any of the color channels are masked.
*/
-static INLINE GLboolean
+static inline GLboolean
is_color_masked(struct gl_context *ctx, int i)
{
return !ctx->Color.ColorMask[i][0] ||
/**
* Return if all of the stencil bits are masked.
*/
-static INLINE GLboolean
+static inline GLboolean
is_stencil_disabled(struct gl_context *ctx, struct gl_renderbuffer *rb)
{
const GLuint stencilMax = 0xff;
/**
* Return if any of the stencil bits are masked.
*/
-static INLINE GLboolean
+static inline GLboolean
is_stencil_masked(struct gl_context *ctx, struct gl_renderbuffer *rb)
{
const GLuint stencilMax = 0xff;
};
-static INLINE struct st_renderbuffer *
+static inline struct st_renderbuffer *
st_renderbuffer(struct gl_renderbuffer *rb)
{
return (struct st_renderbuffer *) rb;
* GL Feedback functions
**********************************************************************/
-static INLINE struct feedback_stage *
+static inline struct feedback_stage *
feedback_stage( struct draw_stage *stage )
{
return (struct feedback_stage *)stage;
/** Check if we have a front color buffer and if it's been drawn to. */
-static INLINE GLboolean
+static inline GLboolean
is_front_buffer_dirty(struct st_context *st)
{
struct gl_framebuffer *fb = st->ctx->DrawBuffer;
/**
* Cast wrapper
*/
-static INLINE struct st_query_object *
+static inline struct st_query_object *
st_query_object(struct gl_query_object *q)
{
return (struct st_query_object *) q;
};
-static INLINE struct rastpos_stage *
+static inline struct rastpos_stage *
rastpos_stage( struct draw_stage *stage )
{
return (struct rastpos_stage *) stage;
* We'll only return non-null for window system framebuffers.
* Note that this function may fail.
*/
-static INLINE struct st_framebuffer *
+static inline struct st_framebuffer *
st_ws_framebuffer(struct gl_framebuffer *fb)
{
/* FBO cannot be casted. See st_new_framebuffer */
struct pipe_stream_output_target *draw_count;
};
-static INLINE struct st_transform_feedback_object *
+static inline struct st_transform_feedback_object *
st_transform_feedback_object(struct gl_transform_feedback_object *obj)
{
return (struct st_transform_feedback_object *) obj;
/* Need this so that we can implement Mesa callbacks in this module.
*/
-static INLINE struct st_context *st_context(struct gl_context *ctx)
+static inline struct st_context *st_context(struct gl_context *ctx)
{
return ctx->st;
}
#define Y_0_TOP 1
#define Y_0_BOTTOM 2
-static INLINE GLuint
+static inline GLuint
st_fb_orientation(const struct gl_framebuffer *fb)
{
if (fb && _mesa_is_winsys_fbo(fb)) {
void st_debug_init( void );
-static INLINE void
+static inline void
ST_DBG( unsigned flag, const char *fmt, ... )
{
if (ST_DEBUG & flag)
* This function is basically a cast wrapper to avoid warnings when building
* in 64-bit mode.
*/
-static INLINE unsigned
+static inline unsigned
pointer_to_offset(const void *ptr)
{
return (unsigned) (((GLsizeiptr) ptr) & 0xffffffffUL);
* We'll only return non-null for window system framebuffers.
* Note that this function may fail.
*/
-static INLINE struct st_framebuffer *
+static inline struct st_framebuffer *
st_ws_framebuffer(struct gl_framebuffer *fb)
{
/* FBO cannot be casted. See st_new_framebuffer */
/**
* Map an attachment to a buffer index.
*/
-static INLINE gl_buffer_index
+static inline gl_buffer_index
attachment_to_buffer_index(enum st_attachment_type statt)
{
gl_buffer_index index;
/**
* Map a buffer index to an attachment.
*/
-static INLINE enum st_attachment_type
+static inline enum st_attachment_type
buffer_index_to_attachment(gl_buffer_index index)
{
enum st_attachment_type statt;
-static INLINE struct st_fragment_program *
+static inline struct st_fragment_program *
st_fragment_program( struct gl_fragment_program *fp )
{
return (struct st_fragment_program *)fp;
}
-static INLINE struct st_vertex_program *
+static inline struct st_vertex_program *
st_vertex_program( struct gl_vertex_program *vp )
{
return (struct st_vertex_program *)vp;
}
-static INLINE struct st_geometry_program *
+static inline struct st_geometry_program *
st_geometry_program( struct gl_geometry_program *gp )
{
return (struct st_geometry_program *)gp;
}
-static INLINE void
+static inline void
st_reference_vertprog(struct st_context *st,
struct st_vertex_program **ptr,
struct st_vertex_program *prog)
(struct gl_program *) prog);
}
-static INLINE void
+static inline void
st_reference_geomprog(struct st_context *st,
struct st_geometry_program **ptr,
struct st_geometry_program *prog)
(struct gl_program *) prog);
}
-static INLINE void
+static inline void
st_reference_fragprog(struct st_context *st,
struct st_fragment_program **ptr,
struct st_fragment_program *prog)
/**
* This defines mapping from Mesa VARYING_SLOTs to TGSI GENERIC slots.
*/
-static INLINE unsigned
+static inline unsigned
st_get_generic_varying_index(struct st_context *st, GLuint attr)
{
if (attr >= VARYING_SLOT_VAR0) {
};
-static INLINE struct st_texture_image *
+static inline struct st_texture_image *
st_texture_image(struct gl_texture_image *img)
{
return (struct st_texture_image *) img;
}
-static INLINE const struct st_texture_image *
+static inline const struct st_texture_image *
st_texture_image_const(const struct gl_texture_image *img)
{
return (const struct st_texture_image *) img;
}
-static INLINE struct st_texture_object *
+static inline struct st_texture_object *
st_texture_object(struct gl_texture_object *obj)
{
return (struct st_texture_object *) obj;
}
-static INLINE const struct st_texture_object *
+static inline const struct st_texture_object *
st_texture_object_const(const struct gl_texture_object *obj)
{
return (const struct st_texture_object *) obj;
}
-static INLINE struct pipe_resource *
+static inline struct pipe_resource *
st_get_texobj_resource(struct gl_texture_object *texObj)
{
struct st_texture_object *stObj = st_texture_object(texObj);
}
-static INLINE struct pipe_resource *
+static inline struct pipe_resource *
st_get_stobj_resource(struct st_texture_object *stObj)
{
return stObj ? stObj->pt : NULL;
}
-static INLINE struct pipe_sampler_view *
+static inline struct pipe_sampler_view *
st_create_texture_sampler_view_format(struct pipe_context *pipe,
struct pipe_resource *texture,
enum pipe_format format)
return pipe->create_sampler_view(pipe, texture, &templ);
}
-static INLINE struct pipe_sampler_view *
+static inline struct pipe_sampler_view *
st_create_texture_sampler_view(struct pipe_context *pipe,
struct pipe_resource *texture)
{