FREE(query);
}
-static boolean
+static bool
dd_context_begin_query(struct pipe_context *_pipe, struct pipe_query *query)
{
struct dd_context *dctx = dd_context(_pipe);
return pipe->end_query(pipe, dd_query_unwrap(query));
}
-static boolean
+static bool
dd_context_get_query_result(struct pipe_context *_pipe,
- struct pipe_query *query, boolean wait,
+ struct pipe_query *query, bool wait,
union pipe_query_result *result)
{
struct pipe_context *pipe = dd_context(_pipe)->pipe;
}
static void
-dd_context_set_active_query_state(struct pipe_context *_pipe, boolean enable)
+dd_context_set_active_query_state(struct pipe_context *_pipe, bool enable)
{
struct pipe_context *pipe = dd_context(_pipe)->pipe;
static void
dd_context_render_condition(struct pipe_context *_pipe,
- struct pipe_query *query, boolean condition,
+ struct pipe_query *query, bool condition,
enum pipe_render_cond_flag mode)
{
struct dd_context *dctx = dd_context(_pipe);
}
static void dd_context_set_window_rectangles(struct pipe_context *_pipe,
- boolean include,
+ bool include,
unsigned num_rectangles,
const struct pipe_scissor_state *rects)
{
dd_after_draw(dctx, record);
}
-static boolean
+static bool
dd_context_generate_mipmap(struct pipe_context *_pipe,
struct pipe_resource *res,
enum pipe_format format,
struct dd_context *dctx = dd_context(_pipe);
struct pipe_context *pipe = dctx->pipe;
struct dd_draw_record *record = dd_create_record(dctx);
- boolean result;
+ bool result;
record->call.type = CALL_GENERATE_MIPMAP;
record->call.info.generate_mipmap.res = NULL;
static void
dd_context_get_query_result_resource(struct pipe_context *_pipe,
struct pipe_query *query,
- boolean wait,
+ bool wait,
enum pipe_query_value_type result_type,
int index,
struct pipe_resource *resource,
struct call_get_query_result_resource {
struct pipe_query *query;
enum pipe_query_type query_type;
- boolean wait;
+ bool wait;
enum pipe_query_value_type result_type;
int index;
struct pipe_resource *resource;
screen->context_create(screen, priv, flags));
}
-static boolean
+static bool
dd_screen_is_format_supported(struct pipe_screen *_screen,
enum pipe_format format,
enum pipe_texture_target target,
storage_sample_count, tex_usage);
}
-static boolean
+static bool
dd_screen_can_create_resource(struct pipe_screen *_screen,
const struct pipe_resource *templat)
{
screen->resource_destroy(screen, res);
}
-static boolean
+static bool
dd_screen_resource_get_handle(struct pipe_screen *_screen,
struct pipe_context *_pipe,
struct pipe_resource *resource,
screen->fence_reference(screen, pdst, src);
}
-static boolean
+static bool
dd_screen_fence_finish(struct pipe_screen *_screen,
struct pipe_context *_ctx,
struct pipe_fence_handle *fence,
#include "util/u_upload_mgr.h"
#include "noop_public.h"
-DEBUG_GET_ONCE_BOOL_OPTION(noop, "GALLIUM_NOOP", FALSE)
+DEBUG_GET_ONCE_BOOL_OPTION(noop, "GALLIUM_NOOP", false)
void noop_init_state_functions(struct pipe_context *ctx);
FREE(query);
}
-static boolean noop_begin_query(struct pipe_context *ctx, struct pipe_query *query)
+static bool noop_begin_query(struct pipe_context *ctx, struct pipe_query *query)
{
return true;
}
return true;
}
-static boolean noop_get_query_result(struct pipe_context *ctx,
- struct pipe_query *query,
- boolean wait,
- union pipe_query_result *vresult)
+static bool noop_get_query_result(struct pipe_context *ctx,
+ struct pipe_query *query,
+ bool wait,
+ union pipe_query_result *vresult)
{
uint64_t *result = (uint64_t*)vresult;
*result = 0;
- return TRUE;
+ return true;
}
static void
-noop_set_active_query_state(struct pipe_context *pipe, boolean enable)
+noop_set_active_query_state(struct pipe_context *pipe, bool enable)
{
}
return noop_resource;
}
-static boolean noop_resource_get_handle(struct pipe_screen *pscreen,
- struct pipe_context *ctx,
- struct pipe_resource *resource,
- struct winsys_handle *handle,
- unsigned usage)
+static bool noop_resource_get_handle(struct pipe_screen *pscreen,
+ struct pipe_context *ctx,
+ struct pipe_resource *resource,
+ struct winsys_handle *handle,
+ unsigned usage)
{
struct noop_pipe_screen *noop_screen = (struct noop_pipe_screen*)pscreen;
struct pipe_screen *screen = noop_screen->oscreen;
FREE(ctx);
}
-static boolean noop_generate_mipmap(struct pipe_context *ctx,
- struct pipe_resource *resource,
- enum pipe_format format,
- unsigned base_level,
- unsigned last_level,
- unsigned first_layer,
- unsigned last_layer)
+static bool noop_generate_mipmap(struct pipe_context *ctx,
+ struct pipe_resource *resource,
+ enum pipe_format format,
+ unsigned base_level,
+ unsigned last_level,
+ unsigned first_layer,
+ unsigned last_layer)
{
return true;
}
return screen->get_compute_param(screen, ir_type, param, ret);
}
-static boolean noop_is_format_supported(struct pipe_screen* pscreen,
- enum pipe_format format,
- enum pipe_texture_target target,
- unsigned sample_count,
- unsigned storage_sample_count,
- unsigned usage)
+static bool noop_is_format_supported(struct pipe_screen* pscreen,
+ enum pipe_format format,
+ enum pipe_texture_target target,
+ unsigned sample_count,
+ unsigned storage_sample_count,
+ unsigned usage)
{
struct pipe_screen *screen = ((struct noop_pipe_screen*)pscreen)->oscreen;
{
}
-static boolean noop_fence_finish(struct pipe_screen *screen,
- struct pipe_context *ctx,
- struct pipe_fence_handle *fence,
- uint64_t timeout)
+static bool noop_fence_finish(struct pipe_screen *screen,
+ struct pipe_context *ctx,
+ struct pipe_fence_handle *fence,
+ uint64_t timeout)
{
return true;
}
}
static void noop_set_window_rectangles(struct pipe_context *ctx,
- boolean include,
+ bool include,
unsigned num_rectangles,
const struct pipe_scissor_state *rects)
{
} else if ((rb_pipe->draw_rule.blocker & flag) &&
(rb_pipe->draw_blocker & RBUG_BLOCK_RULE)) {
unsigned k;
- boolean block = FALSE;
+ bool block = false;
unsigned sh;
debug_printf("%s (%p %p) (%p %p) (%p %u) (%p %u)\n", __FUNCTION__,
for (sh = 0; sh < PIPE_SHADER_TYPES; sh++) {
if (rb_pipe->draw_rule.shader[sh] &&
rb_pipe->draw_rule.shader[sh] == rb_pipe->curr.shader[sh])
- block = TRUE;
+ block = true;
}
if (rb_pipe->draw_rule.surf &&
rb_pipe->draw_rule.surf == rb_pipe->curr.zsbuf)
- block = TRUE;
+ block = true;
if (rb_pipe->draw_rule.surf)
for (k = 0; k < rb_pipe->curr.nr_cbufs; k++)
if (rb_pipe->draw_rule.surf == rb_pipe->curr.cbufs[k])
- block = TRUE;
+ block = true;
if (rb_pipe->draw_rule.texture) {
for (sh = 0; sh < ARRAY_SIZE(rb_pipe->curr.num_views); sh++) {
for (k = 0; k < rb_pipe->curr.num_views[sh]; k++) {
if (rb_pipe->draw_rule.texture == rb_pipe->curr.texs[sh][k]) {
- block = TRUE;
+ block = true;
sh = PIPE_SHADER_TYPES; /* to break out of both loops */
break;
}
mtx_unlock(&rb_pipe->call_mutex);
}
-static boolean
+static bool
rbug_begin_query(struct pipe_context *_pipe,
struct pipe_query *query)
{
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
- boolean ret;
+ bool ret;
mtx_lock(&rb_pipe->call_mutex);
ret = pipe->begin_query(pipe, query);
return ret;
}
-static boolean
+static bool
rbug_get_query_result(struct pipe_context *_pipe,
struct pipe_query *query,
- boolean wait,
+ bool wait,
union pipe_query_result *result)
{
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
- boolean ret;
+ bool ret;
mtx_lock(&rb_pipe->call_mutex);
ret = pipe->get_query_result(pipe,
}
static void
-rbug_set_active_query_state(struct pipe_context *_pipe, boolean enable)
+rbug_set_active_query_state(struct pipe_context *_pipe, bool enable)
{
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
rbug_screen_add_to_list(rb_screen, contexts, rb_pipe);
- if (debug_get_bool_option("GALLIUM_RBUG_START_BLOCKED", FALSE)) {
+ if (debug_get_bool_option("GALLIUM_RBUG_START_BLOCKED", false)) {
rb_pipe->draw_blocked = RBUG_BLOCK_BEFORE;
}
struct rbug_screen *rb_screen;
struct rbug_connection *con;
thrd_t thread;
- boolean running;
+ bool running;
};
int
return -EINVAL;
}
-static boolean
+static bool
rbug_header(struct rbug_rbug *tr_rbug, struct rbug_header *header, uint32_t serial)
{
int ret = 0;
if (ret)
rbug_send_error_reply(tr_rbug->con, serial, ret, NULL);
- return TRUE;
+ return true;
}
static void
return NULL;
tr_rbug->rb_screen = rb_screen;
- tr_rbug->running = TRUE;
+ tr_rbug->running = true;
tr_rbug->thread = u_thread_create(rbug_thread, tr_rbug);
return tr_rbug;
void *replaced_tokens;
enum rbug_shader_type type;
- boolean disabled;
+ bool disabled;
};
struct pipe_screen *
rbug_screen_create(struct pipe_screen *screen);
-boolean
+bool
rbug_enabled(void);
#ifdef __cplusplus
#include "rbug_context.h"
#include "rbug_objects.h"
-DEBUG_GET_ONCE_BOOL_OPTION(rbug, "GALLIUM_RBUG", FALSE)
+DEBUG_GET_ONCE_BOOL_OPTION(rbug, "GALLIUM_RBUG", false)
static void
rbug_screen_destroy(struct pipe_screen *_screen)
param);
}
-static boolean
+static bool
rbug_screen_is_format_supported(struct pipe_screen *_screen,
enum pipe_format format,
enum pipe_texture_target target,
return screen->check_resource_capability(screen, resource, bind);
}
-static boolean
+static bool
rbug_screen_resource_get_handle(struct pipe_screen *_screen,
struct pipe_context *_pipe,
struct pipe_resource *_resource,
fence);
}
-static boolean
+static bool
rbug_screen_fence_finish(struct pipe_screen *_screen,
struct pipe_context *_ctx,
struct pipe_fence_handle *fence,
return screen->fence_finish(screen, ctx, fence, timeout);
}
-boolean
+bool
rbug_enabled()
{
return debug_get_option_rbug();
}
-static boolean
+static bool
trace_context_begin_query(struct pipe_context *_pipe,
struct pipe_query *query)
{
struct trace_context *tr_ctx = trace_context(_pipe);
struct pipe_context *pipe = tr_ctx->pipe;
- boolean ret;
+ bool ret;
query = trace_query_unwrap(query);
}
-static boolean
+static bool
trace_context_get_query_result(struct pipe_context *_pipe,
struct pipe_query *_query,
- boolean wait,
+ bool wait,
union pipe_query_result *result)
{
struct trace_context *tr_ctx = trace_context(_pipe);
struct pipe_context *pipe = tr_ctx->pipe;
struct trace_query *tr_query = trace_query(_query);
struct pipe_query *query = tr_query->query;
- boolean ret;
+ bool ret;
trace_dump_call_begin("pipe_context", "get_query_result");
static void
trace_context_set_active_query_state(struct pipe_context *_pipe,
- boolean enable)
+ bool enable)
{
struct trace_context *tr_ctx = trace_context(_pipe);
struct pipe_context *pipe = tr_ctx->pipe;
}
-static inline boolean
+static inline bool
trace_context_generate_mipmap(struct pipe_context *_pipe,
struct pipe_resource *res,
enum pipe_format format,
{
struct trace_context *tr_ctx = trace_context(_pipe);
struct pipe_context *pipe = tr_ctx->pipe;
- boolean ret;
+ bool ret;
trace_dump_call_begin("pipe_context", "generate_mipmap");
static void
trace_context_render_condition(struct pipe_context *_context,
struct pipe_query *query,
- boolean condition,
+ bool condition,
enum pipe_render_cond_flag mode)
{
struct trace_context *tr_context = trace_context(_context);
#include "tr_texture.h"
-static boolean close_stream = FALSE;
+static bool close_stream = false;
static FILE *stream = NULL;
static mtx_t call_mutex = _MTX_INITIALIZER_NP;
static long unsigned call_no = 0;
-static boolean dumping = FALSE;
+static bool dumping = false;
static inline void
trace_dump_writes("</trace>\n");
if (close_stream) {
fclose(stream);
- close_stream = FALSE;
+ close_stream = false;
stream = NULL;
}
call_no = 0;
}
-boolean
+bool
trace_dump_trace_begin(void)
{
const char *filename;
filename = debug_get_option("GALLIUM_TRACE", NULL);
if (!filename)
- return FALSE;
+ return false;
if (!stream) {
if (strcmp(filename, "stderr") == 0) {
- close_stream = FALSE;
+ close_stream = false;
stream = stderr;
}
else if (strcmp(filename, "stdout") == 0) {
- close_stream = FALSE;
+ close_stream = false;
stream = stdout;
}
else {
- close_stream = TRUE;
+ close_stream = true;
stream = fopen(filename, "wt");
if (!stream)
- return FALSE;
+ return false;
}
trace_dump_writes("<?xml version='1.0' encoding='UTF-8'?>\n");
atexit(trace_dump_trace_close);
}
- return TRUE;
+ return true;
}
-boolean trace_dump_trace_enabled(void)
+bool trace_dump_trace_enabled(void)
{
- return stream ? TRUE : FALSE;
+ return stream ? true : false;
}
/*
void trace_dumping_start_locked(void)
{
- dumping = TRUE;
+ dumping = true;
}
void trace_dumping_stop_locked(void)
{
- dumping = FALSE;
+ dumping = false;
}
-boolean trace_dumping_enabled_locked(void)
+bool trace_dumping_enabled_locked(void)
{
return dumping;
}
mtx_unlock(&call_mutex);
}
-boolean trace_dumping_enabled(void)
+bool trace_dumping_enabled(void)
{
- boolean ret;
+ bool ret;
mtx_lock(&call_mutex);
ret = trace_dumping_enabled_locked();
mtx_unlock(&call_mutex);
*
* Opening the trace file and checking if that is opened.
*/
-boolean trace_dump_trace_begin(void);
-boolean trace_dump_trace_enabled(void);
+bool trace_dump_trace_begin(void);
+bool trace_dump_trace_enabled(void);
void trace_dump_trace_flush(void);
/*
*/
void trace_dumping_start_locked(void);
void trace_dumping_stop_locked(void);
-boolean trace_dumping_enabled_locked(void);
+bool trace_dumping_enabled_locked(void);
void trace_dumping_start(void);
void trace_dumping_stop(void);
-boolean trace_dumping_enabled(void);
+bool trace_dumping_enabled(void);
void trace_dump_call_begin_locked(const char *klass, const char *method);
void trace_dump_call_end_locked(void);
if (!trace_dumping_enabled_locked())
return;
- trace_dump_enum(util_str_query_type(value, FALSE));
+ trace_dump_enum(util_str_query_type(value, false));
}
struct pipe_screen *
trace_screen_create(struct pipe_screen *screen);
-boolean
+bool
trace_enabled(void);
#ifdef __cplusplus
#include "tr_public.h"
-static boolean trace = FALSE;
+static bool trace = false;
static const char *
trace_screen_get_name(struct pipe_screen *_screen)
}
-static boolean
+static bool
trace_screen_is_format_supported(struct pipe_screen *_screen,
enum pipe_format format,
enum pipe_texture_target target,
{
struct trace_screen *tr_scr = trace_screen(_screen);
struct pipe_screen *screen = tr_scr->screen;
- boolean result;
+ bool result;
trace_dump_call_begin("pipe_screen", "is_format_supported");
return screen->check_resource_capability(screen, resource, bind);
}
-static boolean
+static bool
trace_screen_resource_get_handle(struct pipe_screen *_screen,
struct pipe_context *_pipe,
struct pipe_resource *resource,
}
-static boolean
+static bool
trace_screen_fence_finish(struct pipe_screen *_screen,
struct pipe_context *_ctx,
struct pipe_fence_handle *fence,
FREE(tr_scr);
}
-boolean
+bool
trace_enabled(void)
{
- static boolean firstrun = TRUE;
+ static bool firstrun = true;
if (!firstrun)
return trace;
- firstrun = FALSE;
+ firstrun = false;
if(trace_dump_trace_begin()) {
trace_dumping_start();
- trace = TRUE;
+ trace = true;
}
return trace;
*p = deref(param); \
}
-TC_FUNC1(set_active_query_state, flags, , boolean, , *)
+TC_FUNC1(set_active_query_state, flags, , bool, , *)
TC_FUNC1(set_blend_color, blend_color, const, struct pipe_blend_color, *, )
TC_FUNC1(set_stencil_ref, stencil_ref, const, struct pipe_stencil_ref, *, )
pipe->begin_query(pipe, payload->query);
}
-static boolean
+static bool
tc_begin_query(struct pipe_context *_pipe, struct pipe_query *query)
{
struct threaded_context *tc = threaded_context(_pipe);
return true; /* we don't care about the return value for this call */
}
-static boolean
+static bool
tc_get_query_result(struct pipe_context *_pipe,
- struct pipe_query *query, boolean wait,
+ struct pipe_query *query, bool wait,
union pipe_query_result *result)
{
struct threaded_context *tc = threaded_context(_pipe);
struct tc_query_result_resource {
struct pipe_query *query;
- boolean wait;
+ bool wait;
enum pipe_query_value_type result_type;
int index;
struct pipe_resource *resource;
static void
tc_get_query_result_resource(struct pipe_context *_pipe,
- struct pipe_query *query, boolean wait,
+ struct pipe_query *query, bool wait,
enum pipe_query_value_type result_type, int index,
struct pipe_resource *resource, unsigned offset)
{
static void
tc_render_condition(struct pipe_context *_pipe,
- struct pipe_query *query, boolean condition,
+ struct pipe_query *query, bool condition,
enum pipe_render_cond_flag mode)
{
struct threaded_context *tc = threaded_context(_pipe);
}
static void
-tc_set_window_rectangles(struct pipe_context *_pipe, boolean include,
+tc_set_window_rectangles(struct pipe_context *_pipe, bool include,
unsigned count,
const struct pipe_scissor_state *rects)
{
pipe_resource_reference(&p->res, NULL);
}
-static boolean
+static bool
tc_generate_mipmap(struct pipe_context *_pipe,
struct pipe_resource *res,
enum pipe_format format,
}
-boolean u_default_resource_get_handle(UNUSED struct pipe_screen *screen,
- UNUSED struct pipe_resource *resource,
- UNUSED struct winsys_handle *handle)
+bool u_default_resource_get_handle(UNUSED struct pipe_screen *screen,
+ UNUSED struct pipe_resource *resource,
+ UNUSED struct winsys_handle *handle)
{
return FALSE;
}
return (struct u_resource *)res;
}
-boolean u_resource_get_handle_vtbl(struct pipe_screen *screen,
- UNUSED struct pipe_context *ctx,
- struct pipe_resource *resource,
- struct winsys_handle *handle,
- UNUSED unsigned usage)
+bool u_resource_get_handle_vtbl(struct pipe_screen *screen,
+ UNUSED struct pipe_context *ctx,
+ struct pipe_resource *resource,
+ struct winsys_handle *handle,
+ UNUSED unsigned usage)
{
struct u_resource *ur = u_resource(resource);
return ur->vtbl->resource_get_handle(screen, resource, handle);
extern "C" {
#endif
-boolean u_default_resource_get_handle(struct pipe_screen *screen,
- struct pipe_resource *resource,
- struct winsys_handle *handle);
+bool u_default_resource_get_handle(struct pipe_screen *screen,
+ struct pipe_resource *resource,
+ struct winsys_handle *handle);
void u_default_buffer_subdata(struct pipe_context *pipe,
struct pipe_resource *resource,
*/
struct u_resource_vtbl {
- boolean (*resource_get_handle)(struct pipe_screen *,
- struct pipe_resource *tex,
- struct winsys_handle *handle);
+ bool (*resource_get_handle)(struct pipe_screen *,
+ struct pipe_resource *tex,
+ struct winsys_handle *handle);
void (*resource_destroy)(struct pipe_screen *,
struct pipe_resource *pt);
};
-boolean u_resource_get_handle_vtbl(struct pipe_screen *screen,
- struct pipe_context *ctx,
- struct pipe_resource *resource,
- struct winsys_handle *handle,
- unsigned usage);
+bool u_resource_get_handle_vtbl(struct pipe_screen *screen,
+ struct pipe_context *ctx,
+ struct pipe_resource *resource,
+ struct winsys_handle *handle,
+ unsigned usage);
void u_resource_destroy_vtbl(struct pipe_screen *screen,
struct pipe_resource *resource);
return NULL;
}
-boolean
+bool
vl_video_buffer_is_format_supported(struct pipe_screen *screen,
enum pipe_format format,
enum pipe_video_profile profile,
return format;
}
-boolean
+bool
vl_video_buffer_is_format_supported(struct pipe_screen *screen,
enum pipe_format format,
enum pipe_video_profile profile,
* check if video buffer format is supported for a codec/profile
* can be used as default implementation of screen->is_video_format_supported
*/
-boolean
+bool
vl_video_buffer_is_format_supported(struct pipe_screen *screen,
enum pipe_format format,
enum pipe_video_profile profile,
*ptr = fence;
}
-static boolean
+static bool
etna_screen_fence_finish(struct pipe_screen *pscreen, struct pipe_context *ctx,
struct pipe_fence_handle *fence, uint64_t timeout)
{
q->funcs->destroy_query(etna_context(pctx), q);
}
-static boolean
+static bool
etna_begin_query(struct pipe_context *pctx, struct pipe_query *pq)
{
struct etna_query *q = etna_query(pq);
- boolean ret;
+ bool ret;
if (q->active)
return false;
return true;
}
-static boolean
+static bool
etna_get_query_result(struct pipe_context *pctx, struct pipe_query *pq,
- boolean wait, union pipe_query_result *result)
+ bool wait, union pipe_query_result *result)
{
struct etna_query *q = etna_query(pq);
}
static void
-etna_set_active_query_state(struct pipe_context *pctx, boolean enable)
+etna_set_active_query_state(struct pipe_context *pctx, bool enable)
{
struct etna_context *ctx = etna_context(pctx);
struct etna_query_funcs {
void (*destroy_query)(struct etna_context *ctx, struct etna_query *q);
- boolean (*begin_query)(struct etna_context *ctx, struct etna_query *q);
+ bool (*begin_query)(struct etna_context *ctx, struct etna_query *q);
void (*end_query)(struct etna_context *ctx, struct etna_query *q);
- boolean (*get_query_result)(struct etna_context *ctx, struct etna_query *q,
- boolean wait, union pipe_query_result *result);
+ bool (*get_query_result)(struct etna_context *ctx, struct etna_query *q,
+ bool wait, union pipe_query_result *result);
};
struct etna_query {
etna_bo_cpu_fini(rsc->bo);
}
-static boolean
+static bool
etna_hw_begin_query(struct etna_context *ctx, struct etna_query *q)
{
struct etna_hw_query *hq = etna_hw_query(q);
list_delinit(&hq->node);
}
-static boolean
+static bool
etna_hw_get_query_result(struct etna_context *ctx, struct etna_query *q,
- boolean wait, union pipe_query_result *result)
+ bool wait, union pipe_query_result *result)
{
struct etna_hw_query *hq = etna_hw_query(q);
struct etna_resource *rsc = etna_resource(hq->prsc);
FREE(pq);
}
-static boolean
+static bool
etna_pm_begin_query(struct etna_context *ctx, struct etna_query *q)
{
struct etna_pm_query *pq = etna_pm_query(q);
etna_pm_query_get(ctx->stream, q, ETNA_PM_PROCESS_POST);
}
-static boolean
+static bool
etna_pm_get_query_result(struct etna_context *ctx, struct etna_query *q,
- boolean wait, union pipe_query_result *result)
+ bool wait, union pipe_query_result *result)
{
struct etna_pm_query *pq = etna_pm_query(q);
return 0;
}
-static boolean
+static bool
etna_sw_begin_query(struct etna_context *ctx, struct etna_query *q)
{
struct etna_sw_query *sq = etna_sw_query(q);
sq->end_value = read_counter(ctx, q->type);
}
-static boolean
+static bool
etna_sw_get_query_result(struct etna_context *ctx, struct etna_query *q,
- boolean wait, union pipe_query_result *result)
+ bool wait, union pipe_query_result *result)
{
struct etna_sw_query *sq = etna_sw_query(q);
return true;
}
-static boolean
+static bool
etna_screen_can_create_resource(struct pipe_screen *pscreen,
const struct pipe_resource *templat)
{
return NULL;
}
-static boolean
+static bool
etna_resource_get_handle(struct pipe_screen *pscreen,
struct pipe_context *pctx,
struct pipe_resource *prsc,
return etna_bo_get_name(rsc->bo, &handle->handle) == 0;
} else if (handle->type == WINSYS_HANDLE_TYPE_KMS) {
if (renderonly_get_handle(scanout, handle)) {
- return TRUE;
+ return true;
} else {
handle->handle = etna_bo_handle(rsc->bo);
- return TRUE;
+ return true;
}
} else if (handle->type == WINSYS_HANDLE_TYPE_FD) {
handle->handle = etna_bo_dmabuf(rsc->bo);
- return TRUE;
+ return true;
} else {
- return FALSE;
+ return false;
}
}
return true;
}
-static boolean
+static bool
etna_screen_is_format_supported(struct pipe_screen *pscreen,
enum pipe_format format,
enum pipe_texture_target target,
target != PIPE_TEXTURE_3D &&
target != PIPE_TEXTURE_CUBE &&
target != PIPE_TEXTURE_RECT)
- return FALSE;
+ return false;
if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
return false;
#include "fd2_util.h"
#include "fd2_resource.h"
-static boolean
+static bool
fd2_screen_is_format_supported(struct pipe_screen *pscreen,
enum pipe_format format,
enum pipe_texture_target target,
(sample_count > 1)) { /* TODO add MSAA */
DBG("not supported: format=%s, target=%d, sample_count=%d, usage=%x",
util_format_name(format), target, sample_count, usage);
- return FALSE;
+ return false;
}
if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
(format != PIPE_FORMAT_R8G8B8X8_UNORM))) {
DBG("not supported render target: format=%s, target=%d, sample_count=%d, usage=%x",
util_format_name(format), target, sample_count, usage);
- return FALSE;
+ return false;
}
if ((usage & (PIPE_BIND_SAMPLER_VIEW |
#include "ir3/ir3_compiler.h"
-static boolean
+static bool
fd3_screen_is_format_supported(struct pipe_screen *pscreen,
enum pipe_format format,
enum pipe_texture_target target,
(sample_count > 1)) { /* TODO add MSAA */
DBG("not supported: format=%s, target=%d, sample_count=%d, usage=%x",
util_format_name(format), target, sample_count, usage);
- return FALSE;
+ return false;
}
if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
#include "ir3/ir3_compiler.h"
-static boolean
+static bool
fd4_screen_is_format_supported(struct pipe_screen *pscreen,
enum pipe_format format,
enum pipe_texture_target target,
(sample_count > 1)) { /* TODO add MSAA */
DBG("not supported: format=%s, target=%d, sample_count=%d, usage=%x",
util_format_name(format), target, sample_count, usage);
- return FALSE;
+ return false;
}
if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
}
}
-static boolean
+static bool
fd5_screen_is_format_supported(struct pipe_screen *pscreen,
enum pipe_format format,
enum pipe_texture_target target,
!valid_sample_count(sample_count)) {
DBG("not supported: format=%s, target=%d, sample_count=%d, usage=%x",
util_format_name(format), target, sample_count, usage);
- return FALSE;
+ return false;
}
if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
}
}
-static boolean
+static bool
fd6_screen_is_format_supported(struct pipe_screen *pscreen,
enum pipe_format format,
enum pipe_texture_target target,
!valid_sample_count(sample_count)) {
DBG("not supported: format=%s, target=%d, sample_count=%d, usage=%x",
util_format_name(format), target, sample_count, usage);
- return FALSE;
+ return false;
}
if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
*ptr = pfence;
}
-boolean fd_fence_finish(struct pipe_screen *pscreen,
+bool fd_fence_finish(struct pipe_screen *pscreen,
struct pipe_context *ctx,
struct pipe_fence_handle *fence,
uint64_t timeout)
void fd_fence_ref(struct pipe_screen *pscreen,
struct pipe_fence_handle **ptr,
struct pipe_fence_handle *pfence);
-boolean fd_fence_finish(struct pipe_screen *screen,
+bool fd_fence_finish(struct pipe_screen *screen,
struct pipe_context *ctx,
struct pipe_fence_handle *pfence,
uint64_t timeout);
q->funcs->destroy_query(fd_context(pctx), q);
}
-static boolean
+static bool
fd_begin_query(struct pipe_context *pctx, struct pipe_query *pq)
{
struct fd_query *q = fd_query(pq);
- boolean ret;
+ bool ret;
if (q->active)
return false;
return true;
}
-static boolean
+static bool
fd_get_query_result(struct pipe_context *pctx, struct pipe_query *pq,
- boolean wait, union pipe_query_result *result)
+ bool wait, union pipe_query_result *result)
{
struct fd_query *q = fd_query(pq);
static void
fd_render_condition(struct pipe_context *pctx, struct pipe_query *pq,
- boolean condition, enum pipe_render_cond_flag mode)
+ bool condition, enum pipe_render_cond_flag mode)
{
struct fd_context *ctx = fd_context(pctx);
ctx->cond_query = pq;
}
static void
-fd_set_active_query_state(struct pipe_context *pipe, boolean enable)
+fd_set_active_query_state(struct pipe_context *pipe, bool enable)
{
}
struct fd_query_funcs {
void (*destroy_query)(struct fd_context *ctx,
struct fd_query *q);
- boolean (*begin_query)(struct fd_context *ctx, struct fd_query *q);
+ bool (*begin_query)(struct fd_context *ctx, struct fd_query *q);
void (*end_query)(struct fd_context *ctx, struct fd_query *q);
- boolean (*get_query_result)(struct fd_context *ctx,
- struct fd_query *q, boolean wait,
+ bool (*get_query_result)(struct fd_context *ctx,
+ struct fd_query *q, bool wait,
union pipe_query_result *result);
};
fd_bo_cpu_fini(rsc->bo);
}
-static boolean
+static bool
fd_acc_begin_query(struct fd_context *ctx, struct fd_query *q)
{
struct fd_batch *batch = fd_context_batch(ctx);
list_delinit(&aq->node);
}
-static boolean
+static bool
fd_acc_get_query_result(struct fd_context *ctx, struct fd_query *q,
- boolean wait, union pipe_query_result *result)
+ bool wait, union pipe_query_result *result)
{
struct fd_acc_query *aq = fd_acc_query(q);
const struct fd_acc_sample_provider *p = aq->provider;
free(hq);
}
-static boolean
+static bool
fd_hw_begin_query(struct fd_context *ctx, struct fd_query *q)
{
struct fd_batch *batch = fd_context_batch(ctx);
return ((char *)ptr) + (samp->tile_stride * n) + samp->offset;
}
-static boolean
+static bool
fd_hw_get_query_result(struct fd_context *ctx, struct fd_query *q,
- boolean wait, union pipe_query_result *result)
+ bool wait, union pipe_query_result *result)
{
struct fd_hw_query *hq = fd_hw_query(q);
const struct fd_hw_sample_provider *p = hq->provider;
}
}
-static boolean
+static bool
fd_sw_begin_query(struct fd_context *ctx, struct fd_query *q)
{
struct fd_sw_query *sq = fd_sw_query(q);
}
}
-static boolean
+static bool
fd_sw_get_query_result(struct fd_context *ctx, struct fd_query *q,
- boolean wait, union pipe_query_result *result)
+ bool wait, union pipe_query_result *result)
{
struct fd_sw_query *sq = fd_sw_query(q);
return DRM_FORMAT_MOD_INVALID;
}
-static boolean
+static bool
fd_resource_get_handle(struct pipe_screen *pscreen,
struct pipe_context *pctx,
struct pipe_resource *prsc,
return ir2_get_compiler_options();
}
-boolean
+bool
fd_screen_bo_get_handle(struct pipe_screen *pscreen,
struct fd_bo *bo,
struct renderonly_scanout *scanout,
return fd_bo_get_name(bo, &whandle->handle) == 0;
} else if (whandle->type == WINSYS_HANDLE_TYPE_KMS) {
if (renderonly_get_handle(scanout, whandle))
- return TRUE;
+ return true;
whandle->handle = fd_bo_handle(bo);
- return TRUE;
+ return true;
} else if (whandle->type == WINSYS_HANDLE_TYPE_FD) {
whandle->handle = fd_bo_dmabuf(bo);
- return TRUE;
+ return true;
} else {
- return FALSE;
+ return false;
}
}
return (struct fd_screen *)pscreen;
}
-boolean fd_screen_bo_get_handle(struct pipe_screen *pscreen,
+bool fd_screen_bo_get_handle(struct pipe_screen *pscreen,
struct fd_bo *bo,
struct renderonly_scanout *scanout,
unsigned stride,
FREE(query);
}
-static boolean i915_begin_query(struct pipe_context *ctx,
+static bool i915_begin_query(struct pipe_context *ctx,
struct pipe_query *query)
{
return true;
return true;
}
-static boolean i915_get_query_result(struct pipe_context *ctx,
- struct pipe_query *query,
- boolean wait,
- union pipe_query_result *vresult)
+static bool i915_get_query_result(struct pipe_context *ctx,
+ struct pipe_query *query,
+ bool wait,
+ union pipe_query_result *vresult)
{
uint64_t *result = (uint64_t*)vresult;
/* 2* viewport Max */
*result = 512*1024*1024;
- return TRUE;
+ return true;
}
static void
-i915_set_active_query_state(struct pipe_context *pipe, boolean enable)
+i915_set_active_query_state(struct pipe_context *pipe, bool enable)
{
}
-static boolean
+static bool
i915_buffer_get_handle(struct pipe_screen *screen,
struct pipe_resource *resource,
struct winsys_handle *handle)
-static boolean
+static bool
i915_texture_get_handle(struct pipe_screen * screen,
struct pipe_resource *texture,
struct winsys_handle *whandle)
}
}
-boolean
+bool
i915_is_format_supported(struct pipe_screen *screen,
enum pipe_format format,
enum pipe_texture_target target,
uint i;
if (sample_count > 1)
- return FALSE;
+ return false;
if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
return false;
else if (tex_usage & PIPE_BIND_SAMPLER_VIEW)
list = tex_supported;
else
- return TRUE; /* PIPE_BIND_{VERTEX,INDEX}_BUFFER */
+ return true; /* PIPE_BIND_{VERTEX,INDEX}_BUFFER */
for (i = 0; list[i] != PIPE_FORMAT_NONE; i++) {
if (list[i] == format)
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
is->iws->fence_reference(is->iws, ptr, fence);
}
-static boolean
+static bool
i915_fence_finish(struct pipe_screen *screen,
struct pipe_context *ctx,
struct pipe_fence_handle *fence,
return (struct i915_screen *) pscreen;
}
-boolean
+bool
i915_is_format_supported(struct pipe_screen *screen,
enum pipe_format format,
enum pipe_texture_target target,
return now + timeout;
}
-static boolean
+static bool
iris_fence_finish(struct pipe_screen *p_screen,
struct pipe_context *ctx,
struct pipe_fence_handle *fence,
* Returns true if the given format is supported for the given usage
* (PIPE_BIND_*) and sample count.
*/
-boolean
+bool
iris_is_format_supported(struct pipe_screen *pscreen,
enum pipe_format pformat,
enum pipe_texture_target target,
}
-static boolean
+static bool
iris_begin_query(struct pipe_context *ctx, struct pipe_query *query)
{
struct iris_context *ice = (void *) ctx;
}
}
-static boolean
+static bool
iris_get_query_result(struct pipe_context *ctx,
struct pipe_query *query,
- boolean wait,
+ bool wait,
union pipe_query_result *result)
{
struct iris_context *ice = (void *) ctx;
static void
iris_get_query_result_resource(struct pipe_context *ctx,
struct pipe_query *query,
- boolean wait,
+ bool wait,
enum pipe_query_value_type result_type,
int index,
struct pipe_resource *p_res,
}
static void
-iris_set_active_query_state(struct pipe_context *ctx, boolean enable)
+iris_set_active_query_state(struct pipe_context *ctx, bool enable)
{
struct iris_context *ice = (void *) ctx;
static void
iris_render_condition(struct pipe_context *ctx,
struct pipe_query *query,
- boolean condition,
+ bool condition,
enum pipe_render_cond_flag mode)
{
struct iris_context *ice = (void *) ctx;
mod ? mod->supports_clear_color : false);
}
-static boolean
+static bool
iris_resource_get_handle(struct pipe_screen *pscreen,
struct pipe_context *ctx,
struct pipe_resource *resource,
struct pipe_screen *
iris_screen_create(int fd, const struct pipe_screen_config *config);
-boolean
+bool
iris_is_format_supported(struct pipe_screen *pscreen,
enum pipe_format format,
enum pipe_texture_target target,
*ptr = fence;
}
-static boolean
+static bool
lima_fence_finish(struct pipe_screen *pscreen, struct pipe_context *pctx,
struct pipe_fence_handle *fence, uint64_t timeout)
{
free(query);
}
-static boolean
+static bool
lima_begin_query(struct pipe_context *ctx, struct pipe_query *query)
{
return true;
return true;
}
-static boolean
+static bool
lima_get_query_result(struct pipe_context *ctx, struct pipe_query *query,
- boolean wait, union pipe_query_result *vresult)
+ bool wait, union pipe_query_result *vresult)
{
uint64_t *result = &vresult->u64;
}
static void
-lima_set_active_query_state(struct pipe_context *pipe, boolean enable)
+lima_set_active_query_state(struct pipe_context *pipe, bool enable)
{
}
return NULL;
}
-static boolean
+static bool
lima_resource_get_handle(struct pipe_screen *pscreen,
struct pipe_context *pctx,
struct pipe_resource *pres,
if (handle->type == WINSYS_HANDLE_TYPE_KMS && screen->ro &&
renderonly_get_handle(res->scanout, handle))
- return TRUE;
+ return true;
if (!lima_bo_export(res->bo, handle))
- return FALSE;
+ return false;
handle->stride = res->levels[0].stride;
- return TRUE;
+ return true;
}
void
}
}
-static boolean
+static bool
lima_screen_is_format_supported(struct pipe_screen *pscreen,
enum pipe_format format,
enum pipe_texture_target target,
case PIPE_TEXTURE_2D:
break;
default:
- return FALSE;
+ return false;
}
if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
/* be able to support 16, now limit to 4 */
if (sample_count > 1 && sample_count != 4)
- return FALSE;
+ return false;
if (usage & PIPE_BIND_RENDER_TARGET) {
switch (format) {
case PIPE_FORMAT_Z24X8_UNORM:
break;
default:
- return FALSE;
+ return false;
}
}
case PIPE_FORMAT_Z24X8_UNORM:
break;
default:
- return FALSE;
+ return false;
}
}
case PIPE_FORMAT_R32G32B32_FLOAT:
break;
default:
- return FALSE;
+ return false;
}
}
case PIPE_FORMAT_I32_UINT:
break;
default:
- return FALSE;
+ return false;
}
}
case PIPE_FORMAT_Z24X8_UNORM:
break;
default:
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
static const void *
ctx->dirty |= LIMA_CONTEXT_DIRTY_TEXTURES;
}
-UNUSED static boolean
+UNUSED static bool
lima_set_damage_region(struct pipe_context *pctx, unsigned num_rects, int *rects)
{
struct lima_context *ctx = lima_context(pctx);
static void
llvmpipe_render_condition(struct pipe_context *pipe,
struct pipe_query *query,
- boolean condition,
+ bool condition,
enum pipe_render_cond_flag mode)
{
struct llvmpipe_context *llvmpipe = llvmpipe_context( pipe );
}
-static boolean
+static bool
llvmpipe_get_query_result(struct pipe_context *pipe,
struct pipe_query *q,
- boolean wait,
+ bool wait,
union pipe_query_result *vresult)
{
struct llvmpipe_screen *screen = llvmpipe_screen(pipe->screen);
llvmpipe_flush(pipe, NULL, __FUNCTION__);
if (!wait)
- return FALSE;
+ return false;
lp_fence_wait(pq->fence);
}
(struct pipe_query_data_timestamp_disjoint *)vresult;
/* os_get_time_nano return nanoseconds */
td->frequency = UINT64_C(1000000000);
- td->disjoint = FALSE;
+ td->disjoint = false;
}
break;
case PIPE_QUERY_GPU_FINISHED:
- vresult->b = TRUE;
+ vresult->b = true;
break;
case PIPE_QUERY_PRIMITIVES_GENERATED:
*result = pq->num_primitives_generated;
break;
}
- return TRUE;
+ return true;
}
-static boolean
+static bool
llvmpipe_begin_query(struct pipe_context *pipe, struct pipe_query *q)
{
struct llvmpipe_context *llvmpipe = llvmpipe_context( pipe );
}
static void
-llvmpipe_set_active_query_state(struct pipe_context *pipe, boolean enable)
+llvmpipe_set_active_query_state(struct pipe_context *pipe, bool enable)
{
}
* \param format the format to test
* \param type one of PIPE_TEXTURE, PIPE_SURFACE
*/
-static boolean
+static bool
llvmpipe_is_format_supported( struct pipe_screen *_screen,
enum pipe_format format,
enum pipe_texture_target target,
format_desc = util_format_description(format);
if (!format_desc)
- return FALSE;
+ return false;
assert(target == PIPE_BUFFER ||
target == PIPE_TEXTURE_1D ||
target == PIPE_TEXTURE_CUBE_ARRAY);
if (sample_count > 1)
- return FALSE;
+ return false;
if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
return false;
if (format_desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB) {
/* this is a lie actually other formats COULD exist where we would fail */
if (format_desc->nr_channels < 3)
- return FALSE;
+ return false;
}
else if (format_desc->colorspace != UTIL_FORMAT_COLORSPACE_RGB)
- return FALSE;
+ return false;
if (format_desc->layout != UTIL_FORMAT_LAYOUT_PLAIN &&
format != PIPE_FORMAT_R11G11B10_FLOAT)
- return FALSE;
+ return false;
assert(format_desc->block.width == 1);
assert(format_desc->block.height == 1);
if (format_desc->is_mixed)
- return FALSE;
+ return false;
if (!format_desc->is_array && !format_desc->is_bitmask &&
format != PIPE_FORMAT_R11G11B10_FLOAT)
- return FALSE;
+ return false;
}
if ((bind & (PIPE_BIND_RENDER_TARGET | PIPE_BIND_SAMPLER_VIEW)) &&
if (format_desc->is_array &&
format_desc->nr_channels == 3 &&
format_desc->block.bits != 96) {
- return FALSE;
+ return false;
}
}
if (bind & PIPE_BIND_DISPLAY_TARGET) {
if(!winsys->is_displaytarget_format_supported(winsys, bind, format))
- return FALSE;
+ return false;
}
if (bind & PIPE_BIND_DEPTH_STENCIL) {
if (format_desc->layout != UTIL_FORMAT_LAYOUT_PLAIN)
- return FALSE;
+ return false;
if (format_desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS)
- return FALSE;
+ return false;
/* TODO: Support stencil-only formats */
if (format_desc->swizzle[0] == PIPE_SWIZZLE_NONE) {
- return FALSE;
+ return false;
}
}
if (format_desc->layout == UTIL_FORMAT_LAYOUT_ASTC ||
format_desc->layout == UTIL_FORMAT_LAYOUT_ATC) {
/* Software decoding is not hooked up. */
- return FALSE;
+ return false;
}
if (format_desc->layout == UTIL_FORMAT_LAYOUT_ETC &&
format != PIPE_FORMAT_ETC1_RGB8)
- return FALSE;
+ return false;
/*
* Everything can be supported by u_format
* (those without fetch_rgba_float might be not but shouldn't hit that)
*/
- return TRUE;
+ return true;
}
/**
* Wait for the fence to finish.
*/
-static boolean
+static bool
llvmpipe_fence_finish(struct pipe_screen *screen,
struct pipe_context *ctx,
struct pipe_fence_handle *fence_handle,
lp_fence_wait(f);
}
- return TRUE;
+ return true;
}
static uint64_t
* Check the size of the texture specified by 'res'.
* \return TRUE if OK, FALSE if too large.
*/
-static boolean
+static bool
llvmpipe_can_create_resource(struct pipe_screen *screen,
const struct pipe_resource *res)
{
}
-static boolean
+static bool
llvmpipe_resource_get_handle(struct pipe_screen *screen,
struct pipe_context *ctx,
struct pipe_resource *pt,
assert(lpr->dt);
if (!lpr->dt)
- return FALSE;
+ return false;
return winsys->displaytarget_get_handle(winsys, lpr->dt, whandle);
}
nouveau_fence_ref(nouveau_fence(pfence), (struct nouveau_fence **)ptr);
}
-static boolean
+static bool
nouveau_screen_fence_finish(struct pipe_screen *screen,
struct pipe_context *ctx,
struct pipe_fence_handle *pfence,
}
}
-boolean
+bool
nouveau_vp3_screen_video_supported(struct pipe_screen *screen,
enum pipe_format format,
enum pipe_video_profile profile,
enum pipe_video_entrypoint entrypoint,
enum pipe_video_cap param);
-boolean
+bool
nouveau_vp3_screen_video_supported(struct pipe_screen *screen,
enum pipe_format format,
enum pipe_video_profile profile,
return lvl->offset + (layer * lvl->zslice_size);
}
-static boolean
+static bool
nv30_miptree_get_handle(struct pipe_screen *pscreen,
struct pipe_resource *pt,
struct winsys_handle *handle)
FREE(pq);
}
-static boolean
+static bool
nv30_query_begin(struct pipe_context *pipe, struct pipe_query *pq)
{
struct nv30_context *nv30 = nv30_context(pipe);
return true;
}
-static boolean
+static bool
nv30_query_result(struct pipe_context *pipe, struct pipe_query *pq,
- boolean wait, union pipe_query_result *result)
+ bool wait, union pipe_query_result *result)
{
struct nv30_screen *screen = nv30_screen(pipe->screen);
struct nv30_query *q = nv30_query(pq);
static void
nv40_query_render_condition(struct pipe_context *pipe,
struct pipe_query *pq,
- boolean condition, enum pipe_render_cond_flag mode)
+ bool condition, enum pipe_render_cond_flag mode)
{
struct nv30_context *nv30 = nv30_context(pipe);
struct nv30_query *q = nv30_query(pq);
}
static void
-nv30_set_active_query_state(struct pipe_context *pipe, boolean enable)
+nv30_set_active_query_state(struct pipe_context *pipe, bool enable)
{
}
}
}
-static boolean
+static bool
nv30_screen_is_format_supported(struct pipe_screen *pscreen,
enum pipe_format format,
enum pipe_texture_target target,
enum pipe_video_entrypoint entrypoint,
enum pipe_video_cap param);
-boolean
+bool
nv84_screen_video_supported(struct pipe_screen *screen,
enum pipe_format format,
enum pipe_video_profile profile,
FREE(mt);
}
-boolean
+bool
nv50_miptree_get_handle(struct pipe_screen *pscreen,
struct pipe_resource *pt,
struct winsys_handle *whandle)
q->funcs->destroy_query(nv50_context(pipe), q);
}
-static boolean
+static bool
nv50_begin_query(struct pipe_context *pipe, struct pipe_query *pq)
{
struct nv50_query *q = nv50_query(pq);
return true;
}
-static boolean
+static bool
nv50_get_query_result(struct pipe_context *pipe, struct pipe_query *pq,
- boolean wait, union pipe_query_result *result)
+ bool wait, union pipe_query_result *result)
{
struct nv50_query *q = nv50_query(pq);
return q->funcs->get_query_result(nv50_context(pipe), q, wait, result);
static void
nv50_render_condition(struct pipe_context *pipe,
struct pipe_query *pq,
- boolean condition, enum pipe_render_cond_flag mode)
+ bool condition, enum pipe_render_cond_flag mode)
{
struct nv50_context *nv50 = nv50_context(pipe);
struct nouveau_pushbuf *push = nv50->base.pushbuf;
}
static void
-nv50_set_active_query_state(struct pipe_context *pipe, boolean enable)
+nv50_set_active_query_state(struct pipe_context *pipe, bool enable)
{
}
struct nv50_query_funcs {
void (*destroy_query)(struct nv50_context *, struct nv50_query *);
- boolean (*begin_query)(struct nv50_context *, struct nv50_query *);
+ bool (*begin_query)(struct nv50_context *, struct nv50_query *);
void (*end_query)(struct nv50_context *, struct nv50_query *);
- boolean (*get_query_result)(struct nv50_context *, struct nv50_query *,
- boolean, union pipe_query_result *);
+ bool (*get_query_result)(struct nv50_context *, struct nv50_query *,
+ bool, union pipe_query_result *);
};
struct nv50_query {
FREE(hq);
}
-static boolean
+static bool
nv50_hw_begin_query(struct nv50_context *nv50, struct nv50_query *q)
{
struct nouveau_pushbuf *push = nv50->base.pushbuf;
nouveau_fence_ref(nv50->screen->base.fence.current, &hq->fence);
}
-static boolean
+static bool
nv50_hw_get_query_result(struct nv50_context *nv50, struct nv50_query *q,
- boolean wait, union pipe_query_result *result)
+ bool wait, union pipe_query_result *result)
{
struct nv50_hw_query *hq = nv50_hw_query(q);
uint64_t *res64 = (uint64_t *)result;
struct nv50_hw_query_funcs {
void (*destroy_query)(struct nv50_context *, struct nv50_hw_query *);
- boolean (*begin_query)(struct nv50_context *, struct nv50_hw_query *);
+ bool (*begin_query)(struct nv50_context *, struct nv50_hw_query *);
void (*end_query)(struct nv50_context *, struct nv50_hw_query *);
- boolean (*get_query_result)(struct nv50_context *, struct nv50_hw_query *,
- boolean, union pipe_query_result *);
+ bool (*get_query_result)(struct nv50_context *, struct nv50_hw_query *,
+ bool, union pipe_query_result *);
};
struct nv50_hw_query {
FREE(hmq);
}
-static boolean
+static bool
nv50_hw_metric_begin_query(struct nv50_context *nv50, struct nv50_hw_query *hq)
{
struct nv50_hw_metric_query *hmq = nv50_hw_metric_query(hq);
- boolean ret = false;
+ bool ret = false;
unsigned i;
for (i = 0; i < hmq->num_queries; i++) {
return 0;
}
-static boolean
+static bool
nv50_hw_metric_get_query_result(struct nv50_context *nv50,
- struct nv50_hw_query *hq, boolean wait,
+ struct nv50_hw_query *hq, bool wait,
union pipe_query_result *result)
{
struct nv50_hw_metric_query *hmq = nv50_hw_metric_query(hq);
union pipe_query_result results[4] = {};
uint64_t res64[4] = {};
- boolean ret = false;
+ bool ret = false;
unsigned i;
for (i = 0; i < hmq->num_queries; i++) {
FREE(hq);
}
-static boolean
+static bool
nv50_hw_sm_begin_query(struct nv50_context *nv50, struct nv50_hw_query *hq)
{
struct nv50_screen *screen = nv50->screen;
return true;
}
-static boolean
+static bool
nv50_hw_sm_get_query_result(struct nv50_context *nv50, struct nv50_hw_query *hq,
- boolean wait, union pipe_query_result *result)
+ bool wait, union pipe_query_result *result)
{
uint32_t count[32][4];
uint64_t value = 0;
const struct pipe_resource *template,
struct winsys_handle *whandle);
-boolean
+bool
nv50_miptree_get_handle(struct pipe_screen *pscreen,
struct pipe_resource *pt,
struct winsys_handle *whandle);
#define THREADS_IN_WARP 32
-static boolean
+static bool
nv50_screen_is_format_supported(struct pipe_screen *pscreen,
enum pipe_format format,
enum pipe_texture_target target,
static void
nv50_set_window_rectangles(struct pipe_context *pipe,
- boolean include,
+ bool include,
unsigned num_rectangles,
const struct pipe_scissor_state *rectangles)
{
}
}
-boolean
+bool
nv84_screen_video_supported(struct pipe_screen *screen,
enum pipe_format format,
enum pipe_video_profile profile,
return modifier;
}
-static boolean
+static bool
nvc0_miptree_get_handle(struct pipe_screen *pscreen,
struct pipe_resource *pt,
struct winsys_handle *whandle)
{
struct nv50_miptree *mt = nv50_miptree(pt);
- boolean ret;
+ bool ret;
ret = nv50_miptree_get_handle(pscreen, pt, whandle);
if (!ret)
q->funcs->destroy_query(nvc0_context(pipe), q);
}
-static boolean
+static bool
nvc0_begin_query(struct pipe_context *pipe, struct pipe_query *pq)
{
struct nvc0_query *q = nvc0_query(pq);
return true;
}
-static boolean
+static bool
nvc0_get_query_result(struct pipe_context *pipe, struct pipe_query *pq,
- boolean wait, union pipe_query_result *result)
+ bool wait, union pipe_query_result *result)
{
struct nvc0_query *q = nvc0_query(pq);
return q->funcs->get_query_result(nvc0_context(pipe), q, wait, result);
static void
nvc0_get_query_result_resource(struct pipe_context *pipe,
struct pipe_query *pq,
- boolean wait,
+ bool wait,
enum pipe_query_value_type result_type,
int index,
struct pipe_resource *resource,
static void
nvc0_render_condition(struct pipe_context *pipe,
struct pipe_query *pq,
- boolean condition, enum pipe_render_cond_flag mode)
+ bool condition, enum pipe_render_cond_flag mode)
{
struct nvc0_context *nvc0 = nvc0_context(pipe);
struct nouveau_pushbuf *push = nvc0->base.pushbuf;
}
static void
-nvc0_set_active_query_state(struct pipe_context *pipe, boolean enable)
+nvc0_set_active_query_state(struct pipe_context *pipe, bool enable)
{
}
struct nvc0_query_funcs {
void (*destroy_query)(struct nvc0_context *, struct nvc0_query *);
- boolean (*begin_query)(struct nvc0_context *, struct nvc0_query *);
+ bool (*begin_query)(struct nvc0_context *, struct nvc0_query *);
void (*end_query)(struct nvc0_context *, struct nvc0_query *);
- boolean (*get_query_result)(struct nvc0_context *, struct nvc0_query *,
- boolean, union pipe_query_result *);
+ bool (*get_query_result)(struct nvc0_context *, struct nvc0_query *,
+ bool, union pipe_query_result *);
void (*get_query_result_resource)(struct nvc0_context *nvc0,
struct nvc0_query *q,
- boolean wait,
+ bool wait,
enum pipe_query_value_type result_type,
int index,
struct pipe_resource *resource,
PUSH_DATA (push, hq->bo->offset + hq->offset + offset);
}
-static boolean
+static bool
nvc0_hw_begin_query(struct nvc0_context *nvc0, struct nvc0_query *q)
{
struct nouveau_pushbuf *push = nvc0->base.pushbuf;
nouveau_fence_ref(nvc0->screen->base.fence.current, &hq->fence);
}
-static boolean
+static bool
nvc0_hw_get_query_result(struct nvc0_context *nvc0, struct nvc0_query *q,
- boolean wait, union pipe_query_result *result)
+ bool wait, union pipe_query_result *result)
{
struct nvc0_hw_query *hq = nvc0_hw_query(q);
uint64_t *res64 = (uint64_t*)result;
static void
nvc0_hw_get_query_result_resource(struct nvc0_context *nvc0,
struct nvc0_query *q,
- boolean wait,
+ bool wait,
enum pipe_query_value_type result_type,
int index,
struct pipe_resource *resource,
struct nvc0_hw_query_funcs {
void (*destroy_query)(struct nvc0_context *, struct nvc0_hw_query *);
- boolean (*begin_query)(struct nvc0_context *, struct nvc0_hw_query *);
+ bool (*begin_query)(struct nvc0_context *, struct nvc0_hw_query *);
void (*end_query)(struct nvc0_context *, struct nvc0_hw_query *);
- boolean (*get_query_result)(struct nvc0_context *, struct nvc0_hw_query *,
- boolean, union pipe_query_result *);
+ bool (*get_query_result)(struct nvc0_context *, struct nvc0_hw_query *,
+ bool, union pipe_query_result *);
};
struct nvc0_hw_query {
uint32_t base_offset;
uint32_t offset; /* base_offset + i * rotate */
uint8_t state;
- boolean is64bit;
+ bool is64bit;
uint8_t rotate;
struct nouveau_mm_allocation *mm;
struct nouveau_fence *fence;
FREE(hmq);
}
-static boolean
+static bool
nvc0_hw_metric_begin_query(struct nvc0_context *nvc0, struct nvc0_hw_query *hq)
{
struct nvc0_hw_metric_query *hmq = nvc0_hw_metric_query(hq);
- boolean ret = false;
+ bool ret = false;
unsigned i;
for (i = 0; i < hmq->num_queries; i++) {
return 0;
}
-static boolean
+static bool
nvc0_hw_metric_get_query_result(struct nvc0_context *nvc0,
- struct nvc0_hw_query *hq, boolean wait,
+ struct nvc0_hw_query *hq, bool wait,
union pipe_query_result *result)
{
struct nvc0_hw_metric_query *hmq = nvc0_hw_metric_query(hq);
union pipe_query_result results[8] = {};
uint64_t res64[8] = {};
uint64_t value = 0;
- boolean ret = false;
+ bool ret = false;
unsigned i;
for (i = 0; i < hmq->num_queries; i++) {
FREE(hq);
}
-static boolean
+static bool
nve4_hw_sm_begin_query(struct nvc0_context *nvc0, struct nvc0_hw_query *hq)
{
struct nvc0_screen *screen = nvc0->screen;
return true;
}
-static boolean
+static bool
nvc0_hw_sm_begin_query(struct nvc0_context *nvc0, struct nvc0_hw_query *hq)
{
struct nvc0_screen *screen = nvc0->screen;
return true;
}
-static boolean
+static bool
nvc0_hw_sm_get_query_result(struct nvc0_context *nvc0, struct nvc0_hw_query *hq,
- boolean wait, union pipe_query_result *result)
+ bool wait, union pipe_query_result *result)
{
uint32_t count[32][8];
uint64_t value = 0;
FREE(sq);
}
-static boolean
+static bool
nvc0_sw_begin_query(struct nvc0_context *nvc0, struct nvc0_query *q)
{
#ifdef NOUVEAU_ENABLE_DRIVER_STATISTICS
#endif
}
-static boolean
+static bool
nvc0_sw_get_query_result(struct nvc0_context *nvc0, struct nvc0_query *q,
- boolean wait, union pipe_query_result *result)
+ bool wait, union pipe_query_result *result)
{
#ifdef NOUVEAU_ENABLE_DRIVER_STATISTICS
struct nvc0_sw_query *sq = nvc0_sw_query(q);
#include "nv50/g80_texture.xml.h"
-static boolean
+static bool
nvc0_screen_is_format_supported(struct pipe_screen *pscreen,
enum pipe_format format,
enum pipe_texture_target target,
static void
nvc0_set_window_rectangles(struct pipe_context *pipe,
- boolean include,
+ bool include,
unsigned num_rectangles,
const struct pipe_scissor_state *rectangles)
{
static void
panfrost_set_active_query_state(struct pipe_context *pipe,
- boolean enable)
+ bool enable)
{
//struct panfrost_context *panfrost = pan_context(pipe);
}
ralloc_free(q);
}
-static boolean
+static bool
panfrost_begin_query(struct pipe_context *pipe, struct pipe_query *q)
{
struct panfrost_context *ctx = pan_context(pipe);
return true;
}
-static boolean
+static bool
panfrost_get_query_result(struct pipe_context *pipe,
struct pipe_query *q,
- boolean wait,
+ bool wait,
union pipe_query_result *vresult)
{
/* STUB */
return prsc;
}
-static boolean
+static bool
panfrost_resource_get_handle(struct pipe_screen *pscreen,
struct pipe_context *ctx,
struct pipe_resource *pt,
handle->modifier = DRM_FORMAT_MOD_INVALID;
if (handle->type == WINSYS_HANDLE_TYPE_SHARED) {
- return FALSE;
+ return false;
} else if (handle->type == WINSYS_HANDLE_TYPE_KMS) {
if (renderonly_get_handle(scanout, handle))
- return TRUE;
+ return true;
handle->handle = rsrc->bo->gem_handle;
handle->stride = rsrc->slices[0].stride;
int ret = drmIoctl(screen->ro->kms_fd, DRM_IOCTL_PRIME_HANDLE_TO_FD, &args);
if (ret == -1)
- return FALSE;
+ return false;
handle->stride = scanout->stride;
handle->handle = args.fd;
- return TRUE;
+ return true;
} else {
int fd = panfrost_drm_export_bo(screen, rsrc->bo);
if (fd < 0)
- return FALSE;
+ return false;
handle->handle = fd;
handle->stride = rsrc->slices[0].stride;
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
static void
return prsrc->format;
}
-static boolean
+static bool
panfrost_generate_mipmap(
struct pipe_context *pctx,
struct pipe_resource *prsrc,
* \param format the format to test
* \param type one of PIPE_TEXTURE, PIPE_SURFACE
*/
-static boolean
+static bool
panfrost_is_format_supported( struct pipe_screen *screen,
enum pipe_format format,
enum pipe_texture_target target,
format_desc = util_format_description(format);
if (!format_desc)
- return FALSE;
+ return false;
if (sample_count > 1)
- return FALSE;
+ return false;
/* Format wishlist */
if (format == PIPE_FORMAT_X8Z24_UNORM)
- return FALSE;
+ return false;
if (format == PIPE_FORMAT_A1B5G5R5_UNORM || format == PIPE_FORMAT_X1B5G5R5_UNORM)
- return FALSE;
+ return false;
/* TODO */
if (format == PIPE_FORMAT_B5G5R5A1_UNORM)
bool renderable = bind & PIPE_BIND_RENDER_TARGET;
if (scanout && renderable && !util_format_is_rgba8_variant(format_desc))
- return FALSE;
+ return false;
if (format_desc->layout != UTIL_FORMAT_LAYOUT_PLAIN &&
format_desc->layout != UTIL_FORMAT_LAYOUT_OTHER) {
/* Compressed formats not yet hooked up. */
- return FALSE;
+ return false;
}
/* Internally, formats that are depth/stencil renderable are limited.
}
}
- return TRUE;
+ return true;
}
panfrost_drm_fence_reference(pscreen, ptr, fence);
}
-static boolean
+static bool
panfrost_fence_finish(struct pipe_screen *pscreen,
struct pipe_context *ctx,
struct pipe_fence_handle *fence,
r300_mark_atom_dirty(r300, &r300->query_start);
}
-static boolean r300_begin_query(struct pipe_context* pipe,
- struct pipe_query* query)
+static bool r300_begin_query(struct pipe_context* pipe,
+ struct pipe_query* query)
{
struct r300_context* r300 = r300_context(pipe);
struct r300_query* q = r300_query(query);
return true;
}
-static boolean r300_get_query_result(struct pipe_context* pipe,
- struct pipe_query* query,
- boolean wait,
- union pipe_query_result *vresult)
+static bool r300_get_query_result(struct pipe_context* pipe,
+ struct pipe_query* query,
+ bool wait,
+ union pipe_query_result *vresult)
{
struct r300_context* r300 = r300_context(pipe);
struct r300_query *q = r300_query(query);
static void r300_render_condition(struct pipe_context *pipe,
struct pipe_query *query,
- boolean condition,
+ bool condition,
enum pipe_render_cond_flag mode)
{
struct r300_context *r300 = r300_context(pipe);
union pipe_query_result result;
- boolean wait;
+ bool wait;
r300->skip_rendering = FALSE;
}
static void
-r300_set_active_query_state(struct pipe_context *pipe, boolean enable)
+r300_set_active_query_state(struct pipe_context *pipe, bool enable)
{
}
return false;
}
-static boolean r300_is_format_supported(struct pipe_screen* screen,
- enum pipe_format format,
- enum pipe_texture_target target,
- unsigned sample_count,
- unsigned storage_sample_count,
- unsigned usage)
+static bool r300_is_format_supported(struct pipe_screen* screen,
+ enum pipe_format format,
+ enum pipe_texture_target target,
+ unsigned sample_count,
+ unsigned storage_sample_count,
+ unsigned usage)
{
uint32_t retval = 0;
boolean is_r500 = r300_screen(screen)->caps.is_r500;
if (usage & (PIPE_BIND_SAMPLER_VIEW |
PIPE_BIND_DISPLAY_TARGET |
PIPE_BIND_SCANOUT)) {
- return FALSE;
+ return false;
}
desc = util_format_description(format);
!util_format_is_rgba1010102_variant(desc) &&
format != PIPE_FORMAT_R16G16B16A16_FLOAT &&
format != PIPE_FORMAT_R16G16B16X16_FLOAT) {
- return FALSE;
+ return false;
}
} else {
/* Only allow depth/stencil, RGBA8. */
if (!util_format_is_depth_or_stencil(format) &&
!util_format_is_rgba8_variant(desc)) {
- return FALSE;
+ return false;
}
}
break;
default:
- return FALSE;
+ return false;
}
/* Check sampler format support. */
rws->fence_reference(ptr, fence);
}
-static boolean r300_fence_finish(struct pipe_screen *screen,
- struct pipe_context *ctx,
- struct pipe_fence_handle *fence,
- uint64_t timeout)
+static bool r300_fence_finish(struct pipe_screen *screen,
+ struct pipe_context *ctx,
+ struct pipe_fence_handle *fence,
+ uint64_t timeout)
{
struct radeon_winsys *rws = r300_screen(screen)->rws;
FREE(tex);
}
-boolean r300_resource_get_handle(struct pipe_screen* screen,
- struct pipe_context *ctx,
- struct pipe_resource *texture,
- struct winsys_handle *whandle,
- unsigned usage)
+bool r300_resource_get_handle(struct pipe_screen* screen,
+ struct pipe_context *ctx,
+ struct pipe_resource *texture,
+ struct winsys_handle *whandle,
+ unsigned usage)
{
struct radeon_winsys *rws = r300_screen(screen)->rws;
struct r300_resource* tex = (struct r300_resource*)texture;
if (!tex) {
- return FALSE;
+ return false;
}
return rws->buffer_get_handle(rws, tex->buf, tex->tex.stride_in_bytes[0],
unsigned height0_override,
struct r300_texture_format_state *out);
-boolean r300_resource_get_handle(struct pipe_screen* screen,
- struct pipe_context *ctx,
- struct pipe_resource *texture,
- struct winsys_handle *whandle,
- unsigned usage);
+bool r300_resource_get_handle(struct pipe_screen* screen,
+ struct pipe_context *ctx,
+ struct pipe_resource *texture,
+ struct winsys_handle *whandle,
+ unsigned usage);
struct pipe_resource*
r300_texture_from_handle(struct pipe_screen* screen,
return r600_translate_dbformat(format) != ~0U;
}
-boolean evergreen_is_format_supported(struct pipe_screen *screen,
- enum pipe_format format,
- enum pipe_texture_target target,
- unsigned sample_count,
- unsigned storage_sample_count,
- unsigned usage)
+bool evergreen_is_format_supported(struct pipe_screen *screen,
+ enum pipe_format format,
+ enum pipe_texture_target target,
+ unsigned sample_count,
+ unsigned storage_sample_count,
+ unsigned usage)
{
struct r600_screen *rscreen = (struct r600_screen*)screen;
unsigned retval = 0;
if (target >= PIPE_MAX_TEXTURE_TYPES) {
R600_ERR("r600: unsupported texture type %d\n", target);
- return FALSE;
+ return false;
}
if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
if (sample_count > 1) {
if (!rscreen->has_msaa)
- return FALSE;
+ return false;
switch (sample_count) {
case 2:
case 8:
break;
default:
- return FALSE;
+ return false;
}
}
void *evergreen_create_resolve_blend(struct r600_context *rctx);
void *evergreen_create_decompress_blend(struct r600_context *rctx);
void *evergreen_create_fastclear_blend(struct r600_context *rctx);
-boolean evergreen_is_format_supported(struct pipe_screen *screen,
- enum pipe_format format,
- enum pipe_texture_target target,
- unsigned sample_count,
- unsigned storage_sample_count,
- unsigned usage);
+bool evergreen_is_format_supported(struct pipe_screen *screen,
+ enum pipe_format format,
+ enum pipe_texture_target target,
+ unsigned sample_count,
+ unsigned storage_sample_count,
+ unsigned usage);
void evergreen_init_color_surface(struct r600_context *rctx,
struct r600_surface *surf);
void evergreen_init_color_surface_rat(struct r600_context *rctx,
void *r700_create_resolve_blend(struct r600_context *rctx);
void *r600_create_decompress_blend(struct r600_context *rctx);
bool r600_adjust_gprs(struct r600_context *rctx);
-boolean r600_is_format_supported(struct pipe_screen *screen,
- enum pipe_format format,
- enum pipe_texture_target target,
- unsigned sample_count,
- unsigned storage_sample_count,
- unsigned usage);
+bool r600_is_format_supported(struct pipe_screen *screen,
+ enum pipe_format format,
+ enum pipe_texture_target target,
+ unsigned sample_count,
+ unsigned storage_sample_count,
+ unsigned usage);
void r600_update_db_shader_control(struct r600_context * rctx);
void r600_setup_scratch_buffers(struct r600_context *rctx);
*rdst = rsrc;
}
-static boolean r600_fence_finish(struct pipe_screen *screen,
- struct pipe_context *ctx,
- struct pipe_fence_handle *fence,
- uint64_t timeout)
+static bool r600_fence_finish(struct pipe_screen *screen,
+ struct pipe_context *ctx,
+ struct pipe_fence_handle *fence,
+ uint64_t timeout)
{
struct radeon_winsys *rws = ((struct r600_common_screen*)screen)->ws;
struct r600_multi_fence *rfence = (struct r600_multi_fence *)fence;
rquery->ops->destroy(rctx->screen, rquery);
}
-static boolean r600_begin_query(struct pipe_context *ctx,
- struct pipe_query *query)
+static bool r600_begin_query(struct pipe_context *ctx,
+ struct pipe_query *query)
{
struct r600_common_context *rctx = (struct r600_common_context *)ctx;
struct r600_query *rquery = (struct r600_query *)query;
}
}
-static boolean r600_get_query_result(struct pipe_context *ctx,
- struct pipe_query *query, boolean wait,
- union pipe_query_result *result)
+static bool r600_get_query_result(struct pipe_context *ctx,
+ struct pipe_query *query, bool wait,
+ union pipe_query_result *result)
{
struct r600_common_context *rctx = (struct r600_common_context *)ctx;
struct r600_query *rquery = (struct r600_query *)query;
static void r600_get_query_result_resource(struct pipe_context *ctx,
struct pipe_query *query,
- boolean wait,
+ bool wait,
enum pipe_query_value_type result_type,
int index,
struct pipe_resource *resource,
static void r600_render_condition(struct pipe_context *ctx,
struct pipe_query *query,
- boolean condition,
+ bool condition,
enum pipe_render_cond_flag mode)
{
struct r600_common_context *rctx = (struct r600_common_context *)ctx;
return r600_translate_dbformat(format) != ~0U;
}
-boolean r600_is_format_supported(struct pipe_screen *screen,
- enum pipe_format format,
- enum pipe_texture_target target,
- unsigned sample_count,
- unsigned storage_sample_count,
- unsigned usage)
+bool r600_is_format_supported(struct pipe_screen *screen,
+ enum pipe_format format,
+ enum pipe_texture_target target,
+ unsigned sample_count,
+ unsigned storage_sample_count,
+ unsigned usage)
{
struct r600_screen *rscreen = (struct r600_screen*)screen;
unsigned retval = 0;
if (target >= PIPE_MAX_TEXTURE_TYPES) {
R600_ERR("r600: unsupported texture type %d\n", target);
- return FALSE;
+ return false;
}
if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
if (sample_count > 1) {
if (!rscreen->has_msaa)
- return FALSE;
+ return false;
/* R11G11B10 is broken on R6xx. */
if (rscreen->b.chip_class == R600 &&
format == PIPE_FORMAT_R11G11B10_FLOAT)
- return FALSE;
+ return false;
/* MSAA integer colorbuffers hang. */
if (util_format_is_pure_integer(format) &&
!util_format_is_depth_or_stencil(format))
- return FALSE;
+ return false;
switch (sample_count) {
case 2:
case 8:
break;
default:
- return FALSE;
+ return false;
}
}
}
-static void r600_set_active_query_state(struct pipe_context *ctx, boolean enable)
+static void r600_set_active_query_state(struct pipe_context *ctx, bool enable)
{
struct r600_context *rctx = (struct r600_context*)ctx;
*poffset = offset;
}
-static boolean r600_texture_get_handle(struct pipe_screen* screen,
- struct pipe_context *ctx,
- struct pipe_resource *resource,
- struct winsys_handle *whandle,
- unsigned usage)
+static bool r600_texture_get_handle(struct pipe_screen* screen,
+ struct pipe_context *ctx,
+ struct pipe_resource *resource,
+ struct winsys_handle *whandle,
+ unsigned usage)
{
struct r600_common_screen *rscreen = (struct r600_common_screen*)screen;
struct r600_common_context *rctx;
}
}
-boolean rvid_is_format_supported(struct pipe_screen *screen,
- enum pipe_format format,
- enum pipe_video_profile profile,
- enum pipe_video_entrypoint entrypoint)
+bool rvid_is_format_supported(struct pipe_screen *screen,
+ enum pipe_format format,
+ enum pipe_video_profile profile,
+ enum pipe_video_entrypoint entrypoint)
{
/* HEVC 10 bit decoding should use P016 instead of NV12 if possible */
if (profile == PIPE_VIDEO_PROFILE_HEVC_MAIN_10)
enum pipe_video_cap param);
/* the hardware only supports NV12 */
-boolean rvid_is_format_supported(struct pipe_screen *screen,
- enum pipe_format format,
- enum pipe_video_profile profile,
- enum pipe_video_entrypoint entrypoint);
+bool rvid_is_format_supported(struct pipe_screen *screen,
+ enum pipe_format format,
+ enum pipe_video_profile profile,
+ enum pipe_video_entrypoint entrypoint);
#endif // RADEON_VIDEO_H
si_blitter_end(sctx);
}
-static boolean si_generate_mipmap(struct pipe_context *ctx,
- struct pipe_resource *tex,
- enum pipe_format format,
- unsigned base_level, unsigned last_level,
- unsigned first_layer, unsigned last_layer)
+static bool si_generate_mipmap(struct pipe_context *ctx,
+ struct pipe_resource *tex,
+ enum pipe_format format,
+ unsigned base_level, unsigned last_level,
+ unsigned first_layer, unsigned last_layer)
{
struct si_context *sctx = (struct si_context*)ctx;
struct si_texture *stex = (struct si_texture *)tex;
}
}
-static boolean si_fence_finish(struct pipe_screen *screen,
- struct pipe_context *ctx,
- struct pipe_fence_handle *fence,
- uint64_t timeout)
+static bool si_fence_finish(struct pipe_screen *screen,
+ struct pipe_context *ctx,
+ struct pipe_fence_handle *fence,
+ uint64_t timeout)
{
struct radeon_winsys *rws = ((struct si_screen*)screen)->ws;
struct si_multi_fence *sfence = (struct si_multi_fence *)fence;
}
}
-static boolean si_vid_is_format_supported(struct pipe_screen *screen,
- enum pipe_format format,
- enum pipe_video_profile profile,
- enum pipe_video_entrypoint entrypoint)
+static bool si_vid_is_format_supported(struct pipe_screen *screen,
+ enum pipe_format format,
+ enum pipe_video_profile profile,
+ enum pipe_video_entrypoint entrypoint)
{
/* HEVC 10 bit decoding should use P016 instead of NV12 if possible */
if (profile == PIPE_VIDEO_PROFILE_HEVC_MAIN_10)
squery->ops->destroy(sctx, squery);
}
-static boolean si_begin_query(struct pipe_context *ctx,
- struct pipe_query *query)
+static bool si_begin_query(struct pipe_context *ctx,
+ struct pipe_query *query)
{
struct si_context *sctx = (struct si_context *)ctx;
struct si_query *squery = (struct si_query *)query;
.resume = si_query_hw_resume,
};
-static boolean si_get_query_result(struct pipe_context *ctx,
- struct pipe_query *query, boolean wait,
- union pipe_query_result *result)
+static bool si_get_query_result(struct pipe_context *ctx,
+ struct pipe_query *query, bool wait,
+ union pipe_query_result *result)
{
struct si_context *sctx = (struct si_context *)ctx;
struct si_query *squery = (struct si_query *)query;
static void si_get_query_result_resource(struct pipe_context *ctx,
struct pipe_query *query,
- boolean wait,
+ bool wait,
enum pipe_query_value_type result_type,
int index,
struct pipe_resource *resource,
static void si_render_condition(struct pipe_context *ctx,
struct pipe_query *query,
- boolean condition,
+ bool condition,
enum pipe_render_cond_flag mode)
{
struct si_context *sctx = (struct si_context *)ctx;
/* DB RENDER STATE */
-static void si_set_active_query_state(struct pipe_context *ctx, boolean enable)
+static void si_set_active_query_state(struct pipe_context *ctx, bool enable)
{
struct si_context *sctx = (struct si_context*)ctx;
return si_translate_dbformat(format) != V_028040_Z_INVALID;
}
-static boolean si_is_format_supported(struct pipe_screen *screen,
- enum pipe_format format,
- enum pipe_texture_target target,
- unsigned sample_count,
- unsigned storage_sample_count,
- unsigned usage)
+static bool si_is_format_supported(struct pipe_screen *screen,
+ enum pipe_format format,
+ enum pipe_texture_target target,
+ unsigned sample_count,
+ unsigned storage_sample_count,
+ unsigned usage)
{
struct si_screen *sscreen = (struct si_screen *)screen;
unsigned retval = 0;
}
static void si_set_window_rectangles(struct pipe_context *ctx,
- boolean include,
+ bool include,
unsigned num_rectangles,
const struct pipe_scissor_state *rects)
{
*poffset = offset;
}
-static boolean si_texture_get_handle(struct pipe_screen* screen,
- struct pipe_context *ctx,
- struct pipe_resource *resource,
- struct winsys_handle *whandle,
- unsigned usage)
+static bool si_texture_get_handle(struct pipe_screen* screen,
+ struct pipe_context *ctx,
+ struct pipe_resource *resource,
+ struct winsys_handle *whandle,
+ unsigned usage)
{
struct si_screen *sscreen = (struct si_screen*)screen;
struct si_context *sctx;
static void
softpipe_render_condition(struct pipe_context *pipe,
struct pipe_query *query,
- boolean condition,
+ bool condition,
enum pipe_render_cond_flag mode)
{
struct softpipe_context *softpipe = softpipe_context( pipe );
softpipe->tgsi.buffer[i] = sp_create_tgsi_buffer();
}
- softpipe->dump_fs = debug_get_bool_option( "SOFTPIPE_DUMP_FS", FALSE );
- softpipe->dump_gs = debug_get_bool_option( "SOFTPIPE_DUMP_GS", FALSE );
- softpipe->dump_cs = debug_get_bool_option( "SOFTPIPE_DUMP_CS", FALSE );
+ softpipe->dump_fs = debug_get_bool_option( "SOFTPIPE_DUMP_FS", false );
+ softpipe->dump_gs = debug_get_bool_option( "SOFTPIPE_DUMP_GS", false );
+ softpipe->dump_cs = debug_get_bool_option( "SOFTPIPE_DUMP_CS", false );
softpipe->pipe.screen = screen;
softpipe->pipe.destroy = softpipe_destroy;
(struct tgsi_buffer *)
softpipe->tgsi.buffer[PIPE_SHADER_GEOMETRY]);
- if (debug_get_bool_option( "SOFTPIPE_NO_RAST", FALSE ))
+ if (debug_get_bool_option( "SOFTPIPE_NO_RAST", false ))
softpipe->no_rast = TRUE;
softpipe->vbuf_backend = sp_create_vbuf_backend(softpipe);
/** Conditional query object and mode */
struct pipe_query *render_cond_query;
enum pipe_render_cond_flag render_cond_mode;
- boolean render_cond_cond;
+ bool render_cond_cond;
/** Polygon stipple items */
struct {
}
-static boolean
+static bool
softpipe_fence_finish(struct pipe_screen *screen,
struct pipe_context *ctx,
struct pipe_fence_handle *fence,
}
-static boolean
+static bool
softpipe_begin_query(struct pipe_context *pipe, struct pipe_query *q)
{
struct softpipe_context *softpipe = softpipe_context( pipe );
}
-static boolean
+static bool
softpipe_get_query_result(struct pipe_context *pipe,
struct pipe_query *q,
- boolean wait,
+ bool wait,
union pipe_query_result *vresult)
{
struct softpipe_query *sq = softpipe_query(q);
sizeof(struct pipe_query_data_pipeline_statistics));
break;
case PIPE_QUERY_GPU_FINISHED:
- vresult->b = TRUE;
+ vresult->b = true;
break;
case PIPE_QUERY_SO_OVERFLOW_PREDICATE:
case PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE:
(struct pipe_query_data_timestamp_disjoint *)vresult;
/* os_get_time_nano return nanoseconds */
td->frequency = UINT64_C(1000000000);
- td->disjoint = FALSE;
+ td->disjoint = false;
}
break;
case PIPE_QUERY_PRIMITIVES_EMITTED:
*result = sq->end - sq->start;
break;
}
- return TRUE;
+ return true;
}
static void
-softpipe_set_active_query_state(struct pipe_context *pipe, boolean enable)
+softpipe_set_active_query_state(struct pipe_context *pipe, bool enable)
{
}
* \param format the format to test
* \param type one of PIPE_TEXTURE, PIPE_SURFACE
*/
-static boolean
+static bool
softpipe_is_format_supported( struct pipe_screen *screen,
enum pipe_format format,
enum pipe_texture_target target,
format_desc = util_format_description(format);
if (!format_desc)
- return FALSE;
+ return false;
if (sample_count > 1)
- return FALSE;
+ return false;
if (bind & (PIPE_BIND_DISPLAY_TARGET |
PIPE_BIND_SCANOUT |
PIPE_BIND_SHARED)) {
if(!winsys->is_displaytarget_format_supported(winsys, bind, format))
- return FALSE;
+ return false;
}
if (bind & PIPE_BIND_RENDER_TARGET) {
if (format_desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS)
- return FALSE;
+ return false;
/*
* Although possible, it is unnatural to render into compressed or YUV
*/
if (format_desc->block.width != 1 ||
format_desc->block.height != 1)
- return FALSE;
+ return false;
}
if (bind & PIPE_BIND_DEPTH_STENCIL) {
if (format_desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS)
- return FALSE;
+ return false;
}
if (format_desc->layout == UTIL_FORMAT_LAYOUT_ASTC ||
format_desc->layout == UTIL_FORMAT_LAYOUT_ATC) {
/* Software decoding is not hooked up. */
- return FALSE;
+ return false;
}
if ((bind & (PIPE_BIND_RENDER_TARGET | PIPE_BIND_SAMPLER_VIEW)) &&
* PIPE_FORMAT_R8G8B8X8_UNORM, for example, which will not work
* (different bpp).
*/
- return FALSE;
+ return false;
}
}
if (format_desc->layout == UTIL_FORMAT_LAYOUT_ETC &&
format != PIPE_FORMAT_ETC1_RGB8)
- return FALSE;
+ return false;
/*
* All other operations (sampling, transfer, etc).
/*
* Everything else should be supported by u_format.
*/
- return TRUE;
+ return true;
}
* Check the size of the texture specified by 'res'.
* \return TRUE if OK, FALSE if too large.
*/
-static boolean
+static bool
softpipe_can_create_resource(struct pipe_screen *screen,
const struct pipe_resource *res)
{
}
-static boolean
+static bool
softpipe_resource_get_handle(struct pipe_screen *screen,
struct pipe_context *ctx,
struct pipe_resource *pt,
assert(spr->dt);
if (!spr->dt)
- return FALSE;
+ return false;
return winsys->displaytarget_get_handle(winsys, spr->dt, whandle);
}
* Implement pipe_screen::is_format_supported().
* \param bindings bitmask of PIPE_BIND_x flags
*/
-boolean
+bool
svga_is_format_supported(struct pipe_screen *screen,
enum pipe_format format,
enum pipe_texture_target target,
/* Multisamples is not supported in VGPU9 device */
if (sample_count > 1)
- return FALSE;
+ return false;
svga_format = svga_translate_format(ss, format, bindings);
if (svga_format == SVGA3D_FORMAT_INVALID) {
- return FALSE;
+ return false;
}
if (util_format_is_srgb(format) &&
(bindings & PIPE_BIND_DISPLAY_TARGET)) {
/* We only support sRGB rendering with vgpu10 */
- return FALSE;
+ return false;
}
/*
*/
case SVGA3D_A4R4G4B4:
case SVGA3D_A1R5G5B5:
- return FALSE;
+ return false;
default:
- return FALSE;
+ return false;
}
}
*/
if (!svga_format_is_integer(svga_format) &&
(caps.value & SVGA3DFORMAT_OP_NOALPHABLEND)) {
- return FALSE;
+ return false;
}
}
* Implement pipe_screen::is_format_supported() for VGPU10 device.
* \param bindings bitmask of PIPE_BIND_x flags
*/
-boolean
+bool
svga_is_dx_format_supported(struct pipe_screen *screen,
enum pipe_format format,
enum pipe_texture_target target,
* multisample with N+1 samples per pixel.
*/
if ((ss->ms_samples & (1 << (sample_count - 1))) == 0) {
- return FALSE;
+ return false;
}
mask |= SVGA3D_DXFMT_MULTISAMPLE;
}
svga_format = svga_translate_format(ss, format, bindings);
if (svga_format == SVGA3D_FORMAT_INVALID) {
- return FALSE;
+ return false;
}
/*
*/
case SVGA3D_A4R4G4B4:
case SVGA3D_A1R5G5B5:
- return FALSE;
+ return false;
default:
- return FALSE;
+ return false;
}
}
*/
if (!(svga_format_is_integer(svga_format) ||
(caps.u & SVGA3D_DXFMT_BLENDABLE))) {
- return FALSE;
+ return false;
}
mask |= SVGA3D_DXFMT_COLOR_RENDERTARGET;
}
/* Is the format supported for rendering */
if ((caps.u & mask) != mask)
- return FALSE;
+ return false;
if (bindings & PIPE_BIND_SAMPLER_VIEW) {
SVGA3dSurfaceFormat sampler_format;
mask &= SVGA3D_DXFMT_VOLUME;
mask |= SVGA3D_DXFMT_SHADER_SAMPLE;
if ((caps.u & mask) != mask)
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
svga_linear_to_srgb(SVGA3dSurfaceFormat format);
-boolean
+bool
svga_is_format_supported(struct pipe_screen *screen,
enum pipe_format format,
enum pipe_texture_target target,
unsigned bindings);
-boolean
+bool
svga_is_dx_format_supported(struct pipe_screen *screen,
enum pipe_format format,
enum pipe_texture_target target,
* VGPU9
*/
-static boolean
+static bool
svga_get_query_result(struct pipe_context *pipe,
struct pipe_query *q,
- boolean wait,
+ bool wait,
union pipe_query_result *result);
static enum pipe_error
return ret;
}
-static boolean
+static bool
get_query_result_vgpu9(struct svga_context *svga, struct svga_query *sq,
- boolean wait, uint64_t *result)
+ bool wait, uint64_t *result)
{
struct svga_winsys_screen *sws = svga_screen(svga->pipe.screen)->sws;
enum pipe_error ret;
state = sq->queryResult->state;
if (state == SVGA3D_QUERYSTATE_PENDING) {
if (!wait)
- return FALSE;
+ return false;
sws->fence_finish(sws, sq->fence, PIPE_TIMEOUT_INFINITE,
SVGA_FENCE_FLAG_QUERY);
state = sq->queryResult->state;
state == SVGA3D_QUERYSTATE_FAILED);
*result = (uint64_t)sq->queryResult->result32;
- return TRUE;
+ return true;
}
return ret;
}
-static boolean
+static bool
get_query_result_vgpu10(struct svga_context *svga, struct svga_query *sq,
- boolean wait, void *result, int resultLen)
+ bool wait, void *result, int resultLen)
{
struct svga_winsys_screen *sws = svga_screen(svga->pipe.screen)->sws;
SVGA3dQueryState queryState;
if (queryState == SVGA3D_QUERYSTATE_PENDING ||
queryState == SVGA3D_QUERYSTATE_NEW) {
if (!wait)
- return FALSE;
+ return false;
sws->fence_finish(sws, sq->fence, PIPE_TIMEOUT_INFINITE,
SVGA_FENCE_FLAG_QUERY);
sws->query_get_result(sws, sq->gb_query, sq->offset, &queryState, result, resultLen);
assert(queryState == SVGA3D_QUERYSTATE_SUCCEEDED ||
queryState == SVGA3D_QUERYSTATE_FAILED);
- return TRUE;
+ return true;
}
static struct pipe_query *
}
-static boolean
+static bool
svga_begin_query(struct pipe_context *pipe, struct pipe_query *q)
{
struct svga_context *svga = svga_context(pipe);
}
-static boolean
+static bool
svga_get_query_result(struct pipe_context *pipe,
struct pipe_query *q,
- boolean wait,
+ bool wait,
union pipe_query_result *vresult)
{
struct svga_screen *svgascreen = svga_screen(pipe->screen);
struct svga_context *svga = svga_context(pipe);
struct svga_query *sq = svga_query(q);
uint64_t *result = (uint64_t *)vresult;
- boolean ret = TRUE;
+ bool ret = true;
assert(sq);
static void
svga_render_condition(struct pipe_context *pipe, struct pipe_query *q,
- boolean condition, enum pipe_render_cond_flag mode)
+ bool condition, enum pipe_render_cond_flag mode)
{
struct svga_context *svga = svga_context(pipe);
struct svga_winsys_screen *sws = svga_screen(svga->pipe.screen)->sws;
static void
-svga_set_active_query_state(struct pipe_context *pipe, boolean enable)
+svga_set_active_query_state(struct pipe_context *pipe, bool enable)
{
}
* and format can be created.
* \Return TRUE if OK, FALSE if too large.
*/
-static boolean
+static bool
svga_can_create_resource(struct pipe_screen *screen,
const struct pipe_resource *res)
{
format = svga_translate_format(svgascreen, res->format, res->bind);
if (format == SVGA3D_FORMAT_INVALID)
- return FALSE;
+ return false;
base_level_size.width = res->width0;
base_level_size.height = res->height0;
-static boolean
+static bool
svga_texture_get_handle(struct pipe_screen *screen,
struct pipe_resource *texture,
struct winsys_handle *whandle)
return NULL;
}
-boolean
+bool
svga_texture_generate_mipmap(struct pipe_context *pipe,
struct pipe_resource *pt,
enum pipe_format format,
/* Only support 2D texture for now */
if (pt->target != PIPE_TEXTURE_2D)
- return FALSE;
+ return false;
/* Fallback to the mipmap generation utility for those formats that
* do not support hw generate mipmap
*/
if (!svga_format_support_gen_mips(format))
- return FALSE;
+ return false;
/* Make sure the texture surface was created with
* SVGA3D_SURFACE_BIND_RENDER_TARGET
*/
if (!tex->handle || !(tex->key.flags & SVGA3D_SURFACE_BIND_RENDER_TARGET))
- return FALSE;
+ return false;
templ.format = format;
templ.u.tex.first_layer = first_layer;
psv = pipe->create_sampler_view(pipe, pt, &templ);
if (psv == NULL)
- return FALSE;
+ return false;
sv = svga_pipe_sampler_view(psv);
ret = svga_validate_pipe_sampler_view(svga, sv);
svga->hud.num_generate_mipmap++;
- return TRUE;
+ return true;
}
const struct pipe_resource *template,
struct winsys_handle *whandle);
-boolean
+bool
svga_texture_generate_mipmap(struct pipe_context *pipe,
struct pipe_resource *pt,
enum pipe_format format,
}
-static boolean
+static bool
svga_fence_finish(struct pipe_screen *screen,
struct pipe_context *ctx,
struct pipe_fence_handle *fence,
uint64_t timeout)
{
struct svga_winsys_screen *sws = svga_screen(screen)->sws;
- boolean retVal;
+ bool retVal;
SVGA_STATS_TIME_PUSH(sws, SVGA_STATS_TIME_FENCEFINISH);
static void
swr_render_condition(struct pipe_context *pipe,
struct pipe_query *query,
- boolean condition,
+ bool condition,
enum pipe_render_cond_flag mode)
{
struct swr_context *ctx = swr_context(pipe);
/** Conditional query object and mode */
struct pipe_query *render_cond_query;
enum pipe_render_cond_flag render_cond_mode;
- boolean render_cond_cond;
+ bool render_cond_cond;
unsigned active_queries;
unsigned num_vertex_buffers;
/*
* Wait for the fence to finish.
*/
-boolean
+bool
swr_fence_finish(struct pipe_screen *screen,
struct pipe_context *ctx,
struct pipe_fence_handle *fence_handle,
}
-static INLINE boolean
+static INLINE bool
swr_is_fence_done(struct pipe_fence_handle *fence_handle)
{
struct swr_fence *fence = swr_fence(fence_handle);
return (fence->read == fence->write);
}
-static INLINE boolean
+static INLINE bool
swr_is_fence_pending(struct pipe_fence_handle *fence_handle)
{
return swr_fence(fence_handle)->pending;
struct pipe_fence_handle **ptr,
struct pipe_fence_handle *f);
-boolean swr_fence_finish(struct pipe_screen *screen,
- struct pipe_context *ctx,
- struct pipe_fence_handle *fence_handle,
- uint64_t timeout);
+bool swr_fence_finish(struct pipe_screen *screen,
+ struct pipe_context *ctx,
+ struct pipe_fence_handle *fence_handle,
+ uint64_t timeout);
void
swr_fence_submit(struct swr_context *ctx, struct pipe_fence_handle *fence);
}
-static boolean
+static bool
swr_get_query_result(struct pipe_context *pipe,
struct pipe_query *q,
- boolean wait,
+ bool wait,
union pipe_query_result *result)
{
struct swr_query *pq = swr_query(q);
if (pq->fence) {
if (!wait && !swr_is_fence_done(pq->fence))
- return FALSE;
+ return false;
swr_fence_finish(pipe->screen, NULL, pq->fence, 0);
swr_fence_reference(pipe->screen, &pq->fence, NULL);
result->b = pq->result.core.DepthPassCount != 0;
break;
case PIPE_QUERY_GPU_FINISHED:
- result->b = TRUE;
+ result->b = true;
break;
/* Counters */
case PIPE_QUERY_OCCLUSION_COUNTER:
break;
}
- return TRUE;
+ return true;
}
-static boolean
+static bool
swr_begin_query(struct pipe_context *pipe, struct pipe_query *q)
{
struct swr_context *ctx = swr_context(pipe);
}
-boolean
+bool
swr_check_render_cond(struct pipe_context *pipe)
{
struct swr_context *ctx = swr_context(pipe);
- boolean b, wait;
+ bool b, wait;
uint64_t result;
if (!ctx->render_cond_query)
- return TRUE; /* no query predicate, draw normally */
+ return true; /* no query predicate, draw normally */
wait = (ctx->render_cond_mode == PIPE_RENDER_COND_WAIT
|| ctx->render_cond_mode == PIPE_RENDER_COND_BY_REGION_WAIT);
if (b)
return ((!result) == ctx->render_cond_cond);
else
- return TRUE;
+ return true;
}
static void
-swr_set_active_query_state(struct pipe_context *pipe, boolean enable)
+swr_set_active_query_state(struct pipe_context *pipe, bool enable)
{
}
extern void swr_query_init(struct pipe_context *pipe);
-extern boolean swr_check_render_cond(struct pipe_context *pipe);
+extern bool swr_check_render_cond(struct pipe_context *pipe);
#endif
return (struct swr_resource *)resource;
}
-static INLINE boolean
+static INLINE bool
swr_resource_is_texture(const struct pipe_resource *resource)
{
switch (resource->target) {
case PIPE_BUFFER:
- return FALSE;
+ return false;
case PIPE_TEXTURE_1D:
case PIPE_TEXTURE_1D_ARRAY:
case PIPE_TEXTURE_2D:
case PIPE_TEXTURE_3D:
case PIPE_TEXTURE_CUBE:
case PIPE_TEXTURE_CUBE_ARRAY:
- return TRUE;
+ return true;
default:
assert(0);
- return FALSE;
+ return false;
}
}
return "Intel Corporation";
}
-static boolean
+static bool
swr_is_format_supported(struct pipe_screen *_screen,
enum pipe_format format,
enum pipe_texture_target target,
format_desc = util_format_description(format);
if (!format_desc)
- return FALSE;
+ return false;
if ((sample_count > screen->msaa_max_count)
|| !util_is_power_of_two_or_zero(sample_count))
- return FALSE;
+ return false;
if (bind & PIPE_BIND_DISPLAY_TARGET) {
if (!winsys->is_displaytarget_format_supported(winsys, bind, format))
- return FALSE;
+ return false;
}
if (bind & PIPE_BIND_RENDER_TARGET) {
if (format_desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS)
- return FALSE;
+ return false;
if (mesa_to_swr_format(format) == (SWR_FORMAT)-1)
- return FALSE;
+ return false;
/*
* Although possible, it is unnatural to render into compressed or YUV
* inside the state trackers.
*/
if (format_desc->block.width != 1 || format_desc->block.height != 1)
- return FALSE;
+ return false;
}
if (bind & PIPE_BIND_DEPTH_STENCIL) {
if (format_desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS)
- return FALSE;
+ return false;
if (mesa_to_swr_format(format) == (SWR_FORMAT)-1)
- return FALSE;
+ return false;
}
if (format_desc->layout == UTIL_FORMAT_LAYOUT_BPTC ||
format_desc->layout == UTIL_FORMAT_LAYOUT_ASTC) {
- return FALSE;
+ return false;
}
if (format_desc->layout == UTIL_FORMAT_LAYOUT_ETC &&
format != PIPE_FORMAT_ETC1_RGB8) {
- return FALSE;
+ return false;
}
if ((bind & (PIPE_BIND_RENDER_TARGET | PIPE_BIND_SAMPLER_VIEW)) &&
if (format_desc->is_array &&
format_desc->nr_channels == 3 &&
format_desc->block.bits != 96) {
- return FALSE;
+ return false;
}
}
return it->second;
}
-static boolean
+static bool
swr_displaytarget_layout(struct swr_screen *screen, struct swr_resource *res)
{
struct sw_winsys *winsys = screen->winsys;
&stride);
if (dt == NULL)
- return FALSE;
+ return false;
void *map = winsys->displaytarget_map(winsys, dt, 0);
winsys->displaytarget_unmap(winsys, dt);
- return TRUE;
+ return true;
}
static bool
swr_texture_layout(struct swr_screen *screen,
struct swr_resource *res,
- boolean allocate)
+ bool allocate)
{
struct pipe_resource *pt = &res->base;
return true;
}
-static boolean
+static bool
swr_can_create_resource(struct pipe_screen *screen,
const struct pipe_resource *templat)
{
/* Helper function that conditionally creates a single-sample resolve resource
* and attaches it to main multisample resource. */
-static boolean
+static bool
swr_create_resolve_resource(struct pipe_screen *_screen,
struct swr_resource *msaa_res)
{
struct sw_winsys *winsys;
/* Configurable environment settings */
- boolean msaa_force_enable;
+ bool msaa_force_enable;
uint8_t msaa_max_count;
uint32_t client_copy_limit;
{
struct swr_context *ctx = swr_context(pipe);
- boolean changed = !util_framebuffer_state_equal(&ctx->framebuffer, fb);
+ bool changed = !util_framebuffer_state_equal(&ctx->framebuffer, fb);
assert(fb->width <= KNOB_GUARDBAND_WIDTH);
assert(fb->height <= KNOB_GUARDBAND_HEIGHT);
static void
tegra_render_condition(struct pipe_context *pcontext,
struct pipe_query *query,
- boolean condition,
+ bool condition,
unsigned int mode)
{
struct tegra_context *context = to_tegra_context(pcontext);
context->gpu->destroy_query(context->gpu, query);
}
-static boolean
+static bool
tegra_begin_query(struct pipe_context *pcontext, struct pipe_query *query)
{
struct tegra_context *context = to_tegra_context(pcontext);
return context->gpu->end_query(context->gpu, query);
}
-static boolean
+static bool
tegra_get_query_result(struct pipe_context *pcontext,
struct pipe_query *query,
- boolean wait,
+ bool wait,
union pipe_query_result *result)
{
struct tegra_context *context = to_tegra_context(pcontext);
static void
tegra_get_query_result_resource(struct pipe_context *pcontext,
struct pipe_query *query,
- boolean wait,
+ bool wait,
enum pipe_query_value_type result_type,
int index,
struct pipe_resource *resource,
}
static void
-tegra_set_active_query_state(struct pipe_context *pcontext, boolean enable)
+tegra_set_active_query_state(struct pipe_context *pcontext, bool enable)
{
struct tegra_context *context = to_tegra_context(pcontext);
}
static void
-tegra_set_window_rectangles(struct pipe_context *pcontext, boolean include,
+tegra_set_window_rectangles(struct pipe_context *pcontext, bool include,
unsigned int num_rectangles,
const struct pipe_scissor_state *rectangles)
{
context->gpu->emit_string_marker(context->gpu, string, length);
}
-static boolean
+static bool
tegra_generate_mipmap(struct pipe_context *pcontext,
struct pipe_resource *presource,
enum pipe_format format,
return screen->gpu->get_timestamp(screen->gpu);
}
-static boolean
+static bool
tegra_screen_is_format_supported(struct pipe_screen *pscreen,
enum pipe_format format,
enum pipe_texture_target target,
usage);
}
-static boolean
+static bool
tegra_screen_is_video_format_supported(struct pipe_screen *pscreen,
enum pipe_format format,
enum pipe_video_profile profile,
entrypoint);
}
-static boolean
+static bool
tegra_screen_can_create_resource(struct pipe_screen *pscreen,
const struct pipe_resource *template)
{
struct tegra_resource *resource)
{
struct winsys_handle handle;
- boolean status;
+ bool status;
int fd, err;
memset(&handle, 0, sizeof(handle));
return resource;
}
-static boolean
+static bool
tegra_screen_resource_get_handle(struct pipe_screen *pscreen,
struct pipe_context *pcontext,
struct pipe_resource *presource,
struct tegra_resource *resource = to_tegra_resource(presource);
struct tegra_context *context = to_tegra_context(pcontext);
struct tegra_screen *screen = to_tegra_screen(pscreen);
- boolean ret = TRUE;
+ bool ret = true;
/*
* Assume that KMS handles for scanout resources will only ever be used
screen->gpu->fence_reference(screen->gpu, ptr, fence);
}
-static boolean
+static bool
tegra_screen_fence_finish(struct pipe_screen *pscreen,
struct pipe_context *pcontext,
struct pipe_fence_handle *fence,
return true;
}
-boolean
+bool
v3d_generate_mipmap(struct pipe_context *pctx,
struct pipe_resource *prsc,
enum pipe_format format,
void v3d_init_query_functions(struct v3d_context *v3d);
void v3d_blit(struct pipe_context *pctx, const struct pipe_blit_info *blit_info);
void v3d_blitter_save(struct v3d_context *v3d);
-boolean v3d_generate_mipmap(struct pipe_context *pctx,
- struct pipe_resource *prsc,
- enum pipe_format format,
- unsigned int base_level,
- unsigned int last_level,
- unsigned int first_layer,
- unsigned int last_layer);
+bool v3d_generate_mipmap(struct pipe_context *pctx,
+ struct pipe_resource *prsc,
+ enum pipe_format format,
+ unsigned int base_level,
+ unsigned int last_level,
+ unsigned int first_layer,
+ unsigned int last_layer);
struct v3d_fence *v3d_fence_create(struct v3d_context *v3d);
*p = f;
}
-static boolean
+static bool
v3d_fence_finish(struct pipe_screen *pscreen,
struct pipe_context *ctx,
struct pipe_fence_handle *pf,
free(q);
}
-static boolean
+static bool
v3d_begin_query(struct pipe_context *pctx, struct pipe_query *query)
{
struct v3d_context *v3d = v3d_context(pctx);
return true;
}
-static boolean
+static bool
v3d_get_query_result(struct pipe_context *pctx, struct pipe_query *query,
- boolean wait, union pipe_query_result *vresult)
+ bool wait, union pipe_query_result *vresult)
{
struct v3d_context *v3d = v3d_context(pctx);
struct v3d_query *q = (struct v3d_query *)query;
}
static void
-v3d_set_active_query_state(struct pipe_context *pctx, boolean enable)
+v3d_set_active_query_state(struct pipe_context *pctx, bool enable)
{
struct v3d_context *v3d = v3d_context(pctx);
free(rsc);
}
-static boolean
+static bool
v3d_resource_get_handle(struct pipe_screen *pscreen,
struct pipe_context *pctx,
struct pipe_resource *prsc,
return ok;
}
whandle->handle = bo->handle;
- return TRUE;
+ return true;
case WINSYS_HANDLE_TYPE_FD:
whandle->handle = v3d_bo_get_dmabuf(bo);
return whandle->handle != -1;
}
- return FALSE;
+ return false;
}
#define PAGE_UB_ROWS (VC5_UIFCFG_PAGE_SIZE / VC5_UIFBLOCK_ROW_SIZE)
return 0;
}
-static boolean
+static bool
v3d_screen_is_format_supported(struct pipe_screen *pscreen,
enum pipe_format format,
enum pipe_texture_target target,
return false;
if (sample_count > 1 && sample_count != V3D_MAX_SAMPLES)
- return FALSE;
+ return false;
if (target >= PIPE_MAX_TEXTURE_TYPES) {
- return FALSE;
+ return false;
}
if (usage & PIPE_BIND_VERTEX_BUFFER) {
case PIPE_FORMAT_B10G10R10A2_SSCALED:
break;
default:
- return FALSE;
+ return false;
}
}
if ((usage & PIPE_BIND_RENDER_TARGET) &&
format != PIPE_FORMAT_NONE &&
!v3d_rt_format_supported(&screen->devinfo, format)) {
- return FALSE;
+ return false;
}
if ((usage & PIPE_BIND_SAMPLER_VIEW) &&
!v3d_tex_format_supported(&screen->devinfo, format)) {
- return FALSE;
+ return false;
}
if ((usage & PIPE_BIND_DEPTH_STENCIL) &&
format == PIPE_FORMAT_Z16_UNORM ||
format == PIPE_FORMAT_Z32_FLOAT ||
format == PIPE_FORMAT_Z32_FLOAT_S8X24_UINT)) {
- return FALSE;
+ return false;
}
if ((usage & PIPE_BIND_INDEX_BUFFER) &&
!(format == PIPE_FORMAT_I8_UINT ||
format == PIPE_FORMAT_I16_UINT ||
format == PIPE_FORMAT_I32_UINT)) {
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
#define PTR_TO_UINT(x) ((unsigned)((intptr_t)(x)))
*p = f;
}
-static boolean
+static bool
vc4_fence_finish(struct pipe_screen *pscreen,
struct pipe_context *ctx,
struct pipe_fence_handle *pf,
free(query);
}
-static boolean
+static bool
vc4_begin_query(struct pipe_context *pctx, struct pipe_query *pquery)
{
struct vc4_query *query = (struct vc4_query *)pquery;
return true;
}
-static boolean
+static bool
vc4_get_query_result(struct pipe_context *pctx, struct pipe_query *pquery,
- boolean wait, union pipe_query_result *vresult)
+ bool wait, union pipe_query_result *vresult)
{
struct vc4_context *ctx = vc4_context(pctx);
struct vc4_query *query = (struct vc4_query *)pquery;
}
static void
-vc4_set_active_query_state(struct pipe_context *pctx, boolean enable)
+vc4_set_active_query_state(struct pipe_context *pctx, bool enable)
{
}
free(rsc);
}
-static boolean
+static bool
vc4_resource_get_handle(struct pipe_screen *pscreen,
struct pipe_context *pctx,
struct pipe_resource *prsc,
* control node was used for pl111.
*/
fprintf(stderr, "flink unsupported with pl111\n");
- return FALSE;
+ return false;
}
return vc4_bo_flink(rsc->bo, &whandle->handle);
return renderonly_get_handle(rsc->scanout, whandle);
}
whandle->handle = rsc->bo->handle;
- return TRUE;
+ return true;
case WINSYS_HANDLE_TYPE_FD:
/* FDs are cross-device, so we can export directly from vc4.
*/
return whandle->handle != -1;
}
- return FALSE;
+ return false;
}
static void
return 0;
}
-static boolean
+static bool
vc4_screen_is_format_supported(struct pipe_screen *pscreen,
enum pipe_format format,
enum pipe_texture_target target,
return false;
if (sample_count > 1 && sample_count != VC4_MAX_SAMPLES)
- return FALSE;
+ return false;
if (target >= PIPE_MAX_TEXTURE_TYPES) {
- return FALSE;
+ return false;
}
if (usage & PIPE_BIND_VERTEX_BUFFER) {
case PIPE_FORMAT_R8_SSCALED:
break;
default:
- return FALSE;
+ return false;
}
}
if ((usage & PIPE_BIND_RENDER_TARGET) &&
!vc4_rt_format_supported(format)) {
- return FALSE;
+ return false;
}
if ((usage & PIPE_BIND_SAMPLER_VIEW) &&
(!vc4_tex_format_supported(format) ||
(format == PIPE_FORMAT_ETC1_RGB8 && !screen->has_etc1))) {
- return FALSE;
+ return false;
}
if ((usage & PIPE_BIND_DEPTH_STENCIL) &&
format != PIPE_FORMAT_S8_UINT_Z24_UNORM &&
format != PIPE_FORMAT_X8Z24_UNORM) {
- return FALSE;
+ return false;
}
if ((usage & PIPE_BIND_INDEX_BUFFER) &&
format != PIPE_FORMAT_I8_UINT &&
format != PIPE_FORMAT_I16_UINT) {
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
static void
static void virgl_render_condition(struct pipe_context *ctx,
struct pipe_query *q,
- boolean condition,
+ bool condition,
enum pipe_render_cond_flag mode)
{
struct virgl_context *vctx = virgl_context(ctx);
FREE(query);
}
-static boolean virgl_begin_query(struct pipe_context *ctx,
+static bool virgl_begin_query(struct pipe_context *ctx,
struct pipe_query *q)
{
struct virgl_context *vctx = virgl_context(ctx);
return true;
}
-static boolean virgl_get_query_result(struct pipe_context *ctx,
- struct pipe_query *q,
- boolean wait,
- union pipe_query_result *result)
+static bool virgl_get_query_result(struct pipe_context *ctx,
+ struct pipe_query *q,
+ bool wait,
+ union pipe_query_result *result)
{
struct virgl_query *query = virgl_query(q);
}
static void
-virgl_set_active_query_state(struct pipe_context *pipe, boolean enable)
+virgl_set_active_query_state(struct pipe_context *pipe, bool enable)
{
}
static void
virgl_get_query_result_resource(struct pipe_context *ctx,
struct pipe_query *q,
- boolean wait,
+ bool wait,
enum pipe_query_value_type result_type,
int index,
struct pipe_resource *resource,
FREE(res);
}
-boolean virgl_resource_get_handle(struct pipe_screen *screen,
- struct pipe_resource *resource,
- struct winsys_handle *whandle)
+bool virgl_resource_get_handle(struct pipe_screen *screen,
+ struct pipe_resource *resource,
+ struct winsys_handle *whandle)
{
struct virgl_screen *vs = virgl_screen(screen);
struct virgl_resource *res = virgl_resource(resource);
if (res->u.b.target == PIPE_BUFFER)
- return FALSE;
+ return false;
return vs->vws->resource_get_handle(vs->vws, res->hw_res,
res->metadata.stride[0],
void virgl_resource_destroy(struct pipe_screen *screen,
struct pipe_resource *resource);
-boolean virgl_resource_get_handle(struct pipe_screen *screen,
- struct pipe_resource *resource,
- struct winsys_handle *whandle);
+bool virgl_resource_get_handle(struct pipe_screen *screen,
+ struct pipe_resource *resource,
+ struct winsys_handle *whandle);
void virgl_resource_dirty(struct virgl_resource *res, uint32_t level);
return 0;
}
-static boolean
+static bool
has_format_bit(struct virgl_supported_format_mask *mask,
enum virgl_formats fmt)
{
return (mask->bitmask[val / 32] & (1u << bit)) != 0;
}
-boolean
+bool
virgl_has_readback_format(struct pipe_screen *screen,
enum virgl_formats fmt)
{
fmt);
}
-static boolean
+static bool
virgl_is_vertex_format_supported(struct pipe_screen *screen,
enum pipe_format format)
{
format_desc = util_format_description(format);
if (!format_desc)
- return FALSE;
+ return false;
if (format == PIPE_FORMAT_R11G11B10_FLOAT) {
int vformat = VIRGL_FORMAT_R11G11B10_FLOAT;
int big = vformat / 32;
int small = vformat % 32;
if (!(vscreen->caps.caps.v1.vertexbuffer.bitmask[big] & (1 << small)))
- return FALSE;
- return TRUE;
+ return false;
+ return true;
}
/* Find the first non-VOID channel. */
}
if (i == 4)
- return FALSE;
+ return false;
if (format_desc->layout != UTIL_FORMAT_LAYOUT_PLAIN)
- return FALSE;
+ return false;
if (format_desc->channel[i].type == UTIL_FORMAT_TYPE_FIXED)
- return FALSE;
- return TRUE;
+ return false;
+ return true;
}
-static boolean
+static bool
virgl_format_check_bitmask(enum pipe_format format,
uint32_t bitmask[16],
- boolean may_emulate_bgra)
+ bool may_emulate_bgra)
{
int big = format / 32;
int small = format % 32;
if ((bitmask[big] & (1 << small)))
- return TRUE;
+ return true;
/* On GLES hosts we don't advertise BGRx_SRGB, but we may be able
* emulate it by using a swizzled RGBx */
else if (format == PIPE_FORMAT_B8G8R8X8_SRGB)
format = PIPE_FORMAT_R8G8B8X8_SRGB;
else {
- return FALSE;
+ return false;
}
big = format / 32;
small = format % 32;
if (bitmask[big] & (1 << small))
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
/**
* \param format the format to test
* \param type one of PIPE_TEXTURE, PIPE_SURFACE
*/
-static boolean
+static bool
virgl_is_format_supported( struct pipe_screen *screen,
enum pipe_format format,
enum pipe_texture_target target,
format_desc = util_format_description(format);
if (!format_desc)
- return FALSE;
+ return false;
if (util_format_is_intensity(format))
- return FALSE;
+ return false;
if (sample_count > 1) {
if (!vscreen->caps.caps.v1.bset.texture_multisample)
- return FALSE;
+ return false;
if (bind & PIPE_BIND_SHADER_IMAGE) {
if (sample_count > vscreen->caps.caps.v2.max_image_samples)
- return FALSE;
+ return false;
}
if (sample_count > vscreen->caps.caps.v1.max_samples)
- return FALSE;
+ return false;
}
if (bind & PIPE_BIND_VERTEX_BUFFER) {
}
if (util_format_is_compressed(format) && target == PIPE_BUFFER)
- return FALSE;
+ return false;
/* Allow 3-comp 32 bit textures only for TBOs (needed for ARB_tbo_rgb32) */
if ((format == PIPE_FORMAT_R32G32B32_FLOAT ||
format == PIPE_FORMAT_R32G32B32_SINT ||
format == PIPE_FORMAT_R32G32B32_UINT) &&
target != PIPE_BUFFER)
- return FALSE;
+ return false;
if ((format_desc->layout == UTIL_FORMAT_LAYOUT_RGTC ||
format_desc->layout == UTIL_FORMAT_LAYOUT_ETC ||
format_desc->layout == UTIL_FORMAT_LAYOUT_S3TC) &&
target == PIPE_TEXTURE_3D)
- return FALSE;
+ return false;
may_emulate_bgra = (vscreen->caps.caps.v2.capability_bits &
VIRGL_CAP_APP_TWEAK_SUPPORT) &&
return TRUE;
if (format_desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS)
- return FALSE;
+ return false;
/*
* Although possible, it is unnatural to render into compressed or YUV
*/
if (format_desc->block.width != 1 ||
format_desc->block.height != 1)
- return FALSE;
+ return false;
if (!virgl_format_check_bitmask(format,
vscreen->caps.caps.v1.render.bitmask,
may_emulate_bgra))
- return FALSE;
+ return false;
}
if (bind & PIPE_BIND_DEPTH_STENCIL) {
if (format_desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS)
- return FALSE;
+ return false;
}
/*
}
if (i == 4)
- return FALSE;
+ return false;
/* no L4A4 */
if (format_desc->nr_channels < 4 && format_desc->channel[i].size == 4)
- return FALSE;
+ return false;
out_lookup:
return virgl_format_check_bitmask(format,
vws->fence_reference(vws, ptr, fence);
}
-static boolean virgl_fence_finish(struct pipe_screen *screen,
- struct pipe_context *ctx,
- struct pipe_fence_handle *fence,
- uint64_t timeout)
+static bool virgl_fence_finish(struct pipe_screen *screen,
+ struct pipe_context *ctx,
+ struct pipe_fence_handle *fence,
+ uint64_t timeout)
{
struct virgl_screen *vscreen = virgl_screen(screen);
struct virgl_winsys *vws = vscreen->vws;
return (struct virgl_screen *)pipe;
}
-boolean
+bool
virgl_has_readback_format(struct pipe_screen *screen, enum virgl_formats fmt);
/* GL_ARB_map_buffer_alignment requires 64 as the minimum alignment value. In
*/
void (*render_condition)( struct pipe_context *pipe,
struct pipe_query *query,
- boolean condition,
+ bool condition,
enum pipe_render_cond_flag mode );
/**
void (*destroy_query)(struct pipe_context *pipe,
struct pipe_query *q);
- boolean (*begin_query)(struct pipe_context *pipe, struct pipe_query *q);
+ bool (*begin_query)(struct pipe_context *pipe, struct pipe_query *q);
bool (*end_query)(struct pipe_context *pipe, struct pipe_query *q);
/**
* \param wait if true, this query will block until the result is ready
* \return TRUE if results are ready, FALSE otherwise
*/
- boolean (*get_query_result)(struct pipe_context *pipe,
- struct pipe_query *q,
- boolean wait,
- union pipe_query_result *result);
+ bool (*get_query_result)(struct pipe_context *pipe,
+ struct pipe_query *q,
+ bool wait,
+ union pipe_query_result *result);
/**
* Get results of a query, storing into resource. Note that this may not
*/
void (*get_query_result_resource)(struct pipe_context *pipe,
struct pipe_query *q,
- boolean wait,
+ bool wait,
enum pipe_query_value_type result_type,
int index,
struct pipe_resource *resource,
* Set whether all current non-driver queries except TIME_ELAPSED are
* active or paused.
*/
- void (*set_active_query_state)(struct pipe_context *pipe, boolean enable);
+ void (*set_active_query_state)(struct pipe_context *pipe, bool enable);
/*@}*/
const struct pipe_scissor_state * );
void (*set_window_rectangles)( struct pipe_context *,
- boolean include,
+ bool include,
unsigned num_rectangles,
const struct pipe_scissor_state * );
* Generate mipmap.
* \return TRUE if mipmap generation succeeds, FALSE otherwise
*/
- boolean (*generate_mipmap)(struct pipe_context *ctx,
- struct pipe_resource *resource,
- enum pipe_format format,
- unsigned base_level,
- unsigned last_level,
- unsigned first_layer,
- unsigned last_layer);
+ bool (*generate_mipmap)(struct pipe_context *ctx,
+ struct pipe_resource *resource,
+ enum pipe_format format,
+ unsigned base_level,
+ unsigned last_level,
+ unsigned first_layer,
+ unsigned last_layer);
/**
* Create a 64-bit texture handle.
struct pipe_query_data_timestamp_disjoint
{
uint64_t frequency;
- boolean disjoint;
+ bool disjoint;
};
/**
/* PIPE_QUERY_SO_OVERFLOW_PREDICATE */
/* PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE */
/* PIPE_QUERY_GPU_FINISHED */
- boolean b;
+ bool b;
/* PIPE_QUERY_OCCLUSION_COUNTER */
/* PIPE_QUERY_TIMESTAMP */
* drawing surface.
* \param bindings bitmask of PIPE_BIND_*
*/
- boolean (*is_format_supported)( struct pipe_screen *,
- enum pipe_format format,
- enum pipe_texture_target target,
- unsigned sample_count,
- unsigned storage_sample_count,
- unsigned bindings );
+ bool (*is_format_supported)( struct pipe_screen *,
+ enum pipe_format format,
+ enum pipe_texture_target target,
+ unsigned sample_count,
+ unsigned storage_sample_count,
+ unsigned bindings );
/**
* Check if the given pipe_format is supported as output for this codec/profile.
* \param profile profile to check, may also be PIPE_VIDEO_PROFILE_UNKNOWN
*/
- boolean (*is_video_format_supported)( struct pipe_screen *,
- enum pipe_format format,
- enum pipe_video_profile profile,
- enum pipe_video_entrypoint entrypoint );
+ bool (*is_video_format_supported)( struct pipe_screen *,
+ enum pipe_format format,
+ enum pipe_video_profile profile,
+ enum pipe_video_entrypoint entrypoint );
/**
* Check if we can actually create the given resource (test the dimension,
* overall size, etc). Used to implement proxy textures.
* \return TRUE if size is OK, FALSE if too large.
*/
- boolean (*can_create_resource)(struct pipe_screen *screen,
- const struct pipe_resource *templat);
+ bool (*can_create_resource)(struct pipe_screen *screen,
+ const struct pipe_resource *templat);
/**
* Create a new texture object, using the given template info.
*
* \param usage A combination of PIPE_HANDLE_USAGE_* flags.
*/
- boolean (*resource_get_handle)(struct pipe_screen *,
- struct pipe_context *context,
- struct pipe_resource *tex,
- struct winsys_handle *handle,
- unsigned usage);
+ bool (*resource_get_handle)(struct pipe_screen *,
+ struct pipe_context *context,
+ struct pipe_resource *tex,
+ struct winsys_handle *handle,
+ unsigned usage);
/**
* Get stride and offset for the given pipe resource without the need to get
*
* \param timeout in nanoseconds (may be PIPE_TIMEOUT_INFINITE).
*/
- boolean (*fence_finish)(struct pipe_screen *screen,
- struct pipe_context *ctx,
- struct pipe_fence_handle *fence,
- uint64_t timeout);
+ bool (*fence_finish)(struct pipe_screen *screen,
+ struct pipe_context *ctx,
+ struct pipe_fence_handle *fence,
+ uint64_t timeout);
/**
* For fences created with PIPE_FLUSH_FENCE_FD (exported fd) or
unsigned mask; /**< bitmask of PIPE_MASK_R/G/B/A/Z/S */
unsigned filter; /**< PIPE_TEX_FILTER_* */
- boolean scissor_enable;
+ bool scissor_enable;
struct pipe_scissor_state scissor;
/* Window rectangles can either be inclusive or exclusive. */
- boolean window_rectangle_include;
+ bool window_rectangle_include;
unsigned num_window_rectangles;
struct pipe_scissor_state window_rectangles[PIPE_MAX_WINDOW_RECTANGLES];
- boolean render_condition_enable; /**< whether the blit should honor the
- current render condition */
- boolean alpha_blend; /* dst.rgb = src.rgb * src.a + dst.rgb * (1 - src.a) */
+ bool render_condition_enable; /**< whether the blit should honor the
+ current render condition */
+ bool alpha_blend; /* dst.rgb = src.rgb * src.a + dst.rgb * (1 - src.a) */
};
/**
#include "util/u_format.h"
#include <stdbool.h>
-static boolean
+static bool
is_format_supported(struct pipe_screen *pscreen,
enum pipe_format format,
enum pipe_texture_target target,