swr_get_name(struct pipe_screen *screen)
{
static char buf[100];
- snprintf(buf, sizeof(buf), "SWR (LLVM %u.%u, %u bits)",
- HAVE_LLVM >> 8, HAVE_LLVM & 0xff,
+ snprintf(buf, sizeof(buf), "SWR (LLVM " MESA_LLVM_VERSION_STRING ", %u bits)",
lp_native_vector_width);
return buf;
}
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;
}
}
case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
case PIPE_CAP_MAX_TEXTURE_UPLOAD_MEMORY_BUDGET:
case PIPE_CAP_IMAGE_LOAD_FORMATTED:
+ case PIPE_CAP_TGSI_ATOMINC_WRAP:
return 0;
case PIPE_CAP_MAX_GS_INVOCATIONS:
return 32;
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)
{