* If an option has been successfully parsed, argi is updated
* to point just after the option and return TRUE.
*/
-PUBLIC boolean graw_parse_args(int *argi, int argc, char *argv[]);
+PUBLIC bool graw_parse_args(int *argi, int argc, char *argv[]);
/* Saves surface contents to a file.
*
*
* Returns TRUE if the surface has been saved.
*/
-PUBLIC boolean graw_save_surface_to_file(struct pipe_context *pipe,
- struct pipe_surface *surface,
- const char *filename);
+PUBLIC bool graw_save_surface_to_file(struct pipe_context *pipe,
+ struct pipe_surface *surface,
+ const char *filename);
#endif
#ifndef _ST_API_H_
#define _ST_API_H_
-#include "pipe/p_compiler.h"
#include "pipe/p_format.h"
/**
*/
struct st_config_options
{
- boolean disable_blend_func_extended;
- boolean disable_glsl_line_continuations;
- boolean force_glsl_extensions_warn;
+ bool disable_blend_func_extended;
+ bool disable_glsl_line_continuations;
+ bool force_glsl_extensions_warn;
unsigned force_glsl_version;
- boolean allow_glsl_extension_directive_midshader;
- boolean allow_glsl_builtin_const_expression;
- boolean allow_glsl_relaxed_es;
- boolean allow_glsl_builtin_variable_redeclaration;
- boolean allow_higher_compat_version;
- boolean glsl_zero_init;
- boolean force_glsl_abs_sqrt;
- boolean allow_glsl_cross_stage_interpolation_mismatch;
- boolean allow_glsl_layout_qualifier_on_function_parameters;
+ bool allow_glsl_extension_directive_midshader;
+ bool allow_glsl_builtin_const_expression;
+ bool allow_glsl_relaxed_es;
+ bool allow_glsl_builtin_variable_redeclaration;
+ bool allow_higher_compat_version;
+ bool glsl_zero_init;
+ bool force_glsl_abs_sqrt;
+ bool allow_glsl_cross_stage_interpolation_mismatch;
+ bool allow_glsl_layout_qualifier_on_function_parameters;
unsigned char config_options_sha1[20];
};
*
* @att is one of the front buffer attachments.
*/
- boolean (*flush_front)(struct st_context_iface *stctx,
- struct st_framebuffer_iface *stfbi,
- enum st_attachment_type statt);
+ bool (*flush_front)(struct st_context_iface *stctx,
+ struct st_framebuffer_iface *stfbi,
+ enum st_attachment_type statt);
/**
* The state tracker asks for the textures it needs.
* the last call might be destroyed. This behavior might change in the
* future.
*/
- boolean (*validate)(struct st_context_iface *stctx,
- struct st_framebuffer_iface *stfbi,
- const enum st_attachment_type *statts,
- unsigned count,
- struct pipe_resource **out);
- boolean (*flush_swapbuffers) (struct st_context_iface *stctx,
- struct st_framebuffer_iface *stfbi);
+ bool (*validate)(struct st_context_iface *stctx,
+ struct st_framebuffer_iface *stfbi,
+ const enum st_attachment_type *statts,
+ unsigned count,
+ struct pipe_resource **out);
+ bool (*flush_swapbuffers) (struct st_context_iface *stctx,
+ struct st_framebuffer_iface *stfbi);
};
/**
*
* This function is optional.
*/
- boolean (*teximage)(struct st_context_iface *stctxi,
- enum st_texture_type target,
- int level, enum pipe_format internal_format,
- struct pipe_resource *tex, boolean mipmap);
+ bool (*teximage)(struct st_context_iface *stctxi,
+ enum st_texture_type target,
+ int level, enum pipe_format internal_format,
+ struct pipe_resource *tex, bool mipmap);
/**
* Used to implement glXCopyContext.
/**
* Used to implement wglShareLists.
*/
- boolean (*share)(struct st_context_iface *stctxi,
- struct st_context_iface *stsrci);
+ bool (*share)(struct st_context_iface *stctxi,
+ struct st_context_iface *stsrci);
/**
* Start the thread if the API has a worker thread.
*
* This function is optional.
*/
- boolean (*get_egl_image)(struct st_manager *smapi,
- void *egl_image,
- struct st_egl_image *out);
+ bool (*get_egl_image)(struct st_manager *smapi,
+ void *egl_image,
+ struct st_egl_image *out);
/**
* Query an manager param.
* The framebuffers might be NULL, or might have different visuals than the
* context does.
*/
- boolean (*make_current)(struct st_api *stapi,
- struct st_context_iface *stctxi,
- struct st_framebuffer_iface *stdrawi,
- struct st_framebuffer_iface *streadi);
+ bool (*make_current)(struct st_api *stapi,
+ struct st_context_iface *stctxi,
+ struct st_framebuffer_iface *stdrawi,
+ struct st_framebuffer_iface *streadi);
/**
* Get the currently bound context in the calling thread.
/**
* Return true if the visual has the specified buffers.
*/
-static inline boolean
+static inline bool
st_visual_have_buffers(const struct st_visual *visual, unsigned mask)
{
return ((visual->buffer_mask & mask) == mask);
#define SW_WINSYS_H
-#include "pipe/p_compiler.h" /* for boolean */
#include "pipe/p_format.h"
#include "state_tracker/winsys_handle.h"
void
(*destroy)( struct sw_winsys *ws );
- boolean
+ bool
(*is_displaytarget_format_supported)( struct sw_winsys *ws,
unsigned tex_usage,
enum pipe_format format );
/**
* Used to implement texture_get_handle.
*/
- boolean
+ bool
(*displaytarget_get_handle)( struct sw_winsys *ws,
struct sw_displaytarget *dt,
struct winsys_handle *whandle );
static void
swap_fences_unref(struct dri_drawable *draw);
-static boolean
+static bool
dri_st_framebuffer_validate(struct st_context_iface *stctx,
struct st_framebuffer_iface *stfbi,
const enum st_attachment_type *statts,
(struct dri_drawable *) stfbi->st_manager_private;
struct dri_screen *screen = dri_screen(drawable->sPriv);
unsigned statt_mask, new_mask;
- boolean new_stamp;
+ bool new_stamp;
int i;
unsigned int lastStamp;
struct pipe_resource **textures =
} while (lastStamp != drawable->dPriv->lastStamp);
if (!out)
- return TRUE;
+ return true;
/* Set the window-system buffers for the state tracker. */
for (i = 0; i < count; i++)
pipe_resource_reference(&out[i], textures[statts[i]]);
- return TRUE;
+ return true;
}
-static boolean
+static bool
dri_st_framebuffer_flush_front(struct st_context_iface *stctx,
struct st_framebuffer_iface *stfbi,
enum st_attachment_type statt)
/* XXX remove this and just set the correct one on the framebuffer */
drawable->flush_frontbuffer(ctx, drawable, statt);
- return TRUE;
+ return true;
}
/**
* The state tracker framebuffer interface flush_swapbuffers callback
*/
-static boolean
+static bool
dri_st_framebuffer_flush_swapbuffers(struct st_context_iface *stctx,
struct st_framebuffer_iface *stfbi)
{
if (drawable->flush_swapbuffers)
drawable->flush_swapbuffers(ctx, drawable);
- return TRUE;
+ return true;
}
/**
* This is called when we need to set up GL rendering to a new X window.
*/
-boolean
+bool
dri_create_buffer(__DRIscreen * sPriv,
__DRIdrawable * dPriv,
- const struct gl_config * visual, boolean isPixmap)
+ const struct gl_config * visual, bool isPixmap)
{
struct dri_screen *screen = sPriv->driverPrivate;
struct dri_drawable *drawable = NULL;
drawable->base.ID = p_atomic_inc_return(&drifb_ID);
drawable->base.state_manager = &screen->base;
- return GL_TRUE;
+ return true;
fail:
FREE(drawable);
- return GL_FALSE;
+ return false;
}
void
ctx->st->teximage(ctx->st,
(target == GL_TEXTURE_2D) ? ST_TEXTURE_2D : ST_TEXTURE_RECT,
- 0, internal_format, pt, FALSE);
+ 0, internal_format, pt, false);
}
}
struct dri_drawable *drawable = dri_drawable(dPriv);
struct st_context_iface *st;
unsigned flush_flags;
- boolean swap_msaa_buffers = FALSE;
+ bool swap_msaa_buffers = false;
if (!ctx) {
assert(0);
if (drawable->flushing)
return;
- drawable->flushing = TRUE;
+ drawable->flushing = true;
}
else {
flags &= ~__DRI2_FLUSH_DRAWABLE;
if (drawable->msaa_textures[ST_ATTACHMENT_FRONT_LEFT] &&
drawable->msaa_textures[ST_ATTACHMENT_BACK_LEFT]) {
- swap_msaa_buffers = TRUE;
+ swap_msaa_buffers = true;
}
/* FRONT_LEFT is resolved in drawable->flush_frontbuffer. */
}
if (drawable) {
- drawable->flushing = FALSE;
+ drawable->flushing = false;
}
/* Swap the MSAA front and back buffers, so that reading
unsigned int head;
unsigned int tail;
unsigned int desired_fences;
- boolean flushing; /* prevents recursion in dri_flush */
+ bool flushing; /* prevents recursion in dri_flush */
/* used only by DRISW */
struct pipe_surface *drisw_surface;
/***********************************************************************
* dri_drawable.c
*/
-boolean
+bool
dri_create_buffer(__DRIscreen * sPriv,
__DRIdrawable * dPriv,
- const struct gl_config * visual, boolean isPixmap);
+ const struct gl_config * visual, bool isPixmap);
void dri_destroy_buffer(__DRIdrawable * dPriv);
unsigned msaa_samples_max;
unsigned i;
struct pipe_screen *p_screen = screen->base.screen;
- boolean pf_z16, pf_x8z24, pf_z24x8, pf_s8z24, pf_z24s8, pf_z32;
- boolean mixed_color_depth;
- boolean allow_rgb10;
+ bool pf_z16, pf_x8z24, pf_z24x8, pf_s8z24, pf_z24s8, pf_z32;
+ bool mixed_color_depth;
+ bool allow_rgb10;
static const GLenum back_buffer_modes[] = {
__DRI_ATTRIB_SWAP_NONE, __DRI_ATTRIB_SWAP_UNDEFINED,
/* let the state tracker allocate the accum buffer */
}
-static boolean
+static bool
dri_get_egl_image(struct st_manager *smapi,
void *egl_image,
struct st_egl_image *stimg)
/**
* Display (present) an attachment to the xlib_drawable of the framebuffer.
*/
-static boolean
+static bool
xmesa_st_framebuffer_display(struct st_framebuffer_iface *stfbi,
enum st_attachment_type statt)
{
struct pipe_resource *pres;
if (!ptex)
- return TRUE;
+ return true;
pres = xstfb->display_resource;
/* (re)allocate the surface for the texture to be displayed */
}
xstfb->screen->flush_frontbuffer(xstfb->screen, pres, 0, 0, &xstfb->buffer->ws, NULL);
- return TRUE;
+ return true;
}
* Remove outdated textures and create the requested ones.
* This is a helper used during framebuffer validation.
*/
-boolean
+bool
xmesa_st_framebuffer_validate_textures(struct st_framebuffer_iface *stfbi,
unsigned width, unsigned height,
unsigned mask)
xstfb->texture_height = height;
xstfb->texture_mask = mask;
- return TRUE;
+ return true;
}
* \param count number of framebuffer attachments in statts[]
* \param out returns resources for each of the attachments
*/
-static boolean
+static bool
xmesa_st_framebuffer_validate(struct st_context_iface *stctx,
struct st_framebuffer_iface *stfbi,
const enum st_attachment_type *statts,
{
struct xmesa_st_framebuffer *xstfb = xmesa_st_framebuffer(stfbi);
unsigned statt_mask, new_mask, i;
- boolean resized;
- boolean ret;
+ bool resized;
+ bool ret;
/* build mask of ST_ATTACHMENT bits */
statt_mask = 0x0;
for (i = 0; i < count; i++)
pipe_resource_reference(&out[i], xstfb->textures[statts[i]]);
- return TRUE;
+ return true;
}
/**
* Called via st_framebuffer_iface::flush_front()
*/
-static boolean
+static bool
xmesa_st_framebuffer_flush_front(struct st_context_iface *stctx,
struct st_framebuffer_iface *stfbi,
enum st_attachment_type statt)
{
struct xmesa_st_framebuffer *xstfb = xmesa_st_framebuffer(stfbi);
- boolean ret;
+ bool ret;
ret = xmesa_st_framebuffer_display(stfbi, statt);
xmesa_swap_st_framebuffer(struct st_framebuffer_iface *stfbi)
{
struct xmesa_st_framebuffer *xstfb = xmesa_st_framebuffer(stfbi);
- boolean ret;
+ bool ret;
ret = xmesa_st_framebuffer_display(stfbi, ST_ATTACHMENT_BACK_LEFT);
if (ret) {
struct pipe_context*
xmesa_get_context(struct st_framebuffer_iface* stfbi);
-boolean
+bool
xmesa_st_framebuffer_validate_textures(struct st_framebuffer_iface *stfbi,
unsigned width, unsigned height,
unsigned mask);
}
-static boolean
+static bool
hgl_st_framebuffer_flush_front(struct st_context_iface *stctxi,
struct st_framebuffer_iface* stfbi, enum st_attachment_type statt)
{
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++)
pipe_resource_reference(&out[i], buffer->textures[statts[i]]);
- return TRUE;
+ return true;
}
* Called via glFlush/glFinish. This is where we copy the contents
* of the driver's color buffer into the user-specified buffer.
*/
-static boolean
+static bool
osmesa_st_framebuffer_flush_front(struct st_context_iface *stctx,
struct st_framebuffer_iface *stfbi,
enum st_attachment_type statt)
pipe->transfer_unmap(pipe, transfer);
- return TRUE;
+ return true;
}
* Called by the st manager to validate the framebuffer (allocate
* its resources).
*/
-static boolean
+static bool
osmesa_st_framebuffer_validate(struct st_context_iface *stctx,
struct st_framebuffer_iface *stfbi,
const enum st_attachment_type *statts,
screen->resource_create(screen, &templat);
}
- return TRUE;
+ return true;
}
static uint32_t osmesa_fb_ID = 0;
stwfb->texture_mask = mask;
}
-static boolean
+static bool
stw_st_framebuffer_validate(struct st_context_iface *stctx,
struct st_framebuffer_iface *stfb,
const enum st_attachment_type *statts,
stw_framebuffer_unlock(stwfb->fb);
- return TRUE;
+ return true;
}
/**
* Present an attachment of the framebuffer.
*/
-static boolean
+static bool
stw_st_framebuffer_present_locked(HDC hdc,
struct st_framebuffer_iface *stfb,
enum st_attachment_type statt)
assert(!stw_own_mutex(&stwfb->fb->mutex));
- return TRUE;
+ return true;
}
-static boolean
+static bool
stw_st_framebuffer_flush_front(struct st_context_iface *stctx,
struct st_framebuffer_iface *stfb,
enum st_attachment_type statt)
{
struct stw_st_framebuffer *stwfb = stw_st_framebuffer(stfb);
- boolean ret;
+ bool ret;
HDC hDC;
stw_framebuffer_lock(stwfb->fb);
/**
* Swap the buffers of the given framebuffer.
*/
-boolean
+bool
stw_st_swap_framebuffer_locked(HDC hdc, struct st_framebuffer_iface *stfb)
{
struct stw_st_framebuffer *stwfb = stw_st_framebuffer(stfb);
void
stw_st_destroy_framebuffer_locked(struct st_framebuffer_iface *stfb);
-boolean
+bool
stw_st_swap_framebuffer_locked(HDC hdc, struct st_framebuffer_iface *stfb);
struct pipe_resource *
static char out_filename[256] = "";
-PUBLIC boolean
+PUBLIC bool
graw_parse_args(int *argi,
int argc,
char *argv[])
{
if (strcmp(argv[*argi], "-o") == 0) {
if (*argi + 1 >= argc) {
- return FALSE;
+ return false;
}
strncpy(out_filename, argv[*argi + 1], sizeof(out_filename) - 1);
out_filename[sizeof(out_filename) - 1] = '\0';
*argi += 2;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
-PUBLIC boolean
+PUBLIC bool
graw_save_surface_to_file(struct pipe_context *pipe,
struct pipe_surface *surface,
const char *filename)
if (!filename || !*filename) {
filename = out_filename;
if (!filename || !*filename) {
- return FALSE;
+ return false;
}
}
/* XXX: Make that working in release builds.
*/
debug_dump_surface_bmp(pipe, filename, surface);
- return TRUE;
+ return true;
}
}
-static boolean
+static bool
dri_sw_is_displaytarget_format_supported( struct sw_winsys *ws,
unsigned tex_usage,
enum pipe_format format )
{
/* TODO: check visuals or other sensible thing here */
- return TRUE;
+ return true;
}
#ifdef HAVE_SYS_SHM_H
return NULL;
}
-static boolean
+static bool
dri_sw_displaytarget_get_handle(struct sw_winsys *winsys,
struct sw_displaytarget *dt,
struct winsys_handle *whandle)
if (whandle->type == WINSYS_HANDLE_TYPE_SHMID) {
if (dri_sw_dt->shmid < 0)
- return FALSE;
+ return false;
whandle->handle = dri_sw_dt->shmid;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
static void
}
-static boolean
+static bool
gdi_sw_is_displaytarget_format_supported( struct sw_winsys *ws,
unsigned tex_usage,
enum pipe_format format )
switch(format) {
case PIPE_FORMAT_B8G8R8X8_UNORM:
case PIPE_FORMAT_B8G8R8A8_UNORM:
- return TRUE;
+ return true;
/* TODO: Support other formats possible with BMPs, as described in
* http://msdn.microsoft.com/en-us/library/dd183376(VS.85).aspx */
default:
- return FALSE;
+ return false;
}
}
}
-static boolean
+static bool
gdi_sw_displaytarget_get_handle(struct sw_winsys *winsys,
struct sw_displaytarget *dt,
struct winsys_handle *whandle)
{
assert(0);
- return FALSE;
+ return false;
}
}
-static boolean
+static bool
hgl_winsys_is_displaytarget_format_supported(struct sw_winsys* winsys,
unsigned textureUsage, enum pipe_format format)
{
// TODO STUB
- return TRUE;
+ return true;
}
static color_space
}
-static boolean
+static bool
hgl_winsys_displaytarget_get_handle(struct sw_winsys* winsys,
struct sw_displaytarget* displayTarget, struct winsys_handle* whandle)
{
- return FALSE;
+ return false;
}
}
-static boolean
+static bool
kms_sw_is_displaytarget_format_supported( struct sw_winsys *ws,
unsigned tex_usage,
enum pipe_format format )
{
/* TODO: check visuals or other sensible thing here */
- return TRUE;
+ return true;
}
static struct kms_sw_plane *get_plane(struct kms_sw_displaytarget *kms_sw_dt,
return NULL;
}
-static boolean
+static bool
kms_sw_displaytarget_get_handle(struct sw_winsys *winsys,
struct sw_displaytarget *dt,
struct winsys_handle *whandle)
whandle->handle = kms_sw_dt->handle;
whandle->stride = plane->stride;
whandle->offset = plane->offset;
- return TRUE;
+ return true;
case WINSYS_HANDLE_TYPE_FD:
if (!drmPrimeHandleToFD(kms_sw->fd, kms_sw_dt->handle,
DRM_CLOEXEC, (int*)&whandle->handle)) {
whandle->stride = plane->stride;
whandle->offset = plane->offset;
- return TRUE;
+ return true;
}
/* fallthrough */
default:
whandle->handle = 0;
whandle->stride = 0;
whandle->offset = 0;
- return FALSE;
+ return false;
}
}
#include "null_sw_winsys.h"
-static boolean
+static bool
null_sw_is_displaytarget_format_supported(struct sw_winsys *ws,
unsigned tex_usage,
enum pipe_format format )
{
- return FALSE;
+ return false;
}
}
-static boolean
+static bool
null_sw_displaytarget_get_handle(struct sw_winsys *winsys,
struct sw_displaytarget *dt,
struct winsys_handle *whandle)
{
assert(0);
- return FALSE;
+ return false;
}
*/
-static boolean
+static bool
wsw_is_dt_format_supported(struct sw_winsys *ws,
unsigned tex_usage,
enum pipe_format format)
PIPE_BIND_DISPLAY_TARGET);
}
-static boolean
+static bool
wsw_dt_get_stride(struct wrapper_sw_displaytarget *wdt, unsigned *stride)
{
struct pipe_context *pipe = wdt->winsys->pipe;
PIPE_TRANSFER_READ_WRITE,
0, 0, wdt->tex->width0, wdt->tex->height0, &tr);
if (!map)
- return FALSE;
+ return false;
*stride = tr->stride;
wdt->stride = tr->stride;
pipe->transfer_unmap(pipe, tr);
- return TRUE;
+ return true;
}
static struct sw_displaytarget *
return wsw_dt_wrap_texture(wsw, tex, stride);
}
-static boolean
+static bool
wsw_dt_get_handle(struct sw_winsys *ws,
struct sw_displaytarget *dt,
struct winsys_handle *whandle)
#include <sys/shm.h>
#include <X11/extensions/XShm.h>
-DEBUG_GET_ONCE_BOOL_OPTION(xlib_no_shm, "XLIB_NO_SHM", FALSE)
+DEBUG_GET_ONCE_BOOL_OPTION(xlib_no_shm, "XLIB_NO_SHM", false)
/**
* Display target for Xlib winsys.
8, 0);
}
-static boolean
+static bool
xlib_is_displaytarget_format_supported(struct sw_winsys *ws,
unsigned tex_usage,
enum pipe_format format)
{
/* TODO: check visuals or other sensible thing here */
- return TRUE;
+ return true;
}
xlib_sw_display(struct xlib_drawable *xlib_drawable,
struct sw_displaytarget *dt)
{
- static boolean no_swap = 0;
- static boolean firsttime = 1;
+ static bool no_swap = false;
+ static bool firsttime = true;
struct xlib_displaytarget *xlib_dt = xlib_displaytarget(dt);
Display *display = xlib_dt->display;
XImage *ximage;
}
-static boolean
+static bool
xlib_displaytarget_get_handle(struct sw_winsys *winsys,
struct sw_displaytarget *dt,
struct winsys_handle *whandle)
{
assert(0);
- return FALSE;
+ return false;
}
struct pipe_resource *textures[ST_ATTACHMENT_COUNT];
uint width, height;
unsigned i;
- boolean changed = FALSE;
+ bool changed = false;
int32_t new_stamp;
new_stamp = p_atomic_read(&stfb->iface->stamp);
st_set_ws_renderbuffer_surface(strb, ps);
pipe_surface_reference(&ps, NULL);
- changed = TRUE;
+ changed = true;
width = strb->Base.Width;
height = strb->Base.Height;
* Add a renderbuffer to the framebuffer. The framebuffer is one that
* corresponds to a window and is not a user-created FBO.
*/
-static boolean
+static bool
st_framebuffer_add_renderbuffer(struct st_framebuffer *stfb,
gl_buffer_index idx, bool prefer_srgb)
{
struct gl_renderbuffer *rb;
enum pipe_format format;
- boolean sw;
+ bool sw;
assert(_mesa_is_winsys_fbo(&stfb->Base));
switch (idx) {
case BUFFER_DEPTH:
format = stfb->iface->visual->depth_stencil_format;
- sw = FALSE;
+ sw = false;
break;
case BUFFER_ACCUM:
format = stfb->iface->visual->accum_format;
- sw = TRUE;
+ sw = true;
break;
default:
format = stfb->iface->visual->color_format;
if (prefer_srgb)
format = util_format_srgb(format);
- sw = FALSE;
+ sw = false;
break;
}
if (format == PIPE_FORMAT_NONE)
- return FALSE;
+ return false;
rb = st_new_renderbuffer_fb(format, stfb->iface->visual->samples, sw);
if (!rb)
- return FALSE;
+ return false;
if (idx != BUFFER_DEPTH) {
_mesa_attach_and_own_rb(&stfb->Base, idx, rb);
- return TRUE;
+ return true;
}
bool rb_ownership_taken = false;
_mesa_attach_and_own_rb(&stfb->Base, BUFFER_STENCIL, rb);
}
- return TRUE;
+ return true;
}
}
-static boolean
+static bool
st_framebuffer_iface_lookup(struct st_manager *smapi,
const struct st_framebuffer_iface *stfbi)
{
}
-static boolean
+static bool
st_framebuffer_iface_insert(struct st_manager *smapi,
struct st_framebuffer_iface *stfbi)
{
st->gfx_shaders_may_be_dirty = true;
}
-static boolean
+static bool
st_context_teximage(struct st_context_iface *stctxi,
enum st_texture_type tex_type,
int level, enum pipe_format pipe_format,
- struct pipe_resource *tex, boolean mipmap)
+ struct pipe_resource *tex, bool mipmap)
{
struct st_context *st = (struct st_context *) stctxi;
struct gl_context *ctx = st->ctx;
_mesa_dirty_texobj(ctx, texObj);
_mesa_unlock_texture(ctx, texObj);
- return TRUE;
+ return true;
}
}
-static boolean
+static bool
st_context_share(struct st_context_iface *stctxi,
struct st_context_iface *stsrci)
{
}
-static boolean
+static bool
st_api_make_current(struct st_api *stapi, struct st_context_iface *stctxi,
struct st_framebuffer_iface *stdrawi,
struct st_framebuffer_iface *streadi)
{
struct st_context *st = (struct st_context *) stctxi;
struct st_framebuffer *stdraw, *stread;
- boolean ret;
+ bool ret;
if (st) {
/* reuse or create the draw fb */
* Add a color renderbuffer on demand. The FBO must correspond to a window,
* not a user-created FBO.
*/
-boolean
+bool
st_manager_add_color_renderbuffer(struct st_context *st,
struct gl_framebuffer *fb,
gl_buffer_index idx)
/* FBO */
if (!stfb)
- return FALSE;
+ return false;
assert(_mesa_is_winsys_fbo(fb));
if (stfb->Base.Attachment[idx].Renderbuffer)
- return TRUE;
+ return true;
switch (idx) {
case BUFFER_FRONT_LEFT:
case BUFFER_BACK_RIGHT:
break;
default:
- return FALSE;
+ return false;
}
if (!st_framebuffer_add_renderbuffer(stfb, idx,
stfb->Base.Visual.sRGBCapable))
- return FALSE;
+ return false;
st_framebuffer_update_attachments(stfb);
st_invalidate_buffers(st);
- return TRUE;
+ return true;
}
void
st_manager_validate_framebuffers(struct st_context *st);
-boolean
+bool
st_manager_add_color_renderbuffer(struct st_context *st, struct gl_framebuffer *fb,
gl_buffer_index idx);