Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
assert(brw->format_supported_as_render_target[format]);
return brw->render_target_format[format];
} else {
assert(brw->format_supported_as_render_target[format]);
return brw->render_target_format[format];
} else {
- return brw_format_for_mesa_format(format);
+ return brw_isl_format_for_mesa_format(format);
!intel_miptree_is_lossless_compressed(brw, intel_tex->mt))
return false;
!intel_miptree_is_lossless_compressed(brw, intel_tex->mt))
return false;
- const uint32_t brw_format = brw_format_for_mesa_format(intel_tex->_Format);
+ const uint32_t brw_format = brw_isl_format_for_mesa_format(intel_tex->_Format);
if (isl_format_supports_ccs_e(&brw->screen->devinfo, brw_format))
return false;
if (isl_format_supports_ccs_e(&brw->screen->devinfo, brw_format))
return false;
* this case. At least on Gen9 this really does seem to cause problems.
*/
if (brw->gen >= 9 &&
* this case. At least on Gen9 this really does seem to cause problems.
*/
if (brw->gen >= 9 &&
- brw_format_for_mesa_format(mt->format) !=
+ brw_isl_format_for_mesa_format(mt->format) !=
brw->render_target_format[mt->format])
return false;
brw->render_target_format[mt->format])
return false;
uint32_t brw_get_surface_tiling_bits(uint32_t tiling);
uint32_t brw_get_surface_num_multisamples(unsigned num_samples);
uint32_t brw_get_surface_tiling_bits(uint32_t tiling);
uint32_t brw_get_surface_num_multisamples(unsigned num_samples);
-uint32_t brw_format_for_mesa_format(mesa_format mesa_format);
+uint32_t brw_isl_format_for_mesa_format(mesa_format mesa_format);
GLuint translate_tex_target(GLenum target);
GLuint translate_tex_target(GLenum target);
#include "brw_defines.h"
uint32_t
#include "brw_defines.h"
uint32_t
-brw_format_for_mesa_format(mesa_format mesa_format)
+brw_isl_format_for_mesa_format(mesa_format mesa_format)
{
/* This table is ordered according to the enum ordering in formats.h. We do
* expect that enum to be extended without our explicit initialization
{
/* This table is ordered according to the enum ordering in formats.h. We do
* expect that enum to be extended without our explicit initialization
uint32_t texture, render;
bool is_integer = _mesa_is_format_integer_color(format);
uint32_t texture, render;
bool is_integer = _mesa_is_format_integer_color(format);
- render = texture = brw_format_for_mesa_format(format);
+ render = texture = brw_isl_format_for_mesa_format(format);
/* The value of ISL_FORMAT_R32G32B32A32_FLOAT is 0, so don't skip
* it.
/* The value of ISL_FORMAT_R32G32B32A32_FLOAT is 0, so don't skip
* it.
return ISL_FORMAT_R32_FLOAT_X8X24_TYPELESS;
case MESA_FORMAT_RGBA_FLOAT32:
return ISL_FORMAT_R32_FLOAT_X8X24_TYPELESS;
case MESA_FORMAT_RGBA_FLOAT32:
- /* The value of this BRW_SURFACEFORMAT is 0, which tricks the
+ /* The value of this ISL surface format is 0, which tricks the
* assertion below.
*/
return ISL_FORMAT_R32G32B32A32_FLOAT;
* assertion below.
*/
return ISL_FORMAT_R32G32B32A32_FLOAT;
WARN_ONCE(true, "Demoting sRGB DXT1 texture to non-sRGB\n");
mesa_format = MESA_FORMAT_RGB_DXT1;
}
WARN_ONCE(true, "Demoting sRGB DXT1 texture to non-sRGB\n");
mesa_format = MESA_FORMAT_RGB_DXT1;
}
- return brw_format_for_mesa_format(mesa_format);
+ return brw_isl_format_for_mesa_format(mesa_format);
case MESA_FORMAT_RGBA_ASTC_4x4:
case MESA_FORMAT_RGBA_ASTC_5x4:
case MESA_FORMAT_RGBA_ASTC_4x4:
case MESA_FORMAT_RGBA_ASTC_5x4:
case MESA_FORMAT_RGBA_ASTC_10x10:
case MESA_FORMAT_RGBA_ASTC_12x10:
case MESA_FORMAT_RGBA_ASTC_12x12: {
case MESA_FORMAT_RGBA_ASTC_10x10:
case MESA_FORMAT_RGBA_ASTC_12x10:
case MESA_FORMAT_RGBA_ASTC_12x12: {
- GLuint brw_fmt = brw_format_for_mesa_format(mesa_format);
+ GLuint brw_fmt = brw_isl_format_for_mesa_format(mesa_format);
/**
* It is possible to process these formats using the LDR Profile
/**
* It is possible to process these formats using the LDR Profile
- assert(brw_format_for_mesa_format(mesa_format) != 0);
- return brw_format_for_mesa_format(mesa_format);
+ assert(brw_isl_format_for_mesa_format(mesa_format) != 0);
+ return brw_isl_format_for_mesa_format(mesa_format);
uint32_t size = tObj->BufferSize;
drm_intel_bo *bo = NULL;
mesa_format format = tObj->_BufferObjectFormat;
uint32_t size = tObj->BufferSize;
drm_intel_bo *bo = NULL;
mesa_format format = tObj->_BufferObjectFormat;
- uint32_t brw_format = brw_format_for_mesa_format(format);
+ uint32_t brw_format = brw_isl_format_for_mesa_format(format);
int texel_size = _mesa_get_format_bytes(format);
if (intel_obj) {
int texel_size = _mesa_get_format_bytes(format);
if (intel_obj) {
get_image_format(struct brw_context *brw, mesa_format format, GLenum access)
{
const struct gen_device_info *devinfo = &brw->screen->devinfo;
get_image_format(struct brw_context *brw, mesa_format format, GLenum access)
{
const struct gen_device_info *devinfo = &brw->screen->devinfo;
- uint32_t hw_format = brw_format_for_mesa_format(format);
+ uint32_t hw_format = brw_isl_format_for_mesa_format(format);
if (access == GL_WRITE_ONLY) {
return hw_format;
} else if (isl_has_matching_typed_storage_image_format(devinfo, hw_format)) {
if (access == GL_WRITE_ONLY) {
return hw_format;
} else if (isl_has_matching_typed_storage_image_format(devinfo, hw_format)) {
if (brw->gen >= 9) {
mesa_format linear_format = _mesa_get_srgb_format_linear(mt->format);
if (brw->gen >= 9) {
mesa_format linear_format = _mesa_get_srgb_format_linear(mt->format);
- const uint32_t brw_format = brw_format_for_mesa_format(linear_format);
+ const uint32_t brw_format = brw_isl_format_for_mesa_format(linear_format);
return isl_format_supports_ccs_e(&brw->screen->devinfo, brw_format);
} else
return true;
return isl_format_supports_ccs_e(&brw->screen->devinfo, brw_format);
} else
return true;