mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 17:30:12 +01:00
mesa: change gl_format to mesa_format
s/\bgl_format\b/mesa_format/g. Use better name for Mesa Formats enum
This commit is contained in:
parent
bc0ed68275
commit
71fe943716
116 changed files with 416 additions and 416 deletions
|
|
@ -81,7 +81,7 @@ const __DRIconfigOptionsExtension gallium_config_options = {
|
|||
static const __DRIconfig **
|
||||
dri_fill_in_modes(struct dri_screen *screen)
|
||||
{
|
||||
static const gl_format mesa_formats[3] = {
|
||||
static const mesa_format mesa_formats[3] = {
|
||||
MESA_FORMAT_ARGB8888,
|
||||
MESA_FORMAT_XRGB8888,
|
||||
MESA_FORMAT_RGB565,
|
||||
|
|
@ -91,7 +91,7 @@ dri_fill_in_modes(struct dri_screen *screen)
|
|||
PIPE_FORMAT_BGRX8888_UNORM,
|
||||
PIPE_FORMAT_B5G6R5_UNORM,
|
||||
};
|
||||
gl_format format;
|
||||
mesa_format format;
|
||||
__DRIconfig **configs = NULL;
|
||||
uint8_t depth_bits_array[5];
|
||||
uint8_t stencil_bits_array[5];
|
||||
|
|
|
|||
|
|
@ -3814,7 +3814,7 @@ _mesa_meta_GenerateMipmap(struct gl_context *ctx, GLenum target,
|
|||
* ReadPixels() and passed to Tex[Sub]Image().
|
||||
*/
|
||||
static GLenum
|
||||
get_temp_image_type(struct gl_context *ctx, gl_format format)
|
||||
get_temp_image_type(struct gl_context *ctx, mesa_format format)
|
||||
{
|
||||
GLenum baseFormat;
|
||||
|
||||
|
|
|
|||
|
|
@ -806,7 +806,7 @@ driUpdateFramebufferSize(struct gl_context *ctx, const __DRIdrawable *dPriv)
|
|||
}
|
||||
|
||||
uint32_t
|
||||
driGLFormatToImageFormat(gl_format format)
|
||||
driGLFormatToImageFormat(mesa_format format)
|
||||
{
|
||||
switch (format) {
|
||||
case MESA_FORMAT_RGB565:
|
||||
|
|
@ -836,7 +836,7 @@ driGLFormatToImageFormat(gl_format format)
|
|||
}
|
||||
}
|
||||
|
||||
gl_format
|
||||
mesa_format
|
||||
driImageFormatToGLFormat(uint32_t image_format)
|
||||
{
|
||||
switch (image_format) {
|
||||
|
|
|
|||
|
|
@ -281,9 +281,9 @@ struct __DRIdrawableRec {
|
|||
};
|
||||
|
||||
extern uint32_t
|
||||
driGLFormatToImageFormat(gl_format format);
|
||||
driGLFormatToImageFormat(mesa_format format);
|
||||
|
||||
extern gl_format
|
||||
extern mesa_format
|
||||
driImageFormatToGLFormat(uint32_t image_format);
|
||||
|
||||
extern void
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ driGetRendererString( char * buffer, const char * hardware_name,
|
|||
* If the function fails and returns \c GL_FALSE, this
|
||||
* value will be unmodified, but some elements in the
|
||||
* linked list may be modified.
|
||||
* \param format Mesa gl_format enum describing the pixel format
|
||||
* \param format Mesa mesa_format enum describing the pixel format
|
||||
* \param depth_bits Array of depth buffer sizes to be exposed.
|
||||
* \param stencil_bits Array of stencil buffer sizes to be exposed.
|
||||
* \param num_depth_stencil_bits Number of entries in both \c depth_bits and
|
||||
|
|
@ -176,7 +176,7 @@ driGetRendererString( char * buffer, const char * hardware_name,
|
|||
* \c format).
|
||||
*/
|
||||
__DRIconfig **
|
||||
driCreateConfigs(gl_format format,
|
||||
driCreateConfigs(mesa_format format,
|
||||
const uint8_t * depth_bits, const uint8_t * stencil_bits,
|
||||
unsigned num_depth_stencil_bits,
|
||||
const GLenum * db_modes, unsigned num_db_modes,
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ struct __DRIconfigRec {
|
|||
};
|
||||
|
||||
extern __DRIconfig **
|
||||
driCreateConfigs(gl_format format,
|
||||
driCreateConfigs(mesa_format format,
|
||||
const uint8_t * depth_bits, const uint8_t * stencil_bits,
|
||||
unsigned num_depth_stencil_bits,
|
||||
const GLenum * db_modes, unsigned num_db_modes,
|
||||
|
|
|
|||
|
|
@ -593,7 +593,7 @@ static bool
|
|||
i830_render_target_supported(struct intel_context *intel,
|
||||
struct gl_renderbuffer *rb)
|
||||
{
|
||||
gl_format format = rb->Format;
|
||||
mesa_format format = rb->Format;
|
||||
|
||||
if (format == MESA_FORMAT_S8_Z24 ||
|
||||
format == MESA_FORMAT_X8_Z24 ||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
|
||||
static GLuint
|
||||
translate_texture_format(gl_format mesa_format, GLenum DepthMode)
|
||||
translate_texture_format(mesa_format mesa_format, GLenum DepthMode)
|
||||
{
|
||||
switch (mesa_format) {
|
||||
case MESA_FORMAT_L8:
|
||||
|
|
|
|||
|
|
@ -560,7 +560,7 @@ static bool
|
|||
i915_render_target_supported(struct intel_context *intel,
|
||||
struct gl_renderbuffer *rb)
|
||||
{
|
||||
gl_format format = rb->Format;
|
||||
mesa_format format = rb->Format;
|
||||
|
||||
if (format == MESA_FORMAT_S8_Z24 ||
|
||||
format == MESA_FORMAT_X8_Z24 ||
|
||||
|
|
|
|||
|
|
@ -120,8 +120,8 @@ intel_miptree_blit(struct intel_context *intel,
|
|||
* consistent with what we want in the callers (glCopyTexSubImage(),
|
||||
* glBlitFramebuffer(), texture validation, etc.).
|
||||
*/
|
||||
gl_format src_format = _mesa_get_srgb_format_linear(src_mt->format);
|
||||
gl_format dst_format = _mesa_get_srgb_format_linear(dst_mt->format);
|
||||
mesa_format src_format = _mesa_get_srgb_format_linear(src_mt->format);
|
||||
mesa_format dst_format = _mesa_get_srgb_format_linear(dst_mt->format);
|
||||
|
||||
/* The blitter doesn't support doing any format conversions. We do also
|
||||
* support blitting ARGB8888 to XRGB8888 (trivial, the values dropped into
|
||||
|
|
|
|||
|
|
@ -303,7 +303,7 @@ intel_nop_alloc_storage(struct gl_context * ctx, struct gl_renderbuffer *rb,
|
|||
* not a user-created renderbuffer.
|
||||
*/
|
||||
struct intel_renderbuffer *
|
||||
intel_create_renderbuffer(gl_format format)
|
||||
intel_create_renderbuffer(mesa_format format)
|
||||
{
|
||||
struct intel_renderbuffer *irb;
|
||||
struct gl_renderbuffer *rb;
|
||||
|
|
@ -338,7 +338,7 @@ intel_create_renderbuffer(gl_format format)
|
|||
* may be called at intel_update_renderbuffers() time.
|
||||
*/
|
||||
struct intel_renderbuffer *
|
||||
intel_create_private_renderbuffer(gl_format format)
|
||||
intel_create_private_renderbuffer(mesa_format format)
|
||||
{
|
||||
struct intel_renderbuffer *irb;
|
||||
|
||||
|
|
@ -682,8 +682,8 @@ intel_blit_framebuffer_with_blitter(struct gl_context *ctx,
|
|||
return mask;
|
||||
}
|
||||
|
||||
gl_format src_format = _mesa_get_srgb_format_linear(src_rb->Format);
|
||||
gl_format dst_format = _mesa_get_srgb_format_linear(dst_rb->Format);
|
||||
mesa_format src_format = _mesa_get_srgb_format_linear(src_rb->Format);
|
||||
mesa_format dst_format = _mesa_get_srgb_format_linear(dst_rb->Format);
|
||||
if (src_format != dst_format) {
|
||||
perf_debug("glBlitFramebuffer(): unsupported blit from %s to %s. "
|
||||
"Falling back to software rendering.\n",
|
||||
|
|
|
|||
|
|
@ -121,22 +121,22 @@ intel_get_renderbuffer(struct gl_framebuffer *fb, gl_buffer_index attIndex)
|
|||
}
|
||||
|
||||
|
||||
static INLINE gl_format
|
||||
static INLINE mesa_format
|
||||
intel_rb_format(const struct intel_renderbuffer *rb)
|
||||
{
|
||||
return rb->Base.Base.Format;
|
||||
}
|
||||
|
||||
extern struct intel_renderbuffer *
|
||||
intel_create_renderbuffer(gl_format format);
|
||||
intel_create_renderbuffer(mesa_format format);
|
||||
|
||||
struct intel_renderbuffer *
|
||||
intel_create_private_renderbuffer(gl_format format);
|
||||
intel_create_private_renderbuffer(mesa_format format);
|
||||
|
||||
struct gl_renderbuffer*
|
||||
intel_create_wrapped_renderbuffer(struct gl_context * ctx,
|
||||
int width, int height,
|
||||
gl_format format);
|
||||
mesa_format format);
|
||||
|
||||
extern void
|
||||
intel_fbo_init(struct intel_context *intel);
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ target_to_target(GLenum target)
|
|||
struct intel_mipmap_tree *
|
||||
intel_miptree_create_layout(struct intel_context *intel,
|
||||
GLenum target,
|
||||
gl_format format,
|
||||
mesa_format format,
|
||||
GLuint first_level,
|
||||
GLuint last_level,
|
||||
GLuint width0,
|
||||
|
|
@ -130,7 +130,7 @@ intel_miptree_create_layout(struct intel_context *intel,
|
|||
*/
|
||||
static uint32_t
|
||||
intel_miptree_choose_tiling(struct intel_context *intel,
|
||||
gl_format format,
|
||||
mesa_format format,
|
||||
uint32_t width0,
|
||||
enum intel_miptree_tiling_mode requested,
|
||||
struct intel_mipmap_tree *mt)
|
||||
|
|
@ -166,7 +166,7 @@ intel_miptree_choose_tiling(struct intel_context *intel,
|
|||
struct intel_mipmap_tree *
|
||||
intel_miptree_create(struct intel_context *intel,
|
||||
GLenum target,
|
||||
gl_format format,
|
||||
mesa_format format,
|
||||
GLuint first_level,
|
||||
GLuint last_level,
|
||||
GLuint width0,
|
||||
|
|
@ -236,7 +236,7 @@ intel_miptree_create(struct intel_context *intel,
|
|||
struct intel_mipmap_tree *
|
||||
intel_miptree_create_for_bo(struct intel_context *intel,
|
||||
drm_intel_bo *bo,
|
||||
gl_format format,
|
||||
mesa_format format,
|
||||
uint32_t offset,
|
||||
uint32_t width,
|
||||
uint32_t height,
|
||||
|
|
@ -295,7 +295,7 @@ intel_miptree_create_for_bo(struct intel_context *intel,
|
|||
struct intel_mipmap_tree*
|
||||
intel_miptree_create_for_dri2_buffer(struct intel_context *intel,
|
||||
unsigned dri_attachment,
|
||||
gl_format format,
|
||||
mesa_format format,
|
||||
struct intel_region *region)
|
||||
{
|
||||
struct intel_mipmap_tree *mt = NULL;
|
||||
|
|
@ -334,7 +334,7 @@ intel_miptree_create_for_dri2_buffer(struct intel_context *intel,
|
|||
struct intel_mipmap_tree*
|
||||
intel_miptree_create_for_image_buffer(struct intel_context *intel,
|
||||
enum __DRIimageBufferMask buffer_type,
|
||||
gl_format format,
|
||||
mesa_format format,
|
||||
uint32_t num_samples,
|
||||
struct intel_region *region)
|
||||
{
|
||||
|
|
@ -359,7 +359,7 @@ intel_miptree_create_for_image_buffer(struct intel_context *intel,
|
|||
|
||||
struct intel_mipmap_tree*
|
||||
intel_miptree_create_for_renderbuffer(struct intel_context *intel,
|
||||
gl_format format,
|
||||
mesa_format format,
|
||||
uint32_t width,
|
||||
uint32_t height)
|
||||
{
|
||||
|
|
@ -449,7 +449,7 @@ intel_miptree_match_image(struct intel_mipmap_tree *mt,
|
|||
*/
|
||||
assert(target_to_target(image->TexObject->Target) == mt->target);
|
||||
|
||||
gl_format mt_format = mt->format;
|
||||
mesa_format mt_format = mt->format;
|
||||
|
||||
if (image->TexFormat != mt_format)
|
||||
return false;
|
||||
|
|
@ -629,7 +629,7 @@ intel_miptree_copy_slice(struct intel_context *intel,
|
|||
int depth)
|
||||
|
||||
{
|
||||
gl_format format = src_mt->format;
|
||||
mesa_format format = src_mt->format;
|
||||
uint32_t width = src_mt->level[level].width;
|
||||
uint32_t height = src_mt->level[level].height;
|
||||
int slice;
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ struct intel_mipmap_tree
|
|||
* This is just the same as the gl_texture_image->TexFormat or
|
||||
* gl_renderbuffer->Format.
|
||||
*/
|
||||
gl_format format;
|
||||
mesa_format format;
|
||||
|
||||
/**
|
||||
* The X offset of each image in the miptree must be aligned to this. See
|
||||
|
|
@ -223,7 +223,7 @@ enum intel_miptree_tiling_mode {
|
|||
|
||||
struct intel_mipmap_tree *intel_miptree_create(struct intel_context *intel,
|
||||
GLenum target,
|
||||
gl_format format,
|
||||
mesa_format format,
|
||||
GLuint first_level,
|
||||
GLuint last_level,
|
||||
GLuint width0,
|
||||
|
|
@ -235,7 +235,7 @@ struct intel_mipmap_tree *intel_miptree_create(struct intel_context *intel,
|
|||
struct intel_mipmap_tree *
|
||||
intel_miptree_create_layout(struct intel_context *intel,
|
||||
GLenum target,
|
||||
gl_format format,
|
||||
mesa_format format,
|
||||
GLuint first_level,
|
||||
GLuint last_level,
|
||||
GLuint width0,
|
||||
|
|
@ -246,7 +246,7 @@ intel_miptree_create_layout(struct intel_context *intel,
|
|||
struct intel_mipmap_tree *
|
||||
intel_miptree_create_for_bo(struct intel_context *intel,
|
||||
drm_intel_bo *bo,
|
||||
gl_format format,
|
||||
mesa_format format,
|
||||
uint32_t offset,
|
||||
uint32_t width,
|
||||
uint32_t height,
|
||||
|
|
@ -256,13 +256,13 @@ intel_miptree_create_for_bo(struct intel_context *intel,
|
|||
struct intel_mipmap_tree*
|
||||
intel_miptree_create_for_dri2_buffer(struct intel_context *intel,
|
||||
unsigned dri_attachment,
|
||||
gl_format format,
|
||||
mesa_format format,
|
||||
struct intel_region *region);
|
||||
|
||||
struct intel_mipmap_tree*
|
||||
intel_miptree_create_for_image_buffer(struct intel_context *intel,
|
||||
enum __DRIimageBufferMask buffer_type,
|
||||
gl_format format,
|
||||
mesa_format format,
|
||||
uint32_t num_samples,
|
||||
struct intel_region *region);
|
||||
|
||||
|
|
@ -275,7 +275,7 @@ intel_miptree_create_for_image_buffer(struct intel_context *intel,
|
|||
*/
|
||||
struct intel_mipmap_tree*
|
||||
intel_miptree_create_for_renderbuffer(struct intel_context *intel,
|
||||
gl_format format,
|
||||
mesa_format format,
|
||||
uint32_t width,
|
||||
uint32_t height);
|
||||
|
||||
|
|
|
|||
|
|
@ -844,7 +844,7 @@ intelCreateBuffer(__DRIscreen * driScrnPriv,
|
|||
const struct gl_config * mesaVis, GLboolean isPixmap)
|
||||
{
|
||||
struct intel_renderbuffer *rb;
|
||||
gl_format rgbFormat;
|
||||
mesa_format rgbFormat;
|
||||
struct gl_framebuffer *fb;
|
||||
|
||||
if (isPixmap)
|
||||
|
|
@ -1042,7 +1042,7 @@ intel_detect_swizzling(struct intel_screen *screen)
|
|||
static __DRIconfig**
|
||||
intel_screen_make_configs(__DRIscreen *dri_screen)
|
||||
{
|
||||
static const gl_format formats[] = {
|
||||
static const mesa_format formats[] = {
|
||||
MESA_FORMAT_RGB565,
|
||||
MESA_FORMAT_ARGB8888
|
||||
};
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ intel_set_texture_image_region(struct gl_context *ctx,
|
|||
struct intel_region *region,
|
||||
GLenum target,
|
||||
GLenum internalFormat,
|
||||
gl_format format,
|
||||
mesa_format format,
|
||||
uint32_t offset,
|
||||
GLuint width,
|
||||
GLuint height,
|
||||
|
|
@ -287,7 +287,7 @@ intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
|
|||
struct gl_texture_object *texObj;
|
||||
struct gl_texture_image *texImage;
|
||||
int level = 0, internalFormat = 0;
|
||||
gl_format texFormat = MESA_FORMAT_NONE;
|
||||
mesa_format texFormat = MESA_FORMAT_NONE;
|
||||
|
||||
texObj = _mesa_get_current_tex_object(ctx, target);
|
||||
intelObj = intel_texture_object(texObj);
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
static unsigned int
|
||||
intel_horizontal_texture_alignment_unit(struct intel_context *intel,
|
||||
gl_format format)
|
||||
mesa_format format)
|
||||
{
|
||||
/**
|
||||
* From the "Alignment Unit Size" section of various specs, namely:
|
||||
|
|
@ -79,7 +79,7 @@ intel_horizontal_texture_alignment_unit(struct intel_context *intel,
|
|||
|
||||
static unsigned int
|
||||
intel_vertical_texture_alignment_unit(struct intel_context *intel,
|
||||
gl_format format)
|
||||
mesa_format format)
|
||||
{
|
||||
/**
|
||||
* From the "Alignment Unit Size" section of various specs, namely:
|
||||
|
|
@ -114,7 +114,7 @@ intel_vertical_texture_alignment_unit(struct intel_context *intel,
|
|||
|
||||
void
|
||||
intel_get_texture_alignment_unit(struct intel_context *intel,
|
||||
gl_format format,
|
||||
mesa_format format,
|
||||
unsigned int *w, unsigned int *h)
|
||||
{
|
||||
*w = intel_horizontal_texture_alignment_unit(intel, format);
|
||||
|
|
|
|||
|
|
@ -36,5 +36,5 @@ extern void i945_miptree_layout_2d(struct intel_mipmap_tree *mt);
|
|||
|
||||
void
|
||||
intel_get_texture_alignment_unit(struct intel_context *intel,
|
||||
gl_format format,
|
||||
mesa_format format,
|
||||
unsigned int *w, unsigned int *h);
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ brw_blorp_surface_info::set(struct brw_context *brw,
|
|||
this->brw_surfaceformat = BRW_SURFACEFORMAT_R16_UNORM;
|
||||
break;
|
||||
default: {
|
||||
gl_format linear_format = _mesa_get_srgb_format_linear(mt->format);
|
||||
mesa_format linear_format = _mesa_get_srgb_format_linear(mt->format);
|
||||
if (is_render_target) {
|
||||
assert(brw->format_supported_as_render_target[linear_format]);
|
||||
this->brw_surfaceformat = brw->render_target_format[linear_format];
|
||||
|
|
|
|||
|
|
@ -197,10 +197,10 @@ do_blorp_blit(struct brw_context *brw, GLbitfield buffer_bit,
|
|||
}
|
||||
|
||||
static bool
|
||||
color_formats_match(gl_format src_format, gl_format dst_format)
|
||||
color_formats_match(mesa_format src_format, mesa_format dst_format)
|
||||
{
|
||||
gl_format linear_src_format = _mesa_get_srgb_format_linear(src_format);
|
||||
gl_format linear_dst_format = _mesa_get_srgb_format_linear(dst_format);
|
||||
mesa_format linear_src_format = _mesa_get_srgb_format_linear(src_format);
|
||||
mesa_format linear_dst_format = _mesa_get_srgb_format_linear(dst_format);
|
||||
|
||||
/* Normally, we require the formats to be equal. However, we also support
|
||||
* blitting from ARGB to XRGB (discarding alpha), and from XRGB to ARGB
|
||||
|
|
@ -222,8 +222,8 @@ formats_match(GLbitfield buffer_bit, struct intel_renderbuffer *src_irb,
|
|||
* example MESA_FORMAT_X8_Z24 and MESA_FORMAT_S8_Z24), and we can blit
|
||||
* between those formats.
|
||||
*/
|
||||
gl_format src_format = find_miptree(buffer_bit, src_irb)->format;
|
||||
gl_format dst_format = find_miptree(buffer_bit, dst_irb)->format;
|
||||
mesa_format src_format = find_miptree(buffer_bit, src_irb)->format;
|
||||
mesa_format dst_format = find_miptree(buffer_bit, dst_irb)->format;
|
||||
|
||||
return color_formats_match(src_format, dst_format);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ brw_blorp_const_color_program::~brw_blorp_const_color_program()
|
|||
*/
|
||||
static bool
|
||||
is_color_fast_clear_compatible(struct brw_context *brw,
|
||||
gl_format format,
|
||||
mesa_format format,
|
||||
const union gl_color_union *color)
|
||||
{
|
||||
if (_mesa_is_format_integer_color(format))
|
||||
|
|
@ -193,7 +193,7 @@ brw_blorp_clear_params::brw_blorp_clear_params(struct brw_context *brw,
|
|||
dst.set(brw, irb->mt, irb->mt_level, layer, true);
|
||||
|
||||
/* Override the surface format according to the context's sRGB rules. */
|
||||
gl_format format = _mesa_get_render_format(ctx, irb->mt->format);
|
||||
mesa_format format = _mesa_get_render_format(ctx, irb->mt->format);
|
||||
dst.brw_surfaceformat = brw->render_target_format[format];
|
||||
|
||||
x0 = fb->_Xmin;
|
||||
|
|
|
|||
|
|
@ -1644,7 +1644,7 @@ void brw_upload_abo_surfaces(struct brw_context *brw,
|
|||
struct brw_stage_prog_data *prog_data);
|
||||
|
||||
/* brw_surface_formats.c */
|
||||
bool brw_is_hiz_depth_format(struct brw_context *ctx, gl_format format);
|
||||
bool brw_is_hiz_depth_format(struct brw_context *ctx, mesa_format format);
|
||||
bool brw_render_target_supported(struct brw_context *brw,
|
||||
struct gl_renderbuffer *rb);
|
||||
|
||||
|
|
|
|||
|
|
@ -188,12 +188,12 @@ void gen4_init_vtable_surface_functions(struct brw_context *brw);
|
|||
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(gl_format mesa_format);
|
||||
uint32_t brw_format_for_mesa_format(mesa_format mesa_format);
|
||||
|
||||
GLuint translate_tex_target(GLenum target);
|
||||
|
||||
GLuint translate_tex_format(struct brw_context *brw,
|
||||
gl_format mesa_format,
|
||||
mesa_format mesa_format,
|
||||
GLenum srgb_decode);
|
||||
|
||||
int brw_get_texture_swizzle(const struct gl_context *ctx,
|
||||
|
|
|
|||
|
|
@ -310,7 +310,7 @@ const struct surface_format_info surface_formats[] = {
|
|||
#undef Y
|
||||
|
||||
uint32_t
|
||||
brw_format_for_mesa_format(gl_format mesa_format)
|
||||
brw_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
|
||||
|
|
@ -530,7 +530,7 @@ brw_init_surface_formats(struct brw_context *brw)
|
|||
{
|
||||
struct gl_context *ctx = &brw->ctx;
|
||||
int gen;
|
||||
gl_format format;
|
||||
mesa_format format;
|
||||
|
||||
memset(&ctx->TextureFormatSupported, 0, sizeof(ctx->TextureFormatSupported));
|
||||
|
||||
|
|
@ -654,7 +654,7 @@ bool
|
|||
brw_render_target_supported(struct brw_context *brw,
|
||||
struct gl_renderbuffer *rb)
|
||||
{
|
||||
gl_format format = rb->Format;
|
||||
mesa_format format = rb->Format;
|
||||
|
||||
/* Many integer formats are promoted to RGBA (like XRGB8888 is), which means
|
||||
* we would consider them renderable even though we don't have surface
|
||||
|
|
@ -685,7 +685,7 @@ brw_render_target_supported(struct brw_context *brw,
|
|||
|
||||
GLuint
|
||||
translate_tex_format(struct brw_context *brw,
|
||||
gl_format mesa_format,
|
||||
mesa_format mesa_format,
|
||||
GLenum srgb_decode)
|
||||
{
|
||||
struct gl_context *ctx = &brw->ctx;
|
||||
|
|
@ -732,7 +732,7 @@ translate_tex_format(struct brw_context *brw,
|
|||
|
||||
/** Can HiZ be enabled on a depthbuffer of the given format? */
|
||||
bool
|
||||
brw_is_hiz_depth_format(struct brw_context *brw, gl_format format)
|
||||
brw_is_hiz_depth_format(struct brw_context *brw, mesa_format format)
|
||||
{
|
||||
if (!brw->has_hiz)
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
static unsigned int
|
||||
intel_horizontal_texture_alignment_unit(struct brw_context *brw,
|
||||
gl_format format)
|
||||
mesa_format format)
|
||||
{
|
||||
/**
|
||||
* From the "Alignment Unit Size" section of various specs, namely:
|
||||
|
|
@ -86,7 +86,7 @@ intel_horizontal_texture_alignment_unit(struct brw_context *brw,
|
|||
|
||||
static unsigned int
|
||||
intel_vertical_texture_alignment_unit(struct brw_context *brw,
|
||||
gl_format format, bool multisampled)
|
||||
mesa_format format, bool multisampled)
|
||||
{
|
||||
/**
|
||||
* From the "Alignment Unit Size" section of various specs, namely:
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ brw_update_buffer_texture_surface(struct gl_context *ctx,
|
|||
intel_buffer_object(tObj->BufferObject);
|
||||
uint32_t size = tObj->BufferSize;
|
||||
drm_intel_bo *bo = NULL;
|
||||
gl_format format = tObj->_BufferObjectFormat;
|
||||
mesa_format format = tObj->_BufferObjectFormat;
|
||||
uint32_t brw_format = brw_format_for_mesa_format(format);
|
||||
int texel_size = _mesa_get_format_bytes(format);
|
||||
|
||||
|
|
@ -596,7 +596,7 @@ brw_update_renderbuffer_surface(struct brw_context *brw,
|
|||
uint32_t tile_x, tile_y;
|
||||
uint32_t format = 0;
|
||||
/* _NEW_BUFFERS */
|
||||
gl_format rb_format = _mesa_get_render_format(ctx, intel_rb_format(irb));
|
||||
mesa_format rb_format = _mesa_get_render_format(ctx, intel_rb_format(irb));
|
||||
uint32_t surf_index =
|
||||
brw->wm.prog_data->binding_table.render_target_start + unit;
|
||||
|
||||
|
|
|
|||
|
|
@ -444,7 +444,7 @@ gen7_update_renderbuffer_surface(struct brw_context *brw,
|
|||
struct intel_region *region = irb->mt->region;
|
||||
uint32_t format;
|
||||
/* _NEW_BUFFERS */
|
||||
gl_format rb_format = _mesa_get_render_format(ctx, intel_rb_format(irb));
|
||||
mesa_format rb_format = _mesa_get_render_format(ctx, intel_rb_format(irb));
|
||||
uint32_t surftype;
|
||||
bool is_array = false;
|
||||
int depth = MAX2(rb->Depth, 1);
|
||||
|
|
|
|||
|
|
@ -162,8 +162,8 @@ intel_miptree_blit(struct brw_context *brw,
|
|||
* consistent with what we want in the callers (glCopyTexSubImage(),
|
||||
* glBlitFramebuffer(), texture validation, etc.).
|
||||
*/
|
||||
gl_format src_format = _mesa_get_srgb_format_linear(src_mt->format);
|
||||
gl_format dst_format = _mesa_get_srgb_format_linear(dst_mt->format);
|
||||
mesa_format src_format = _mesa_get_srgb_format_linear(src_mt->format);
|
||||
mesa_format dst_format = _mesa_get_srgb_format_linear(dst_mt->format);
|
||||
|
||||
/* The blitter doesn't support doing any format conversions. We do also
|
||||
* support blitting ARGB8888 to XRGB8888 (trivial, the values dropped into
|
||||
|
|
|
|||
|
|
@ -335,7 +335,7 @@ intel_nop_alloc_storage(struct gl_context * ctx, struct gl_renderbuffer *rb,
|
|||
* \param num_samples must be quantized.
|
||||
*/
|
||||
struct intel_renderbuffer *
|
||||
intel_create_renderbuffer(gl_format format, unsigned num_samples)
|
||||
intel_create_renderbuffer(mesa_format format, unsigned num_samples)
|
||||
{
|
||||
struct intel_renderbuffer *irb;
|
||||
struct gl_renderbuffer *rb;
|
||||
|
|
@ -373,7 +373,7 @@ intel_create_renderbuffer(gl_format format, unsigned num_samples)
|
|||
* \param num_samples must be quantized.
|
||||
*/
|
||||
struct intel_renderbuffer *
|
||||
intel_create_private_renderbuffer(gl_format format, unsigned num_samples)
|
||||
intel_create_private_renderbuffer(mesa_format format, unsigned num_samples)
|
||||
{
|
||||
struct intel_renderbuffer *irb;
|
||||
|
||||
|
|
@ -739,8 +739,8 @@ intel_blit_framebuffer_with_blitter(struct gl_context *ctx,
|
|||
return mask;
|
||||
}
|
||||
|
||||
gl_format src_format = _mesa_get_srgb_format_linear(src_rb->Format);
|
||||
gl_format dst_format = _mesa_get_srgb_format_linear(dst_rb->Format);
|
||||
mesa_format src_format = _mesa_get_srgb_format_linear(src_rb->Format);
|
||||
mesa_format dst_format = _mesa_get_srgb_format_linear(dst_rb->Format);
|
||||
if (src_format != dst_format) {
|
||||
perf_debug("glBlitFramebuffer(): unsupported blit from %s to %s. "
|
||||
"Falling back to software rendering.\n",
|
||||
|
|
|
|||
|
|
@ -125,22 +125,22 @@ intel_get_renderbuffer(struct gl_framebuffer *fb, gl_buffer_index attIndex)
|
|||
}
|
||||
|
||||
|
||||
static inline gl_format
|
||||
static inline mesa_format
|
||||
intel_rb_format(const struct intel_renderbuffer *rb)
|
||||
{
|
||||
return rb->Base.Base.Format;
|
||||
}
|
||||
|
||||
extern struct intel_renderbuffer *
|
||||
intel_create_renderbuffer(gl_format format, unsigned num_samples);
|
||||
intel_create_renderbuffer(mesa_format format, unsigned num_samples);
|
||||
|
||||
struct intel_renderbuffer *
|
||||
intel_create_private_renderbuffer(gl_format format, unsigned num_samples);
|
||||
intel_create_private_renderbuffer(mesa_format format, unsigned num_samples);
|
||||
|
||||
struct gl_renderbuffer*
|
||||
intel_create_wrapped_renderbuffer(struct gl_context * ctx,
|
||||
int width, int height,
|
||||
gl_format format);
|
||||
mesa_format format);
|
||||
|
||||
extern void
|
||||
intel_fbo_init(struct brw_context *brw);
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ target_to_target(GLenum target)
|
|||
* created, based on the chip generation and the surface type.
|
||||
*/
|
||||
static enum intel_msaa_layout
|
||||
compute_msaa_layout(struct brw_context *brw, gl_format format, GLenum target)
|
||||
compute_msaa_layout(struct brw_context *brw, mesa_format format, GLenum target)
|
||||
{
|
||||
/* Prior to Gen7, all MSAA surfaces used IMS layout. */
|
||||
if (brw->gen < 7)
|
||||
|
|
@ -225,7 +225,7 @@ intel_is_non_msrt_mcs_buffer_supported(struct brw_context *brw,
|
|||
struct intel_mipmap_tree *
|
||||
intel_miptree_create_layout(struct brw_context *brw,
|
||||
GLenum target,
|
||||
gl_format format,
|
||||
mesa_format format,
|
||||
GLuint first_level,
|
||||
GLuint last_level,
|
||||
GLuint width0,
|
||||
|
|
@ -391,7 +391,7 @@ intel_miptree_create_layout(struct brw_context *brw,
|
|||
*/
|
||||
static uint32_t
|
||||
intel_miptree_choose_tiling(struct brw_context *brw,
|
||||
gl_format format,
|
||||
mesa_format format,
|
||||
uint32_t width0,
|
||||
uint32_t num_samples,
|
||||
enum intel_miptree_tiling_mode requested,
|
||||
|
|
@ -486,7 +486,7 @@ intel_miptree_choose_tiling(struct brw_context *brw,
|
|||
struct intel_mipmap_tree *
|
||||
intel_miptree_create(struct brw_context *brw,
|
||||
GLenum target,
|
||||
gl_format format,
|
||||
mesa_format format,
|
||||
GLuint first_level,
|
||||
GLuint last_level,
|
||||
GLuint width0,
|
||||
|
|
@ -497,8 +497,8 @@ intel_miptree_create(struct brw_context *brw,
|
|||
enum intel_miptree_tiling_mode requested_tiling)
|
||||
{
|
||||
struct intel_mipmap_tree *mt;
|
||||
gl_format tex_format = format;
|
||||
gl_format etc_format = MESA_FORMAT_NONE;
|
||||
mesa_format tex_format = format;
|
||||
mesa_format etc_format = MESA_FORMAT_NONE;
|
||||
GLuint total_width, total_height;
|
||||
|
||||
if (brw->gen < 8 && !brw->is_baytrail) {
|
||||
|
|
@ -618,7 +618,7 @@ intel_miptree_create(struct brw_context *brw,
|
|||
struct intel_mipmap_tree *
|
||||
intel_miptree_create_for_bo(struct brw_context *brw,
|
||||
drm_intel_bo *bo,
|
||||
gl_format format,
|
||||
mesa_format format,
|
||||
uint32_t offset,
|
||||
uint32_t width,
|
||||
uint32_t height,
|
||||
|
|
@ -677,7 +677,7 @@ intel_miptree_create_for_bo(struct brw_context *brw,
|
|||
struct intel_mipmap_tree*
|
||||
intel_miptree_create_for_dri2_buffer(struct brw_context *brw,
|
||||
unsigned dri_attachment,
|
||||
gl_format format,
|
||||
mesa_format format,
|
||||
uint32_t num_samples,
|
||||
struct intel_region *region)
|
||||
{
|
||||
|
|
@ -748,7 +748,7 @@ intel_miptree_create_for_dri2_buffer(struct brw_context *brw,
|
|||
struct intel_mipmap_tree*
|
||||
intel_miptree_create_for_image_buffer(struct brw_context *intel,
|
||||
enum __DRIimageBufferMask buffer_type,
|
||||
gl_format format,
|
||||
mesa_format format,
|
||||
uint32_t num_samples,
|
||||
struct intel_region *region)
|
||||
{
|
||||
|
|
@ -805,7 +805,7 @@ intel_miptree_create_for_image_buffer(struct brw_context *intel,
|
|||
|
||||
struct intel_mipmap_tree*
|
||||
intel_miptree_create_for_renderbuffer(struct brw_context *brw,
|
||||
gl_format format,
|
||||
mesa_format format,
|
||||
uint32_t width,
|
||||
uint32_t height,
|
||||
uint32_t num_samples)
|
||||
|
|
@ -917,7 +917,7 @@ intel_miptree_match_image(struct intel_mipmap_tree *mt,
|
|||
*/
|
||||
assert(target_to_target(image->TexObject->Target) == mt->target);
|
||||
|
||||
gl_format mt_format = mt->format;
|
||||
mesa_format mt_format = mt->format;
|
||||
if (mt->format == MESA_FORMAT_X8_Z24 && mt->stencil_mt)
|
||||
mt_format = MESA_FORMAT_S8_Z24;
|
||||
if (mt->format == MESA_FORMAT_Z32_FLOAT && mt->stencil_mt)
|
||||
|
|
@ -1118,7 +1118,7 @@ intel_miptree_copy_slice(struct brw_context *brw,
|
|||
int depth)
|
||||
|
||||
{
|
||||
gl_format format = src_mt->format;
|
||||
mesa_format format = src_mt->format;
|
||||
uint32_t width = src_mt->level[level].width;
|
||||
uint32_t height = src_mt->level[level].height;
|
||||
int slice;
|
||||
|
|
@ -1215,7 +1215,7 @@ intel_miptree_alloc_mcs(struct brw_context *brw,
|
|||
* accessing this miptree using MCS-specific hardware mechanisms, which
|
||||
* infer the correct format based on num_samples.
|
||||
*/
|
||||
gl_format format;
|
||||
mesa_format format;
|
||||
switch (num_samples) {
|
||||
case 4:
|
||||
/* 8 bits/pixel are required for MCS data when using 4x MSAA (2 bits for
|
||||
|
|
@ -1284,7 +1284,7 @@ intel_miptree_alloc_non_msrt_mcs(struct brw_context *brw,
|
|||
* we'll need to scale the height down by the block height and then a
|
||||
* further factor of 8.
|
||||
*/
|
||||
const gl_format format = MESA_FORMAT_R_UINT32;
|
||||
const mesa_format format = MESA_FORMAT_R_UINT32;
|
||||
unsigned block_width_px;
|
||||
unsigned block_height;
|
||||
intel_get_non_msrt_mcs_alignment(brw, mt, &block_width_px, &block_height);
|
||||
|
|
|
|||
|
|
@ -285,10 +285,10 @@ struct intel_mipmap_tree
|
|||
* For ETC1/ETC2 textures, this is one of the uncompressed mesa texture
|
||||
* formats if the hardware lacks support for ETC1/ETC2. See @ref wraps_etc.
|
||||
*/
|
||||
gl_format format;
|
||||
mesa_format format;
|
||||
|
||||
/** This variable stores the value of ETC compressed texture format */
|
||||
gl_format etc_format;
|
||||
mesa_format etc_format;
|
||||
|
||||
/**
|
||||
* The X offset of each image in the miptree must be aligned to this.
|
||||
|
|
@ -497,7 +497,7 @@ intel_miptree_alloc_non_msrt_mcs(struct brw_context *brw,
|
|||
|
||||
struct intel_mipmap_tree *intel_miptree_create(struct brw_context *brw,
|
||||
GLenum target,
|
||||
gl_format format,
|
||||
mesa_format format,
|
||||
GLuint first_level,
|
||||
GLuint last_level,
|
||||
GLuint width0,
|
||||
|
|
@ -510,7 +510,7 @@ struct intel_mipmap_tree *intel_miptree_create(struct brw_context *brw,
|
|||
struct intel_mipmap_tree *
|
||||
intel_miptree_create_layout(struct brw_context *brw,
|
||||
GLenum target,
|
||||
gl_format format,
|
||||
mesa_format format,
|
||||
GLuint first_level,
|
||||
GLuint last_level,
|
||||
GLuint width0,
|
||||
|
|
@ -522,7 +522,7 @@ intel_miptree_create_layout(struct brw_context *brw,
|
|||
struct intel_mipmap_tree *
|
||||
intel_miptree_create_for_bo(struct brw_context *brw,
|
||||
drm_intel_bo *bo,
|
||||
gl_format format,
|
||||
mesa_format format,
|
||||
uint32_t offset,
|
||||
uint32_t width,
|
||||
uint32_t height,
|
||||
|
|
@ -532,14 +532,14 @@ intel_miptree_create_for_bo(struct brw_context *brw,
|
|||
struct intel_mipmap_tree*
|
||||
intel_miptree_create_for_dri2_buffer(struct brw_context *brw,
|
||||
unsigned dri_attachment,
|
||||
gl_format format,
|
||||
mesa_format format,
|
||||
uint32_t num_samples,
|
||||
struct intel_region *region);
|
||||
|
||||
struct intel_mipmap_tree*
|
||||
intel_miptree_create_for_image_buffer(struct brw_context *intel,
|
||||
enum __DRIimageBufferMask buffer_type,
|
||||
gl_format format,
|
||||
mesa_format format,
|
||||
uint32_t num_samples,
|
||||
struct intel_region *region);
|
||||
|
||||
|
|
@ -552,7 +552,7 @@ intel_miptree_create_for_image_buffer(struct brw_context *intel,
|
|||
*/
|
||||
struct intel_mipmap_tree*
|
||||
intel_miptree_create_for_renderbuffer(struct brw_context *brw,
|
||||
gl_format format,
|
||||
mesa_format format,
|
||||
uint32_t width,
|
||||
uint32_t height,
|
||||
uint32_t num_samples);
|
||||
|
|
|
|||
|
|
@ -962,7 +962,7 @@ intelCreateBuffer(__DRIscreen * driScrnPriv,
|
|||
{
|
||||
struct intel_renderbuffer *rb;
|
||||
struct intel_screen *screen = (struct intel_screen*) driScrnPriv->driverPrivate;
|
||||
gl_format rgbFormat;
|
||||
mesa_format rgbFormat;
|
||||
unsigned num_samples = intel_quantize_num_samples(screen, mesaVis->samples);
|
||||
struct gl_framebuffer *fb;
|
||||
|
||||
|
|
@ -1124,7 +1124,7 @@ intel_supported_msaa_modes(const struct intel_screen *screen)
|
|||
static __DRIconfig**
|
||||
intel_screen_make_configs(__DRIscreen *dri_screen)
|
||||
{
|
||||
static const gl_format formats[] = {
|
||||
static const mesa_format formats[] = {
|
||||
MESA_FORMAT_RGB565,
|
||||
MESA_FORMAT_ARGB8888
|
||||
};
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ intel_set_texture_image_region(struct gl_context *ctx,
|
|||
struct intel_region *region,
|
||||
GLenum target,
|
||||
GLenum internalFormat,
|
||||
gl_format format,
|
||||
mesa_format format,
|
||||
uint32_t offset,
|
||||
GLuint width,
|
||||
GLuint height,
|
||||
|
|
@ -278,7 +278,7 @@ intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
|
|||
struct gl_texture_object *texObj;
|
||||
struct gl_texture_image *texImage;
|
||||
int level = 0, internalFormat = 0;
|
||||
gl_format texFormat = MESA_FORMAT_NONE;
|
||||
mesa_format texFormat = MESA_FORMAT_NONE;
|
||||
|
||||
texObj = _mesa_get_current_tex_object(ctx, target);
|
||||
intelObj = intel_texture_object(texObj);
|
||||
|
|
|
|||
|
|
@ -628,7 +628,7 @@ intel_texsubimage_tiled_memcpy(struct gl_context * ctx,
|
|||
* the function.
|
||||
*/
|
||||
DBG("%s: level=%d offset=(%d,%d) (w,h)=(%d,%d) format=0x%x type=0x%x "
|
||||
"gl_format=0x%x tiling=%d "
|
||||
"mesa_format=0x%x tiling=%d "
|
||||
"packing=(alignment=%d row_length=%d skip_pixels=%d skip_rows=%d) "
|
||||
"for_glTexImage=%d\n",
|
||||
__FUNCTION__, texImage->Level, xoffset, yoffset, width, height,
|
||||
|
|
|
|||
|
|
@ -269,7 +269,7 @@ nouveau_finish_render_texture(struct gl_context *ctx,
|
|||
}
|
||||
|
||||
static int
|
||||
validate_format_bpp(gl_format format)
|
||||
validate_format_bpp(mesa_format format)
|
||||
{
|
||||
switch (format) {
|
||||
case MESA_FORMAT_XRGB8888:
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ nouveau_get_configs(void)
|
|||
const uint8_t stencil_bits[] = { 0, 0, 0, 8 };
|
||||
const uint8_t msaa_samples[] = { 0 };
|
||||
|
||||
static const gl_format formats[3] = {
|
||||
static const mesa_format formats[3] = {
|
||||
MESA_FORMAT_RGB565,
|
||||
MESA_FORMAT_ARGB8888,
|
||||
MESA_FORMAT_XRGB8888,
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ struct nouveau_surface {
|
|||
|
||||
enum nouveau_surface_layout layout;
|
||||
|
||||
gl_format format;
|
||||
mesa_format format;
|
||||
unsigned cpp, pitch;
|
||||
|
||||
unsigned width, height;
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ nouveau_unmap_texture_image(struct gl_context *ctx, struct gl_texture_image *ti,
|
|||
}
|
||||
}
|
||||
|
||||
static gl_format
|
||||
static mesa_format
|
||||
nouveau_choose_tex_format(struct gl_context *ctx, GLenum target,
|
||||
GLint internalFormat,
|
||||
GLenum srcFormat, GLenum srcType)
|
||||
|
|
@ -581,7 +581,7 @@ nouveau_bind_texture(struct gl_context *ctx, GLenum target,
|
|||
context_dirty_i(ctx, TEX_ENV, ctx->Texture.CurrentUnit);
|
||||
}
|
||||
|
||||
static gl_format
|
||||
static mesa_format
|
||||
get_texbuffer_format(struct gl_renderbuffer *rb, GLint format)
|
||||
{
|
||||
struct nouveau_surface *s = &to_nouveau_renderbuffer(rb)->surface;
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
#include "main/colormac.h"
|
||||
|
||||
static inline unsigned
|
||||
pack_rgba_i(gl_format f, uint8_t c[])
|
||||
pack_rgba_i(mesa_format f, uint8_t c[])
|
||||
{
|
||||
switch (f) {
|
||||
case MESA_FORMAT_ARGB8888:
|
||||
|
|
@ -54,7 +54,7 @@ pack_rgba_i(gl_format f, uint8_t c[])
|
|||
}
|
||||
|
||||
static inline unsigned
|
||||
pack_zs_i(gl_format f, uint32_t z, uint8_t s)
|
||||
pack_zs_i(mesa_format f, uint32_t z, uint8_t s)
|
||||
{
|
||||
switch (f) {
|
||||
case MESA_FORMAT_Z24_S8:
|
||||
|
|
@ -69,7 +69,7 @@ pack_zs_i(gl_format f, uint32_t z, uint8_t s)
|
|||
}
|
||||
|
||||
static inline unsigned
|
||||
pack_rgba_f(gl_format f, float c[])
|
||||
pack_rgba_f(mesa_format f, float c[])
|
||||
{
|
||||
return pack_rgba_i(f, (uint8_t []) {
|
||||
FLOAT_TO_UBYTE(c[RCOMP]),
|
||||
|
|
@ -79,7 +79,7 @@ pack_rgba_f(gl_format f, float c[])
|
|||
}
|
||||
|
||||
static inline unsigned
|
||||
pack_rgba_clamp_f(gl_format f, float c[])
|
||||
pack_rgba_clamp_f(mesa_format f, float c[])
|
||||
{
|
||||
GLubyte bytes[4];
|
||||
_mesa_unclamped_float_rgba_to_ubyte(bytes, c);
|
||||
|
|
@ -87,7 +87,7 @@ pack_rgba_clamp_f(gl_format f, float c[])
|
|||
}
|
||||
|
||||
static inline unsigned
|
||||
pack_zs_f(gl_format f, float z, uint8_t s)
|
||||
pack_zs_f(mesa_format f, float z, uint8_t s)
|
||||
{
|
||||
return pack_zs_i(f, FLOAT_TO_UINT(z), s);
|
||||
}
|
||||
|
|
@ -208,7 +208,7 @@ get_texgen_coeff(struct gl_texgen *c)
|
|||
}
|
||||
|
||||
static inline unsigned
|
||||
get_format_blocksx(gl_format format,
|
||||
get_format_blocksx(mesa_format format,
|
||||
unsigned x)
|
||||
{
|
||||
GLuint blockwidth;
|
||||
|
|
@ -218,7 +218,7 @@ get_format_blocksx(gl_format format,
|
|||
}
|
||||
|
||||
static inline unsigned
|
||||
get_format_blocksy(gl_format format,
|
||||
get_format_blocksy(mesa_format format,
|
||||
unsigned y)
|
||||
{
|
||||
GLuint blockwidth;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
#include "nv04_driver.h"
|
||||
|
||||
static inline unsigned
|
||||
get_rt_format(gl_format format)
|
||||
get_rt_format(mesa_format format)
|
||||
{
|
||||
switch (format) {
|
||||
case MESA_FORMAT_XRGB8888:
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ get_input_arg(struct combiner_state *rc, int arg, int flags)
|
|||
int i = (source == GL_TEXTURE ?
|
||||
rc->unit : source - GL_TEXTURE0);
|
||||
struct gl_texture_object *t = rc->ctx->Texture.Unit[i]._Current;
|
||||
gl_format format = t->Image[0][t->BaseLevel]->TexFormat;
|
||||
mesa_format format = t->Image[0][t->BaseLevel]->TexFormat;
|
||||
|
||||
if (format == MESA_FORMAT_A8) {
|
||||
/* Emulated using I8. */
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
#include "nv04_driver.h"
|
||||
|
||||
static inline int
|
||||
swzsurf_format(gl_format format)
|
||||
swzsurf_format(mesa_format format)
|
||||
{
|
||||
switch (format) {
|
||||
case MESA_FORMAT_A8:
|
||||
|
|
@ -73,7 +73,7 @@ swzsurf_format(gl_format format)
|
|||
}
|
||||
|
||||
static inline int
|
||||
surf2d_format(gl_format format)
|
||||
surf2d_format(mesa_format format)
|
||||
{
|
||||
switch (format) {
|
||||
case MESA_FORMAT_A8:
|
||||
|
|
@ -112,7 +112,7 @@ surf2d_format(gl_format format)
|
|||
}
|
||||
|
||||
static inline int
|
||||
rect_format(gl_format format)
|
||||
rect_format(mesa_format format)
|
||||
{
|
||||
switch (format) {
|
||||
case MESA_FORMAT_A8:
|
||||
|
|
@ -151,7 +151,7 @@ rect_format(gl_format format)
|
|||
}
|
||||
|
||||
static inline int
|
||||
sifm_format(gl_format format)
|
||||
sifm_format(mesa_format format)
|
||||
{
|
||||
switch (format) {
|
||||
case MESA_FORMAT_A8:
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
#include "nv10_driver.h"
|
||||
|
||||
static inline unsigned
|
||||
get_rt_format(gl_format format)
|
||||
get_rt_format(mesa_format format)
|
||||
{
|
||||
switch (format) {
|
||||
case MESA_FORMAT_XRGB8888:
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ get_input_arg(struct combiner_state *rc, int arg, int flags)
|
|||
int i = (source == GL_TEXTURE ?
|
||||
rc->unit : source - GL_TEXTURE0);
|
||||
struct gl_texture_object *t = rc->ctx->Texture.Unit[i]._Current;
|
||||
gl_format format = t->Image[0][t->BaseLevel]->TexFormat;
|
||||
mesa_format format = t->Image[0][t->BaseLevel]->TexFormat;
|
||||
|
||||
if (format == MESA_FORMAT_A8) {
|
||||
/* Emulated using I8. */
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
#include "nv20_driver.h"
|
||||
|
||||
static inline unsigned
|
||||
get_rt_format(gl_format format)
|
||||
get_rt_format(mesa_format format)
|
||||
{
|
||||
switch (format) {
|
||||
case MESA_FORMAT_XRGB8888:
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ static inline uint32_t cmdpacket0(struct radeon_screen *rscrn,
|
|||
}
|
||||
|
||||
/* common formats supported as both textures and render targets */
|
||||
unsigned r200_check_blit(gl_format mesa_format, uint32_t dst_pitch)
|
||||
unsigned r200_check_blit(mesa_format mesa_format, uint32_t dst_pitch)
|
||||
{
|
||||
/* XXX others? BE/LE? */
|
||||
switch (mesa_format) {
|
||||
|
|
@ -97,8 +97,8 @@ static inline void emit_vtx_state(struct r200_context *r200)
|
|||
}
|
||||
|
||||
static void inline emit_tx_setup(struct r200_context *r200,
|
||||
gl_format src_mesa_format,
|
||||
gl_format dst_mesa_format,
|
||||
mesa_format src_mesa_format,
|
||||
mesa_format dst_mesa_format,
|
||||
struct radeon_bo *bo,
|
||||
intptr_t offset,
|
||||
unsigned width,
|
||||
|
|
@ -297,7 +297,7 @@ static void inline emit_tx_setup(struct r200_context *r200,
|
|||
static inline void emit_cb_setup(struct r200_context *r200,
|
||||
struct radeon_bo *bo,
|
||||
intptr_t offset,
|
||||
gl_format mesa_format,
|
||||
mesa_format mesa_format,
|
||||
unsigned pitch,
|
||||
unsigned width,
|
||||
unsigned height)
|
||||
|
|
@ -463,7 +463,7 @@ static inline void emit_draw_packet(struct r200_context *r200,
|
|||
unsigned r200_blit(struct gl_context *ctx,
|
||||
struct radeon_bo *src_bo,
|
||||
intptr_t src_offset,
|
||||
gl_format src_mesaformat,
|
||||
mesa_format src_mesaformat,
|
||||
unsigned src_pitch,
|
||||
unsigned src_width,
|
||||
unsigned src_height,
|
||||
|
|
@ -471,7 +471,7 @@ unsigned r200_blit(struct gl_context *ctx,
|
|||
unsigned src_y_offset,
|
||||
struct radeon_bo *dst_bo,
|
||||
intptr_t dst_offset,
|
||||
gl_format dst_mesaformat,
|
||||
mesa_format dst_mesaformat,
|
||||
unsigned dst_pitch,
|
||||
unsigned dst_width,
|
||||
unsigned dst_height,
|
||||
|
|
|
|||
|
|
@ -30,12 +30,12 @@
|
|||
|
||||
void r200_blit_init(struct r200_context *r200);
|
||||
|
||||
unsigned r200_check_blit(gl_format mesa_format, uint32_t dst_pitch);
|
||||
unsigned r200_check_blit(mesa_format mesa_format, uint32_t dst_pitch);
|
||||
|
||||
unsigned r200_blit(struct gl_context *ctx,
|
||||
struct radeon_bo *src_bo,
|
||||
intptr_t src_offset,
|
||||
gl_format src_mesaformat,
|
||||
mesa_format src_mesaformat,
|
||||
unsigned src_pitch,
|
||||
unsigned src_width,
|
||||
unsigned src_height,
|
||||
|
|
@ -43,7 +43,7 @@ unsigned r200_blit(struct gl_context *ctx,
|
|||
unsigned src_y_offset,
|
||||
struct radeon_bo *dst_bo,
|
||||
intptr_t dst_offset,
|
||||
gl_format dst_mesaformat,
|
||||
mesa_format dst_mesaformat,
|
||||
unsigned dst_pitch,
|
||||
unsigned dst_width,
|
||||
unsigned dst_height,
|
||||
|
|
|
|||
|
|
@ -721,7 +721,7 @@ void r200SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint texture_format
|
|||
struct radeon_framebuffer *rfb;
|
||||
radeonTexObjPtr t;
|
||||
uint32_t pitch_val;
|
||||
gl_format texFormat;
|
||||
mesa_format texFormat;
|
||||
|
||||
radeon = pDRICtx->driverPrivate;
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ static inline uint32_t cmdpacket0(struct radeon_screen *rscrn,
|
|||
}
|
||||
|
||||
/* common formats supported as both textures and render targets */
|
||||
unsigned r100_check_blit(gl_format mesa_format, uint32_t dst_pitch)
|
||||
unsigned r100_check_blit(mesa_format mesa_format, uint32_t dst_pitch)
|
||||
{
|
||||
/* XXX others? BE/LE? */
|
||||
switch (mesa_format) {
|
||||
|
|
@ -92,7 +92,7 @@ static inline void emit_vtx_state(struct r100_context *r100)
|
|||
}
|
||||
|
||||
static void inline emit_tx_setup(struct r100_context *r100,
|
||||
gl_format mesa_format,
|
||||
mesa_format mesa_format,
|
||||
struct radeon_bo *bo,
|
||||
intptr_t offset,
|
||||
unsigned width,
|
||||
|
|
@ -175,7 +175,7 @@ static void inline emit_tx_setup(struct r100_context *r100,
|
|||
static inline void emit_cb_setup(struct r100_context *r100,
|
||||
struct radeon_bo *bo,
|
||||
intptr_t offset,
|
||||
gl_format mesa_format,
|
||||
mesa_format mesa_format,
|
||||
unsigned pitch,
|
||||
unsigned width,
|
||||
unsigned height)
|
||||
|
|
@ -341,7 +341,7 @@ static inline void emit_draw_packet(struct r100_context *r100,
|
|||
unsigned r100_blit(struct gl_context *ctx,
|
||||
struct radeon_bo *src_bo,
|
||||
intptr_t src_offset,
|
||||
gl_format src_mesaformat,
|
||||
mesa_format src_mesaformat,
|
||||
unsigned src_pitch,
|
||||
unsigned src_width,
|
||||
unsigned src_height,
|
||||
|
|
@ -349,7 +349,7 @@ unsigned r100_blit(struct gl_context *ctx,
|
|||
unsigned src_y_offset,
|
||||
struct radeon_bo *dst_bo,
|
||||
intptr_t dst_offset,
|
||||
gl_format dst_mesaformat,
|
||||
mesa_format dst_mesaformat,
|
||||
unsigned dst_pitch,
|
||||
unsigned dst_width,
|
||||
unsigned dst_height,
|
||||
|
|
|
|||
|
|
@ -30,12 +30,12 @@
|
|||
|
||||
void r100_blit_init(struct r100_context *r100);
|
||||
|
||||
unsigned r100_check_blit(gl_format mesa_format, uint32_t dst_pitch);
|
||||
unsigned r100_check_blit(mesa_format mesa_format, uint32_t dst_pitch);
|
||||
|
||||
unsigned r100_blit(struct gl_context *ctx,
|
||||
struct radeon_bo *src_bo,
|
||||
intptr_t src_offset,
|
||||
gl_format src_mesaformat,
|
||||
mesa_format src_mesaformat,
|
||||
unsigned src_pitch,
|
||||
unsigned src_width,
|
||||
unsigned src_height,
|
||||
|
|
@ -43,7 +43,7 @@ unsigned r100_blit(struct gl_context *ctx,
|
|||
unsigned src_y_offset,
|
||||
struct radeon_bo *dst_bo,
|
||||
intptr_t dst_offset,
|
||||
gl_format dst_mesaformat,
|
||||
mesa_format dst_mesaformat,
|
||||
unsigned dst_pitch,
|
||||
unsigned dst_width,
|
||||
unsigned dst_height,
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ void
|
|||
radeon_renderbuffer_set_bo(struct radeon_renderbuffer *rb,
|
||||
struct radeon_bo *bo);
|
||||
struct radeon_renderbuffer *
|
||||
radeon_create_renderbuffer(gl_format format, __DRIdrawable *driDrawPriv);
|
||||
radeon_create_renderbuffer(mesa_format format, __DRIdrawable *driDrawPriv);
|
||||
|
||||
void
|
||||
radeonReadPixels(struct gl_context * ctx,
|
||||
|
|
|
|||
|
|
@ -474,11 +474,11 @@ struct radeon_context {
|
|||
void (*free_context)(struct gl_context *ctx);
|
||||
void (*emit_query_finish)(radeonContextPtr radeon);
|
||||
void (*update_scissor)(struct gl_context *ctx);
|
||||
unsigned (*check_blit)(gl_format mesa_format, uint32_t dst_pitch);
|
||||
unsigned (*check_blit)(mesa_format mesa_format, uint32_t dst_pitch);
|
||||
unsigned (*blit)(struct gl_context *ctx,
|
||||
struct radeon_bo *src_bo,
|
||||
intptr_t src_offset,
|
||||
gl_format src_mesaformat,
|
||||
mesa_format src_mesaformat,
|
||||
unsigned src_pitch,
|
||||
unsigned src_width,
|
||||
unsigned src_height,
|
||||
|
|
@ -486,7 +486,7 @@ struct radeon_context {
|
|||
unsigned src_y_offset,
|
||||
struct radeon_bo *dst_bo,
|
||||
intptr_t dst_offset,
|
||||
gl_format dst_mesaformat,
|
||||
mesa_format dst_mesaformat,
|
||||
unsigned dst_pitch,
|
||||
unsigned dst_width,
|
||||
unsigned dst_height,
|
||||
|
|
@ -495,7 +495,7 @@ struct radeon_context {
|
|||
unsigned reg_width,
|
||||
unsigned reg_height,
|
||||
unsigned flip_y);
|
||||
unsigned (*is_format_renderable)(gl_format mesa_format);
|
||||
unsigned (*is_format_renderable)(mesa_format mesa_format);
|
||||
} vtbl;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -636,7 +636,7 @@ radeon_nop_alloc_storage(struct gl_context * ctx, struct gl_renderbuffer *rb,
|
|||
* Not used for user-created renderbuffers.
|
||||
*/
|
||||
struct radeon_renderbuffer *
|
||||
radeon_create_renderbuffer(gl_format format, __DRIdrawable *driDrawPriv)
|
||||
radeon_create_renderbuffer(mesa_format format, __DRIdrawable *driDrawPriv)
|
||||
{
|
||||
struct radeon_renderbuffer *rrb;
|
||||
struct gl_renderbuffer *rb;
|
||||
|
|
@ -833,7 +833,7 @@ static void
|
|||
radeon_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb)
|
||||
{
|
||||
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
|
||||
gl_format mesa_format;
|
||||
mesa_format mesa_format;
|
||||
int i;
|
||||
|
||||
for (i = -2; i < (GLint) ctx->Const.MaxColorAttachments; i++) {
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
#include "radeon_tile.h"
|
||||
|
||||
static unsigned get_aligned_compressed_row_stride(
|
||||
gl_format format,
|
||||
mesa_format format,
|
||||
unsigned width,
|
||||
unsigned minStride)
|
||||
{
|
||||
|
|
@ -71,7 +71,7 @@ static unsigned get_aligned_compressed_row_stride(
|
|||
}
|
||||
|
||||
unsigned get_texture_image_size(
|
||||
gl_format format,
|
||||
mesa_format format,
|
||||
unsigned rowStride,
|
||||
unsigned height,
|
||||
unsigned depth,
|
||||
|
|
@ -96,7 +96,7 @@ unsigned get_texture_image_size(
|
|||
return rowStride * height * depth;
|
||||
}
|
||||
|
||||
unsigned get_texture_image_row_stride(radeonContextPtr rmesa, gl_format format, unsigned width, unsigned tiling, GLuint target)
|
||||
unsigned get_texture_image_row_stride(radeonContextPtr rmesa, mesa_format format, unsigned width, unsigned tiling, GLuint target)
|
||||
{
|
||||
if (_mesa_is_format_compressed(format)) {
|
||||
return get_aligned_compressed_row_stride(format, width, rmesa->texture_compressed_row_align);
|
||||
|
|
@ -177,7 +177,7 @@ static void calculate_miptree_layout(radeonContextPtr rmesa, radeon_mipmap_tree
|
|||
* Create a new mipmap tree, calculate its layout and allocate memory.
|
||||
*/
|
||||
radeon_mipmap_tree* radeon_miptree_create(radeonContextPtr rmesa,
|
||||
GLenum target, gl_format mesaFormat, GLuint baseLevel, GLuint numLevels,
|
||||
GLenum target, mesa_format mesaFormat, GLuint baseLevel, GLuint numLevels,
|
||||
GLuint width0, GLuint height0, GLuint depth0, GLuint tilebits)
|
||||
{
|
||||
radeon_mipmap_tree *mt = CALLOC_STRUCT(_radeon_mipmap_tree);
|
||||
|
|
|
|||
|
|
@ -91,16 +91,16 @@ GLuint radeon_miptree_image_offset(radeon_mipmap_tree *mt,
|
|||
GLuint face, GLuint level);
|
||||
uint32_t get_base_teximage_offset(radeonTexObj *texObj);
|
||||
|
||||
unsigned get_texture_image_row_stride(radeonContextPtr rmesa, gl_format format, unsigned width, unsigned tiling, unsigned target);
|
||||
unsigned get_texture_image_row_stride(radeonContextPtr rmesa, mesa_format format, unsigned width, unsigned tiling, unsigned target);
|
||||
|
||||
unsigned get_texture_image_size(
|
||||
gl_format format,
|
||||
mesa_format format,
|
||||
unsigned rowStride,
|
||||
unsigned height,
|
||||
unsigned depth,
|
||||
unsigned tiling);
|
||||
|
||||
radeon_mipmap_tree *radeon_miptree_create(radeonContextPtr rmesa,
|
||||
GLenum target, gl_format mesaFormat, GLuint baseLevel, GLuint numLevels,
|
||||
GLenum target, mesa_format mesaFormat, GLuint baseLevel, GLuint numLevels,
|
||||
GLuint width0, GLuint height0, GLuint depth0, GLuint tilebits);
|
||||
#endif /* __RADEON_MIPMAP_TREE_H_ */
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
#include "radeon_debug.h"
|
||||
#include "radeon_mipmap_tree.h"
|
||||
|
||||
static gl_format gl_format_and_type_to_mesa_format(GLenum format, GLenum type)
|
||||
static mesa_format gl_format_and_type_to_mesa_format(GLenum format, GLenum type)
|
||||
{
|
||||
switch (format)
|
||||
{
|
||||
|
|
@ -94,7 +94,7 @@ do_blit_readpixels(struct gl_context * ctx,
|
|||
{
|
||||
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
|
||||
const struct radeon_renderbuffer *rrb = radeon_renderbuffer(ctx->ReadBuffer->_ColorReadBuffer);
|
||||
const gl_format dst_format = gl_format_and_type_to_mesa_format(format, type);
|
||||
const mesa_format dst_format = gl_format_and_type_to_mesa_format(format, type);
|
||||
unsigned dst_rowstride, dst_imagesize, aligned_rowstride, flip_y;
|
||||
struct radeon_bo *dst_buffer;
|
||||
GLint dst_x = 0, dst_y = 0;
|
||||
|
|
|
|||
|
|
@ -598,7 +598,7 @@ radeonCreateBuffer( __DRIscreen *driScrnPriv,
|
|||
const GLboolean swAccum = mesaVis->accumRedBits > 0;
|
||||
const GLboolean swStencil = mesaVis->stencilBits > 0 &&
|
||||
mesaVis->depthBits != 24;
|
||||
gl_format rgbFormat;
|
||||
mesa_format rgbFormat;
|
||||
struct radeon_framebuffer *rfb;
|
||||
|
||||
if (isPixmap)
|
||||
|
|
@ -708,7 +708,7 @@ radeonDestroyBuffer(__DRIdrawable *driDrawPriv)
|
|||
static const
|
||||
__DRIconfig **radeonInitScreen2(__DRIscreen *psp)
|
||||
{
|
||||
static const gl_format formats[3] = {
|
||||
static const mesa_format formats[3] = {
|
||||
MESA_FORMAT_RGB565,
|
||||
MESA_FORMAT_XRGB8888,
|
||||
MESA_FORMAT_ARGB8888
|
||||
|
|
|
|||
|
|
@ -50,8 +50,8 @@ do_copy_texsubimage(struct gl_context *ctx,
|
|||
const GLuint level = timg->base.Base.Level;
|
||||
unsigned src_bpp;
|
||||
unsigned dst_bpp;
|
||||
gl_format src_mesaformat;
|
||||
gl_format dst_mesaformat;
|
||||
mesa_format src_mesaformat;
|
||||
mesa_format dst_mesaformat;
|
||||
unsigned flip_y;
|
||||
|
||||
if (!radeon->vtbl.blit) {
|
||||
|
|
|
|||
|
|
@ -598,7 +598,7 @@ void radeonSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint texture_form
|
|||
struct radeon_framebuffer *rfb;
|
||||
radeonTexObjPtr t;
|
||||
uint32_t pitch_val;
|
||||
gl_format texFormat;
|
||||
mesa_format texFormat;
|
||||
|
||||
radeon = pDRICtx->driverPrivate;
|
||||
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@ radeon_unmap_texture_image(struct gl_context *ctx,
|
|||
}
|
||||
|
||||
/* try to find a format which will only need a memcopy */
|
||||
static gl_format radeonChoose8888TexFormat(radeonContextPtr rmesa,
|
||||
static mesa_format radeonChoose8888TexFormat(radeonContextPtr rmesa,
|
||||
GLenum srcFormat,
|
||||
GLenum srcType, GLboolean fbo)
|
||||
{
|
||||
|
|
@ -242,7 +242,7 @@ static gl_format radeonChoose8888TexFormat(radeonContextPtr rmesa,
|
|||
#endif
|
||||
}
|
||||
|
||||
gl_format radeonChooseTextureFormat_mesa(struct gl_context * ctx,
|
||||
mesa_format radeonChooseTextureFormat_mesa(struct gl_context * ctx,
|
||||
GLenum target,
|
||||
GLint internalFormat,
|
||||
GLenum format,
|
||||
|
|
@ -252,7 +252,7 @@ gl_format radeonChooseTextureFormat_mesa(struct gl_context * ctx,
|
|||
type, 0);
|
||||
}
|
||||
|
||||
gl_format radeonChooseTextureFormat(struct gl_context * ctx,
|
||||
mesa_format radeonChooseTextureFormat(struct gl_context * ctx,
|
||||
GLint internalFormat,
|
||||
GLenum format,
|
||||
GLenum type, GLboolean fbo)
|
||||
|
|
@ -504,7 +504,7 @@ static void teximage_assign_miptree(radeonContextPtr rmesa,
|
|||
"%s Failed to allocate miptree.\n", __func__);
|
||||
}
|
||||
|
||||
unsigned radeonIsFormatRenderable(gl_format mesa_format)
|
||||
unsigned radeonIsFormatRenderable(mesa_format mesa_format)
|
||||
{
|
||||
if (mesa_format == _radeon_texformat_argb8888 || mesa_format == _radeon_texformat_rgb565 ||
|
||||
mesa_format == _radeon_texformat_argb1555 || mesa_format == _radeon_texformat_argb4444)
|
||||
|
|
@ -579,12 +579,12 @@ void radeon_image_target_texture_2d(struct gl_context *ctx, GLenum target,
|
|||
fprintf(stderr, "miptree doesn't match image\n");
|
||||
}
|
||||
|
||||
gl_format _radeon_texformat_rgba8888 = MESA_FORMAT_NONE;
|
||||
gl_format _radeon_texformat_argb8888 = MESA_FORMAT_NONE;
|
||||
gl_format _radeon_texformat_rgb565 = MESA_FORMAT_NONE;
|
||||
gl_format _radeon_texformat_argb4444 = MESA_FORMAT_NONE;
|
||||
gl_format _radeon_texformat_argb1555 = MESA_FORMAT_NONE;
|
||||
gl_format _radeon_texformat_al88 = MESA_FORMAT_NONE;
|
||||
mesa_format _radeon_texformat_rgba8888 = MESA_FORMAT_NONE;
|
||||
mesa_format _radeon_texformat_argb8888 = MESA_FORMAT_NONE;
|
||||
mesa_format _radeon_texformat_rgb565 = MESA_FORMAT_NONE;
|
||||
mesa_format _radeon_texformat_argb4444 = MESA_FORMAT_NONE;
|
||||
mesa_format _radeon_texformat_argb1555 = MESA_FORMAT_NONE;
|
||||
mesa_format _radeon_texformat_al88 = MESA_FORMAT_NONE;
|
||||
/*@}*/
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -33,12 +33,12 @@
|
|||
|
||||
#include "main/formats.h"
|
||||
|
||||
extern gl_format _radeon_texformat_rgba8888;
|
||||
extern gl_format _radeon_texformat_argb8888;
|
||||
extern gl_format _radeon_texformat_rgb565;
|
||||
extern gl_format _radeon_texformat_argb4444;
|
||||
extern gl_format _radeon_texformat_argb1555;
|
||||
extern gl_format _radeon_texformat_al88;
|
||||
extern mesa_format _radeon_texformat_rgba8888;
|
||||
extern mesa_format _radeon_texformat_argb8888;
|
||||
extern mesa_format _radeon_texformat_rgb565;
|
||||
extern mesa_format _radeon_texformat_argb4444;
|
||||
extern mesa_format _radeon_texformat_argb1555;
|
||||
extern mesa_format _radeon_texformat_al88;
|
||||
|
||||
extern
|
||||
void copy_rows(void* dst, GLuint dststride, const void* src, GLuint srcstride,
|
||||
|
|
@ -51,13 +51,13 @@ int radeon_validate_texture_miptree(struct gl_context * ctx,
|
|||
struct gl_texture_object *texObj);
|
||||
|
||||
|
||||
gl_format radeonChooseTextureFormat_mesa(struct gl_context * ctx,
|
||||
mesa_format radeonChooseTextureFormat_mesa(struct gl_context * ctx,
|
||||
GLenum target,
|
||||
GLint internalFormat,
|
||||
GLenum format,
|
||||
GLenum type);
|
||||
|
||||
gl_format radeonChooseTextureFormat(struct gl_context * ctx,
|
||||
mesa_format radeonChooseTextureFormat(struct gl_context * ctx,
|
||||
GLint internalFormat,
|
||||
GLenum format,
|
||||
GLenum type, GLboolean fbo);
|
||||
|
|
@ -69,7 +69,7 @@ void radeonCopyTexSubImage(struct gl_context *ctx, GLuint dims,
|
|||
GLint x, GLint y,
|
||||
GLsizei width, GLsizei height);
|
||||
|
||||
unsigned radeonIsFormatRenderable(gl_format mesa_format);
|
||||
unsigned radeonIsFormatRenderable(mesa_format mesa_format);
|
||||
|
||||
void radeon_image_target_texture_2d(struct gl_context *ctx, GLenum target,
|
||||
struct gl_texture_object *texObj,
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ static void micro_tile_1_x_1_128bit(const void * src, unsigned src_pitch,
|
|||
|
||||
void tile_image(const void * src, unsigned src_pitch,
|
||||
void *dst, unsigned dst_pitch,
|
||||
gl_format format, unsigned width, unsigned height)
|
||||
mesa_format format, unsigned width, unsigned height)
|
||||
{
|
||||
assert(src_pitch >= width);
|
||||
assert(dst_pitch >= width);
|
||||
|
|
@ -435,7 +435,7 @@ static void micro_untile_1_x_1_128bit(const void * src, unsigned src_pitch,
|
|||
|
||||
void untile_image(const void * src, unsigned src_pitch,
|
||||
void *dst, unsigned dst_pitch,
|
||||
gl_format format, unsigned width, unsigned height)
|
||||
mesa_format format, unsigned width, unsigned height)
|
||||
{
|
||||
assert(src_pitch >= width);
|
||||
assert(dst_pitch >= width);
|
||||
|
|
@ -474,7 +474,7 @@ void untile_image(const void * src, unsigned src_pitch,
|
|||
}
|
||||
}
|
||||
|
||||
void get_tile_size(gl_format format, unsigned *block_width, unsigned *block_height)
|
||||
void get_tile_size(mesa_format format, unsigned *block_width, unsigned *block_height)
|
||||
{
|
||||
switch (_mesa_get_format_bytes(format))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -29,10 +29,10 @@
|
|||
|
||||
void tile_image(const void * src, unsigned src_pitch,
|
||||
void *dst, unsigned dst_pitch,
|
||||
gl_format format, unsigned width, unsigned height);
|
||||
mesa_format format, unsigned width, unsigned height);
|
||||
|
||||
void untile_image(const void * src, unsigned src_pitch,
|
||||
void *dst, unsigned dst_pitch,
|
||||
gl_format format, unsigned width, unsigned height);
|
||||
mesa_format format, unsigned width, unsigned height);
|
||||
|
||||
void get_tile_size(gl_format format, unsigned *block_width, unsigned *block_height);
|
||||
void get_tile_size(mesa_format format, unsigned *block_width, unsigned *block_height);
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ static void swrastSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
|
|||
struct gl_texture_image *texImage;
|
||||
struct swrast_texture_image *swImage;
|
||||
uint32_t internalFormat;
|
||||
gl_format texFormat;
|
||||
mesa_format texFormat;
|
||||
|
||||
dri_ctx = pDRICtx->driverPrivate;
|
||||
|
||||
|
|
@ -130,7 +130,7 @@ swrastFillInModes(__DRIscreen *psp,
|
|||
__DRIconfig **configs;
|
||||
unsigned depth_buffer_factor;
|
||||
unsigned back_buffer_factor;
|
||||
gl_format format;
|
||||
mesa_format format;
|
||||
|
||||
/* GLX_SWAP_COPY_OML is only supported because the Intel driver doesn't
|
||||
* support pageflipping at all.
|
||||
|
|
@ -627,7 +627,7 @@ viewport(struct gl_context *ctx)
|
|||
swrast_check_and_update_window_size(ctx, read);
|
||||
}
|
||||
|
||||
static gl_format swrastChooseTextureFormat(struct gl_context * ctx,
|
||||
static mesa_format swrastChooseTextureFormat(struct gl_context * ctx,
|
||||
GLenum target,
|
||||
GLint internalFormat,
|
||||
GLenum format,
|
||||
|
|
|
|||
|
|
@ -854,7 +854,7 @@ _mesa_update_clamp_vertex_color(struct gl_context *ctx)
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns an appropriate gl_format for color rendering based on the
|
||||
* Returns an appropriate mesa_format for color rendering based on the
|
||||
* GL_FRAMEBUFFER_SRGB state.
|
||||
*
|
||||
* Some drivers implement GL_FRAMEBUFFER_SRGB using a flag on the blend state
|
||||
|
|
@ -862,8 +862,8 @@ _mesa_update_clamp_vertex_color(struct gl_context *ctx)
|
|||
* overriding the format of the surface. This is a helper for doing the
|
||||
* surface format override variant.
|
||||
*/
|
||||
gl_format
|
||||
_mesa_get_render_format(const struct gl_context *ctx, gl_format format)
|
||||
mesa_format
|
||||
_mesa_get_render_format(const struct gl_context *ctx, mesa_format format)
|
||||
{
|
||||
if (ctx->Color.sRGBEnabled)
|
||||
return format;
|
||||
|
|
|
|||
|
|
@ -115,8 +115,8 @@ _mesa_update_clamp_fragment_color(struct gl_context *ctx);
|
|||
extern void
|
||||
_mesa_update_clamp_vertex_color(struct gl_context *ctx);
|
||||
|
||||
extern gl_format
|
||||
_mesa_get_render_format(const struct gl_context *ctx, gl_format format);
|
||||
extern mesa_format
|
||||
_mesa_get_render_format(const struct gl_context *ctx, mesa_format format);
|
||||
|
||||
extern void
|
||||
_mesa_init_color( struct gl_context * ctx );
|
||||
|
|
|
|||
|
|
@ -295,18 +295,18 @@ buffer_object_subdata_range_good(struct gl_context * ctx, GLenum target,
|
|||
* \param format Format of the supplied data.
|
||||
* \param type Type of the supplied data.
|
||||
* \param caller Name of calling function for recording errors.
|
||||
* \return If internalformat, format and type are legal the gl_format
|
||||
* \return If internalformat, format and type are legal the mesa_format
|
||||
* corresponding to internalformat, otherwise MESA_FORMAT_NONE.
|
||||
*
|
||||
* \sa glClearBufferData and glClearBufferSubData
|
||||
*/
|
||||
static gl_format
|
||||
static mesa_format
|
||||
validate_clear_buffer_format(struct gl_context *ctx,
|
||||
GLenum internalformat,
|
||||
GLenum format, GLenum type,
|
||||
const char *caller)
|
||||
{
|
||||
gl_format mesaFormat;
|
||||
mesa_format mesaFormat;
|
||||
GLenum errorFormatType;
|
||||
|
||||
mesaFormat = _mesa_validate_texbuffer_format(ctx, internalformat);
|
||||
|
|
@ -360,7 +360,7 @@ validate_clear_buffer_format(struct gl_context *ctx,
|
|||
*/
|
||||
static bool
|
||||
convert_clear_buffer_data(struct gl_context *ctx,
|
||||
gl_format internalformat,
|
||||
mesa_format internalformat,
|
||||
GLubyte *clearValue, GLenum format, GLenum type,
|
||||
const GLvoid *data, const char *caller)
|
||||
{
|
||||
|
|
@ -1365,7 +1365,7 @@ _mesa_ClearBufferData(GLenum target, GLenum internalformat, GLenum format,
|
|||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
struct gl_buffer_object* bufObj;
|
||||
gl_format mesaFormat;
|
||||
mesa_format mesaFormat;
|
||||
GLubyte clearValue[MAX_PIXEL_BYTES];
|
||||
GLsizeiptr clearValueSize;
|
||||
|
||||
|
|
@ -1420,7 +1420,7 @@ _mesa_ClearBufferSubData(GLenum target, GLenum internalformat,
|
|||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
struct gl_buffer_object* bufObj;
|
||||
gl_format mesaFormat;
|
||||
mesa_format mesaFormat;
|
||||
GLubyte clearValue[MAX_PIXEL_BYTES];
|
||||
GLsizeiptr clearValueSize;
|
||||
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ struct dd_function_table {
|
|||
* GL_TEXTURE_CUBE_MAP_[POSITIVE/NEGATIVE]_[XYZ].
|
||||
* Called by glTexImage(), etc.
|
||||
*/
|
||||
gl_format (*ChooseTextureFormat)( struct gl_context *ctx,
|
||||
mesa_format (*ChooseTextureFormat)( struct gl_context *ctx,
|
||||
GLenum target, GLint internalFormat,
|
||||
GLenum srcFormat, GLenum srcType );
|
||||
|
||||
|
|
@ -268,7 +268,7 @@ struct dd_function_table {
|
|||
* \return GL_TRUE if the image is OK, GL_FALSE if too large
|
||||
*/
|
||||
GLboolean (*TestProxyTexImage)(struct gl_context *ctx, GLenum target,
|
||||
GLint level, gl_format format,
|
||||
GLint level, mesa_format format,
|
||||
GLint width, GLint height,
|
||||
GLint depth, GLint border);
|
||||
/*@}*/
|
||||
|
|
|
|||
|
|
@ -636,7 +636,7 @@ _mesa_is_legal_color_format(const struct gl_context *ctx, GLenum baseFormat)
|
|||
* Is the given base format a legal format for a color renderbuffer?
|
||||
*/
|
||||
static GLboolean
|
||||
is_format_color_renderable(const struct gl_context *ctx, gl_format format, GLenum internalFormat)
|
||||
is_format_color_renderable(const struct gl_context *ctx, mesa_format format, GLenum internalFormat)
|
||||
{
|
||||
const GLenum baseFormat =
|
||||
_mesa_get_format_base_format(format);
|
||||
|
|
@ -901,7 +901,7 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx,
|
|||
for (i = -2; i < (GLint) ctx->Const.MaxColorAttachments; i++) {
|
||||
struct gl_renderbuffer_attachment *att;
|
||||
GLenum f;
|
||||
gl_format attFormat;
|
||||
mesa_format attFormat;
|
||||
GLenum att_tex_target = GL_NONE;
|
||||
|
||||
/*
|
||||
|
|
@ -1858,7 +1858,7 @@ _mesa_EGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image)
|
|||
* we need to return zero.
|
||||
*/
|
||||
static GLint
|
||||
get_component_bits(GLenum pname, GLenum baseFormat, gl_format format)
|
||||
get_component_bits(GLenum pname, GLenum baseFormat, mesa_format format)
|
||||
{
|
||||
if (_mesa_base_format_has_channel(baseFormat, pname))
|
||||
return _mesa_get_format_bits(format, pname);
|
||||
|
|
@ -2882,7 +2882,7 @@ _mesa_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment,
|
|||
"glGetFramebufferAttachmentParameterivEXT(pname)");
|
||||
}
|
||||
else {
|
||||
gl_format format = att->Renderbuffer->Format;
|
||||
mesa_format format = att->Renderbuffer->Format;
|
||||
|
||||
/* Page 235 (page 247 of the PDF) in section 6.1.13 of the OpenGL ES
|
||||
* 3.0.1 spec says:
|
||||
|
|
@ -3092,7 +3092,7 @@ find_attachment(const struct gl_framebuffer *fb,
|
|||
* does not contain signed integer values."
|
||||
*/
|
||||
static GLboolean
|
||||
compatible_color_datatypes(gl_format srcFormat, gl_format dstFormat)
|
||||
compatible_color_datatypes(mesa_format srcFormat, mesa_format dstFormat)
|
||||
{
|
||||
GLenum srcType = _mesa_get_format_datatype(srcFormat);
|
||||
GLenum dstType = _mesa_get_format_datatype(dstFormat);
|
||||
|
|
|
|||
|
|
@ -1879,7 +1879,7 @@ pack_float_SIGNED_RG1616(const GLfloat src[4], void *dst)
|
|||
* Return a function that can pack a GLubyte rgba[4] color.
|
||||
*/
|
||||
gl_pack_ubyte_rgba_func
|
||||
_mesa_get_pack_ubyte_rgba_function(gl_format format)
|
||||
_mesa_get_pack_ubyte_rgba_function(mesa_format format)
|
||||
{
|
||||
static gl_pack_ubyte_rgba_func table[MESA_FORMAT_COUNT];
|
||||
static GLboolean initialized = GL_FALSE;
|
||||
|
|
@ -2042,7 +2042,7 @@ _mesa_get_pack_ubyte_rgba_function(gl_format format)
|
|||
* Return a function that can pack a GLfloat rgba[4] color.
|
||||
*/
|
||||
gl_pack_float_rgba_func
|
||||
_mesa_get_pack_float_rgba_function(gl_format format)
|
||||
_mesa_get_pack_float_rgba_function(mesa_format format)
|
||||
{
|
||||
static gl_pack_float_rgba_func table[MESA_FORMAT_COUNT];
|
||||
static GLboolean initialized = GL_FALSE;
|
||||
|
|
@ -2202,7 +2202,7 @@ _mesa_get_pack_float_rgba_function(gl_format format)
|
|||
|
||||
|
||||
static pack_float_rgba_row_func
|
||||
get_pack_float_rgba_row_function(gl_format format)
|
||||
get_pack_float_rgba_row_function(mesa_format format)
|
||||
{
|
||||
static pack_float_rgba_row_func table[MESA_FORMAT_COUNT];
|
||||
static GLboolean initialized = GL_FALSE;
|
||||
|
|
@ -2235,7 +2235,7 @@ get_pack_float_rgba_row_function(gl_format format)
|
|||
|
||||
|
||||
static pack_ubyte_rgba_row_func
|
||||
get_pack_ubyte_rgba_row_function(gl_format format)
|
||||
get_pack_ubyte_rgba_row_function(mesa_format format)
|
||||
{
|
||||
static pack_ubyte_rgba_row_func table[MESA_FORMAT_COUNT];
|
||||
static GLboolean initialized = GL_FALSE;
|
||||
|
|
@ -2271,7 +2271,7 @@ get_pack_ubyte_rgba_row_function(gl_format format)
|
|||
* Pack a row of GLfloat rgba[4] values to the destination.
|
||||
*/
|
||||
void
|
||||
_mesa_pack_float_rgba_row(gl_format format, GLuint n,
|
||||
_mesa_pack_float_rgba_row(mesa_format format, GLuint n,
|
||||
const GLfloat src[][4], void *dst)
|
||||
{
|
||||
pack_float_rgba_row_func packrow = get_pack_float_rgba_row_function(format);
|
||||
|
|
@ -2302,7 +2302,7 @@ _mesa_pack_float_rgba_row(gl_format format, GLuint n,
|
|||
* Pack a row of GLubyte rgba[4] values to the destination.
|
||||
*/
|
||||
void
|
||||
_mesa_pack_ubyte_rgba_row(gl_format format, GLuint n,
|
||||
_mesa_pack_ubyte_rgba_row(mesa_format format, GLuint n,
|
||||
const GLubyte src[][4], void *dst)
|
||||
{
|
||||
pack_ubyte_rgba_row_func packrow = get_pack_ubyte_rgba_row_function(format);
|
||||
|
|
@ -2335,7 +2335,7 @@ _mesa_pack_ubyte_rgba_row(gl_format format, GLuint n,
|
|||
* \param dstRowStride destination image row stride in bytes
|
||||
*/
|
||||
void
|
||||
_mesa_pack_ubyte_rgba_rect(gl_format format, GLuint width, GLuint height,
|
||||
_mesa_pack_ubyte_rgba_rect(mesa_format format, GLuint width, GLuint height,
|
||||
const GLubyte *src, GLint srcRowStride,
|
||||
void *dst, GLint dstRowStride)
|
||||
{
|
||||
|
|
@ -2423,7 +2423,7 @@ pack_float_z_Z32_FLOAT(const GLfloat *src, void *dst)
|
|||
}
|
||||
|
||||
gl_pack_float_z_func
|
||||
_mesa_get_pack_float_z_func(gl_format format)
|
||||
_mesa_get_pack_float_z_func(mesa_format format)
|
||||
{
|
||||
switch (format) {
|
||||
case MESA_FORMAT_Z24_S8:
|
||||
|
|
@ -2508,7 +2508,7 @@ pack_uint_z_Z32_FLOAT_X24S8(const GLuint *src, void *dst)
|
|||
}
|
||||
|
||||
gl_pack_uint_z_func
|
||||
_mesa_get_pack_uint_z_func(gl_format format)
|
||||
_mesa_get_pack_uint_z_func(mesa_format format)
|
||||
{
|
||||
switch (format) {
|
||||
case MESA_FORMAT_Z24_S8:
|
||||
|
|
@ -2572,7 +2572,7 @@ pack_ubyte_stencil_Z32_FLOAT_X24S8(const GLubyte *src, void *dst)
|
|||
|
||||
|
||||
gl_pack_ubyte_stencil_func
|
||||
_mesa_get_pack_ubyte_stencil_func(gl_format format)
|
||||
_mesa_get_pack_ubyte_stencil_func(mesa_format format)
|
||||
{
|
||||
switch (format) {
|
||||
case MESA_FORMAT_Z24_S8:
|
||||
|
|
@ -2593,7 +2593,7 @@ _mesa_get_pack_ubyte_stencil_func(gl_format format)
|
|||
|
||||
|
||||
void
|
||||
_mesa_pack_float_z_row(gl_format format, GLuint n,
|
||||
_mesa_pack_float_z_row(mesa_format format, GLuint n,
|
||||
const GLfloat *src, void *dst)
|
||||
{
|
||||
switch (format) {
|
||||
|
|
@ -2669,7 +2669,7 @@ _mesa_pack_float_z_row(gl_format format, GLuint n,
|
|||
* The incoming Z values are always in the range [0, 0xffffffff].
|
||||
*/
|
||||
void
|
||||
_mesa_pack_uint_z_row(gl_format format, GLuint n,
|
||||
_mesa_pack_uint_z_row(mesa_format format, GLuint n,
|
||||
const GLuint *src, void *dst)
|
||||
{
|
||||
switch (format) {
|
||||
|
|
@ -2742,7 +2742,7 @@ _mesa_pack_uint_z_row(gl_format format, GLuint n,
|
|||
|
||||
|
||||
void
|
||||
_mesa_pack_ubyte_stencil_row(gl_format format, GLuint n,
|
||||
_mesa_pack_ubyte_stencil_row(mesa_format format, GLuint n,
|
||||
const GLubyte *src, void *dst)
|
||||
{
|
||||
switch (format) {
|
||||
|
|
@ -2792,7 +2792,7 @@ _mesa_pack_ubyte_stencil_row(gl_format format, GLuint n,
|
|||
* Incoming Z/stencil values are always in uint_24_8 format.
|
||||
*/
|
||||
void
|
||||
_mesa_pack_uint_24_8_depth_stencil_row(gl_format format, GLuint n,
|
||||
_mesa_pack_uint_24_8_depth_stencil_row(mesa_format format, GLuint n,
|
||||
const GLuint *src, void *dst)
|
||||
{
|
||||
switch (format) {
|
||||
|
|
@ -2836,7 +2836,7 @@ _mesa_pack_uint_24_8_depth_stencil_row(gl_format format, GLuint n,
|
|||
* the packed value at dst will be 0 or ~0 depending on the colorMask.
|
||||
*/
|
||||
void
|
||||
_mesa_pack_colormask(gl_format format, const GLubyte colorMask[4], void *dst)
|
||||
_mesa_pack_colormask(mesa_format format, const GLubyte colorMask[4], void *dst)
|
||||
{
|
||||
GLfloat maskColor[4];
|
||||
|
||||
|
|
|
|||
|
|
@ -49,58 +49,58 @@ typedef void (*gl_pack_ubyte_stencil_func)(const GLubyte *src, void *dst);
|
|||
|
||||
|
||||
extern gl_pack_ubyte_rgba_func
|
||||
_mesa_get_pack_ubyte_rgba_function(gl_format format);
|
||||
_mesa_get_pack_ubyte_rgba_function(mesa_format format);
|
||||
|
||||
|
||||
extern gl_pack_float_rgba_func
|
||||
_mesa_get_pack_float_rgba_function(gl_format format);
|
||||
_mesa_get_pack_float_rgba_function(mesa_format format);
|
||||
|
||||
|
||||
extern gl_pack_float_z_func
|
||||
_mesa_get_pack_float_z_func(gl_format format);
|
||||
_mesa_get_pack_float_z_func(mesa_format format);
|
||||
|
||||
|
||||
extern gl_pack_uint_z_func
|
||||
_mesa_get_pack_uint_z_func(gl_format format);
|
||||
_mesa_get_pack_uint_z_func(mesa_format format);
|
||||
|
||||
|
||||
extern gl_pack_ubyte_stencil_func
|
||||
_mesa_get_pack_ubyte_stencil_func(gl_format format);
|
||||
_mesa_get_pack_ubyte_stencil_func(mesa_format format);
|
||||
|
||||
|
||||
|
||||
extern void
|
||||
_mesa_pack_float_rgba_row(gl_format format, GLuint n,
|
||||
_mesa_pack_float_rgba_row(mesa_format format, GLuint n,
|
||||
const GLfloat src[][4], void *dst);
|
||||
|
||||
extern void
|
||||
_mesa_pack_ubyte_rgba_row(gl_format format, GLuint n,
|
||||
_mesa_pack_ubyte_rgba_row(mesa_format format, GLuint n,
|
||||
const GLubyte src[][4], void *dst);
|
||||
|
||||
|
||||
extern void
|
||||
_mesa_pack_ubyte_rgba_rect(gl_format format, GLuint width, GLuint height,
|
||||
_mesa_pack_ubyte_rgba_rect(mesa_format format, GLuint width, GLuint height,
|
||||
const GLubyte *src, GLint srcRowStride,
|
||||
void *dst, GLint dstRowStride);
|
||||
|
||||
extern void
|
||||
_mesa_pack_float_z_row(gl_format format, GLuint n,
|
||||
_mesa_pack_float_z_row(mesa_format format, GLuint n,
|
||||
const GLfloat *src, void *dst);
|
||||
|
||||
extern void
|
||||
_mesa_pack_uint_z_row(gl_format format, GLuint n,
|
||||
_mesa_pack_uint_z_row(mesa_format format, GLuint n,
|
||||
const GLuint *src, void *dst);
|
||||
|
||||
extern void
|
||||
_mesa_pack_ubyte_stencil_row(gl_format format, GLuint n,
|
||||
_mesa_pack_ubyte_stencil_row(mesa_format format, GLuint n,
|
||||
const GLubyte *src, void *dst);
|
||||
|
||||
extern void
|
||||
_mesa_pack_uint_24_8_depth_stencil_row(gl_format format, GLuint n,
|
||||
_mesa_pack_uint_24_8_depth_stencil_row(mesa_format format, GLuint n,
|
||||
const GLuint *src, void *dst);
|
||||
|
||||
|
||||
extern void
|
||||
_mesa_pack_colormask(gl_format format, const GLubyte colorMask[4], void *dst);
|
||||
_mesa_pack_colormask(mesa_format format, const GLubyte colorMask[4], void *dst);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -2311,7 +2311,7 @@ unpack_SIGNED_RG1616(const void *src, GLfloat dst[][4], GLuint n)
|
|||
* Return the unpacker function for the given format.
|
||||
*/
|
||||
static unpack_rgba_func
|
||||
get_unpack_rgba_function(gl_format format)
|
||||
get_unpack_rgba_function(mesa_format format)
|
||||
{
|
||||
static unpack_rgba_func table[MESA_FORMAT_COUNT];
|
||||
static GLboolean initialized = GL_FALSE;
|
||||
|
|
@ -2540,7 +2540,7 @@ get_unpack_rgba_function(gl_format format)
|
|||
* Unpack rgba colors, returning as GLfloat values.
|
||||
*/
|
||||
void
|
||||
_mesa_unpack_rgba_row(gl_format format, GLuint n,
|
||||
_mesa_unpack_rgba_row(mesa_format format, GLuint n,
|
||||
const void *src, GLfloat dst[][4])
|
||||
{
|
||||
unpack_rgba_func unpack = get_unpack_rgba_function(format);
|
||||
|
|
@ -2913,7 +2913,7 @@ unpack_ubyte_RG88(const void *src, GLubyte dst[][4], GLuint n)
|
|||
* only be used for unpacking formats that use 8 bits or less per channel.
|
||||
*/
|
||||
void
|
||||
_mesa_unpack_ubyte_rgba_row(gl_format format, GLuint n,
|
||||
_mesa_unpack_ubyte_rgba_row(mesa_format format, GLuint n,
|
||||
const void *src, GLubyte dst[][4])
|
||||
{
|
||||
switch (format) {
|
||||
|
|
@ -3640,7 +3640,7 @@ unpack_int_rgba_ABGR2101010(const GLuint *src, GLuint dst[][4], GLuint n)
|
|||
}
|
||||
|
||||
void
|
||||
_mesa_unpack_uint_rgba_row(gl_format format, GLuint n,
|
||||
_mesa_unpack_uint_rgba_row(mesa_format format, GLuint n,
|
||||
const void *src, GLuint dst[][4])
|
||||
{
|
||||
switch (format) {
|
||||
|
|
@ -3863,7 +3863,7 @@ _mesa_unpack_uint_rgba_row(gl_format format, GLuint n,
|
|||
* \param height height of rect region to convert
|
||||
*/
|
||||
void
|
||||
_mesa_unpack_rgba_block(gl_format format,
|
||||
_mesa_unpack_rgba_block(mesa_format format,
|
||||
const void *src, GLint srcRowStride,
|
||||
GLfloat dst[][4], GLint dstRowStride,
|
||||
GLuint x, GLuint y, GLuint width, GLuint height)
|
||||
|
|
@ -3964,7 +3964,7 @@ unpack_float_z_Z32X24S8(GLuint n, const void *src, GLfloat *dst)
|
|||
* The returned values will always be in the range [0.0, 1.0].
|
||||
*/
|
||||
void
|
||||
_mesa_unpack_float_z_row(gl_format format, GLuint n,
|
||||
_mesa_unpack_float_z_row(mesa_format format, GLuint n,
|
||||
const void *src, GLfloat *dst)
|
||||
{
|
||||
unpack_float_z_func unpack;
|
||||
|
|
@ -4068,7 +4068,7 @@ unpack_uint_z_Z32_FLOAT_X24S8(const void *src, GLuint *dst, GLuint n)
|
|||
* The returned values will always be in the range [0, 0xffffffff].
|
||||
*/
|
||||
void
|
||||
_mesa_unpack_uint_z_row(gl_format format, GLuint n,
|
||||
_mesa_unpack_uint_z_row(mesa_format format, GLuint n,
|
||||
const void *src, GLuint *dst)
|
||||
{
|
||||
unpack_uint_z_func unpack;
|
||||
|
|
@ -4142,7 +4142,7 @@ unpack_ubyte_s_Z32_FLOAT_X24S8(const void *src, GLubyte *dst, GLuint n)
|
|||
}
|
||||
|
||||
void
|
||||
_mesa_unpack_ubyte_stencil_row(gl_format format, GLuint n,
|
||||
_mesa_unpack_ubyte_stencil_row(mesa_format format, GLuint n,
|
||||
const void *src, GLubyte *dst)
|
||||
{
|
||||
switch (format) {
|
||||
|
|
@ -4183,7 +4183,7 @@ unpack_uint_24_8_depth_stencil_Z24_S8(const GLuint *src, GLuint *dst, GLuint n)
|
|||
}
|
||||
|
||||
void
|
||||
_mesa_unpack_uint_24_8_depth_stencil_row(gl_format format, GLuint n,
|
||||
_mesa_unpack_uint_24_8_depth_stencil_row(mesa_format format, GLuint n,
|
||||
const void *src, GLuint *dst)
|
||||
{
|
||||
switch (format) {
|
||||
|
|
|
|||
|
|
@ -29,38 +29,38 @@ extern GLfloat
|
|||
_mesa_nonlinear_to_linear(GLubyte cs8);
|
||||
|
||||
extern void
|
||||
_mesa_unpack_rgba_row(gl_format format, GLuint n,
|
||||
_mesa_unpack_rgba_row(mesa_format format, GLuint n,
|
||||
const void *src, GLfloat dst[][4]);
|
||||
|
||||
extern void
|
||||
_mesa_unpack_ubyte_rgba_row(gl_format format, GLuint n,
|
||||
_mesa_unpack_ubyte_rgba_row(mesa_format format, GLuint n,
|
||||
const void *src, GLubyte dst[][4]);
|
||||
|
||||
void
|
||||
_mesa_unpack_uint_rgba_row(gl_format format, GLuint n,
|
||||
_mesa_unpack_uint_rgba_row(mesa_format format, GLuint n,
|
||||
const void *src, GLuint dst[][4]);
|
||||
|
||||
extern void
|
||||
_mesa_unpack_rgba_block(gl_format format,
|
||||
_mesa_unpack_rgba_block(mesa_format format,
|
||||
const void *src, GLint srcRowStride,
|
||||
GLfloat dst[][4], GLint dstRowStride,
|
||||
GLuint x, GLuint y, GLuint width, GLuint height);
|
||||
|
||||
extern void
|
||||
_mesa_unpack_float_z_row(gl_format format, GLuint n,
|
||||
_mesa_unpack_float_z_row(mesa_format format, GLuint n,
|
||||
const void *src, GLfloat *dst);
|
||||
|
||||
|
||||
void
|
||||
_mesa_unpack_uint_z_row(gl_format format, GLuint n,
|
||||
_mesa_unpack_uint_z_row(mesa_format format, GLuint n,
|
||||
const void *src, GLuint *dst);
|
||||
|
||||
void
|
||||
_mesa_unpack_ubyte_stencil_row(gl_format format, GLuint n,
|
||||
_mesa_unpack_ubyte_stencil_row(mesa_format format, GLuint n,
|
||||
const void *src, GLubyte *dst);
|
||||
|
||||
void
|
||||
_mesa_unpack_uint_24_8_depth_stencil_row(gl_format format, GLuint n,
|
||||
_mesa_unpack_uint_24_8_depth_stencil_row(mesa_format format, GLuint n,
|
||||
const void *src, GLuint *dst);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
*/
|
||||
struct gl_format_info
|
||||
{
|
||||
gl_format Name;
|
||||
mesa_format Name;
|
||||
|
||||
/** text name for debugging */
|
||||
const char *StrName;
|
||||
|
|
@ -1795,7 +1795,7 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
|
|||
|
||||
|
||||
static const struct gl_format_info *
|
||||
_mesa_get_format_info(gl_format format)
|
||||
_mesa_get_format_info(mesa_format format)
|
||||
{
|
||||
const struct gl_format_info *info = &format_info[format];
|
||||
assert(info->Name == format);
|
||||
|
|
@ -1805,7 +1805,7 @@ _mesa_get_format_info(gl_format format)
|
|||
|
||||
/** Return string name of format (for debugging) */
|
||||
const char *
|
||||
_mesa_get_format_name(gl_format format)
|
||||
_mesa_get_format_name(mesa_format format)
|
||||
{
|
||||
const struct gl_format_info *info = _mesa_get_format_info(format);
|
||||
return info->StrName;
|
||||
|
|
@ -1821,7 +1821,7 @@ _mesa_get_format_name(gl_format format)
|
|||
* Note: not GLuint, so as not to coerce math to unsigned. cf. fdo #37351
|
||||
*/
|
||||
GLint
|
||||
_mesa_get_format_bytes(gl_format format)
|
||||
_mesa_get_format_bytes(mesa_format format)
|
||||
{
|
||||
const struct gl_format_info *info = _mesa_get_format_info(format);
|
||||
ASSERT(info->BytesPerBlock);
|
||||
|
|
@ -1837,7 +1837,7 @@ _mesa_get_format_bytes(gl_format format)
|
|||
* \param pname the component, such as GL_RED_BITS, GL_TEXTURE_BLUE_BITS, etc.
|
||||
*/
|
||||
GLint
|
||||
_mesa_get_format_bits(gl_format format, GLenum pname)
|
||||
_mesa_get_format_bits(mesa_format format, GLenum pname)
|
||||
{
|
||||
const struct gl_format_info *info = _mesa_get_format_info(format);
|
||||
|
||||
|
|
@ -1886,7 +1886,7 @@ _mesa_get_format_bits(gl_format format, GLenum pname)
|
|||
|
||||
|
||||
GLuint
|
||||
_mesa_get_format_max_bits(gl_format format)
|
||||
_mesa_get_format_max_bits(mesa_format format)
|
||||
{
|
||||
const struct gl_format_info *info = _mesa_get_format_info(format);
|
||||
GLuint max = MAX2(info->RedBits, info->GreenBits);
|
||||
|
|
@ -1911,7 +1911,7 @@ _mesa_get_format_max_bits(gl_format format)
|
|||
* GL_FLOAT = an ordinary float
|
||||
*/
|
||||
GLenum
|
||||
_mesa_get_format_datatype(gl_format format)
|
||||
_mesa_get_format_datatype(mesa_format format)
|
||||
{
|
||||
const struct gl_format_info *info = _mesa_get_format_info(format);
|
||||
return info->DataType;
|
||||
|
|
@ -1924,7 +1924,7 @@ _mesa_get_format_datatype(gl_format format)
|
|||
* GL_YCBCR_MESA, GL_DEPTH_COMPONENT, GL_STENCIL_INDEX, GL_DEPTH_STENCIL.
|
||||
*/
|
||||
GLenum
|
||||
_mesa_get_format_base_format(gl_format format)
|
||||
_mesa_get_format_base_format(mesa_format format)
|
||||
{
|
||||
const struct gl_format_info *info = _mesa_get_format_info(format);
|
||||
return info->BaseFormat;
|
||||
|
|
@ -1939,7 +1939,7 @@ _mesa_get_format_base_format(gl_format format)
|
|||
* \param bh returns block height in pixels
|
||||
*/
|
||||
void
|
||||
_mesa_get_format_block_size(gl_format format, GLuint *bw, GLuint *bh)
|
||||
_mesa_get_format_block_size(mesa_format format, GLuint *bw, GLuint *bh)
|
||||
{
|
||||
const struct gl_format_info *info = _mesa_get_format_info(format);
|
||||
*bw = info->BlockWidth;
|
||||
|
|
@ -1949,7 +1949,7 @@ _mesa_get_format_block_size(gl_format format, GLuint *bw, GLuint *bh)
|
|||
|
||||
/** Is the given format a compressed format? */
|
||||
GLboolean
|
||||
_mesa_is_format_compressed(gl_format format)
|
||||
_mesa_is_format_compressed(mesa_format format)
|
||||
{
|
||||
const struct gl_format_info *info = _mesa_get_format_info(format);
|
||||
return info->BlockWidth > 1 || info->BlockHeight > 1;
|
||||
|
|
@ -1960,7 +1960,7 @@ _mesa_is_format_compressed(gl_format format)
|
|||
* Determine if the given format represents a packed depth/stencil buffer.
|
||||
*/
|
||||
GLboolean
|
||||
_mesa_is_format_packed_depth_stencil(gl_format format)
|
||||
_mesa_is_format_packed_depth_stencil(mesa_format format)
|
||||
{
|
||||
const struct gl_format_info *info = _mesa_get_format_info(format);
|
||||
|
||||
|
|
@ -1972,7 +1972,7 @@ _mesa_is_format_packed_depth_stencil(gl_format format)
|
|||
* Is the given format a signed/unsigned integer color format?
|
||||
*/
|
||||
GLboolean
|
||||
_mesa_is_format_integer_color(gl_format format)
|
||||
_mesa_is_format_integer_color(mesa_format format)
|
||||
{
|
||||
const struct gl_format_info *info = _mesa_get_format_info(format);
|
||||
return (info->DataType == GL_INT || info->DataType == GL_UNSIGNED_INT) &&
|
||||
|
|
@ -1986,7 +1986,7 @@ _mesa_is_format_integer_color(gl_format format)
|
|||
* Is the given format an unsigned integer format?
|
||||
*/
|
||||
GLboolean
|
||||
_mesa_is_format_unsigned(gl_format format)
|
||||
_mesa_is_format_unsigned(mesa_format format)
|
||||
{
|
||||
const struct gl_format_info *info = _mesa_get_format_info(format);
|
||||
return _mesa_is_type_unsigned(info->DataType);
|
||||
|
|
@ -1997,7 +1997,7 @@ _mesa_is_format_unsigned(gl_format format)
|
|||
* Does the given format store signed values?
|
||||
*/
|
||||
GLboolean
|
||||
_mesa_is_format_signed(gl_format format)
|
||||
_mesa_is_format_signed(mesa_format format)
|
||||
{
|
||||
if (format == MESA_FORMAT_R11_G11_B10_FLOAT ||
|
||||
format == MESA_FORMAT_RGB9_E5_FLOAT) {
|
||||
|
|
@ -2018,7 +2018,7 @@ _mesa_is_format_signed(gl_format format)
|
|||
* \return GL_LINEAR or GL_SRGB
|
||||
*/
|
||||
GLenum
|
||||
_mesa_get_format_color_encoding(gl_format format)
|
||||
_mesa_get_format_color_encoding(mesa_format format)
|
||||
{
|
||||
/* XXX this info should be encoded in gl_format_info */
|
||||
switch (format) {
|
||||
|
|
@ -2046,8 +2046,8 @@ _mesa_get_format_color_encoding(gl_format format)
|
|||
* For an sRGB format, return the corresponding linear color space format.
|
||||
* For non-sRGB formats, return the format as-is.
|
||||
*/
|
||||
gl_format
|
||||
_mesa_get_srgb_format_linear(gl_format format)
|
||||
mesa_format
|
||||
_mesa_get_srgb_format_linear(mesa_format format)
|
||||
{
|
||||
switch (format) {
|
||||
case MESA_FORMAT_SRGB8:
|
||||
|
|
@ -2100,8 +2100,8 @@ _mesa_get_srgb_format_linear(gl_format format)
|
|||
* If the given format is a compressed format, return a corresponding
|
||||
* uncompressed format.
|
||||
*/
|
||||
gl_format
|
||||
_mesa_get_uncompressed_format(gl_format format)
|
||||
mesa_format
|
||||
_mesa_get_uncompressed_format(mesa_format format)
|
||||
{
|
||||
switch (format) {
|
||||
case MESA_FORMAT_RGB_FXT1:
|
||||
|
|
@ -2161,7 +2161,7 @@ _mesa_get_uncompressed_format(gl_format format)
|
|||
|
||||
|
||||
GLuint
|
||||
_mesa_format_num_components(gl_format format)
|
||||
_mesa_format_num_components(mesa_format format)
|
||||
{
|
||||
const struct gl_format_info *info = _mesa_get_format_info(format);
|
||||
return ((info->RedBits > 0) +
|
||||
|
|
@ -2180,7 +2180,7 @@ _mesa_format_num_components(gl_format format)
|
|||
* in the given format.
|
||||
*/
|
||||
GLuint
|
||||
_mesa_format_image_size(gl_format format, GLsizei width,
|
||||
_mesa_format_image_size(mesa_format format, GLsizei width,
|
||||
GLsizei height, GLsizei depth)
|
||||
{
|
||||
const struct gl_format_info *info = _mesa_get_format_info(format);
|
||||
|
|
@ -2206,7 +2206,7 @@ _mesa_format_image_size(gl_format format, GLsizei width,
|
|||
* accomodate very large textures.
|
||||
*/
|
||||
uint64_t
|
||||
_mesa_format_image_size64(gl_format format, GLsizei width,
|
||||
_mesa_format_image_size64(mesa_format format, GLsizei width,
|
||||
GLsizei height, GLsizei depth)
|
||||
{
|
||||
const struct gl_format_info *info = _mesa_get_format_info(format);
|
||||
|
|
@ -2232,7 +2232,7 @@ _mesa_format_image_size64(gl_format format, GLsizei width,
|
|||
|
||||
|
||||
GLint
|
||||
_mesa_format_row_stride(gl_format format, GLsizei width)
|
||||
_mesa_format_row_stride(mesa_format format, GLsizei width)
|
||||
{
|
||||
const struct gl_format_info *info = _mesa_get_format_info(format);
|
||||
/* Strictly speaking, a conditional isn't needed here */
|
||||
|
|
@ -2259,7 +2259,7 @@ _mesa_format_row_stride(gl_format format, GLsizei width)
|
|||
static void
|
||||
check_format_to_type_and_comps(void)
|
||||
{
|
||||
gl_format f;
|
||||
mesa_format f;
|
||||
|
||||
for (f = MESA_FORMAT_NONE + 1; f < MESA_FORMAT_COUNT; f++) {
|
||||
GLenum datatype = 0;
|
||||
|
|
@ -2364,11 +2364,11 @@ _mesa_test_formats(void)
|
|||
|
||||
|
||||
/**
|
||||
* Return datatype and number of components per texel for the given gl_format.
|
||||
* Return datatype and number of components per texel for the given mesa_format.
|
||||
* Only used for mipmap generation code.
|
||||
*/
|
||||
void
|
||||
_mesa_format_to_type_and_comps(gl_format format,
|
||||
_mesa_format_to_type_and_comps(mesa_format format,
|
||||
GLenum *datatype, GLuint *comps)
|
||||
{
|
||||
switch (format) {
|
||||
|
|
@ -2912,16 +2912,16 @@ _mesa_format_to_type_and_comps(gl_format format,
|
|||
}
|
||||
|
||||
/**
|
||||
* Check if a gl_format exactly matches a GL format/type combination
|
||||
* Check if a mesa_format exactly matches a GL format/type combination
|
||||
* such that we can use memcpy() from one to the other.
|
||||
* \param gl_format a MESA_FORMAT_x value
|
||||
* \param mesa_format a MESA_FORMAT_x value
|
||||
* \param format the user-specified image format
|
||||
* \param type the user-specified image datatype
|
||||
* \param swapBytes typically the current pixel pack/unpack byteswap state
|
||||
* \return GL_TRUE if the formats match, GL_FALSE otherwise.
|
||||
*/
|
||||
GLboolean
|
||||
_mesa_format_matches_format_and_type(gl_format gl_format,
|
||||
_mesa_format_matches_format_and_type(mesa_format mesa_format,
|
||||
GLenum format, GLenum type,
|
||||
GLboolean swapBytes)
|
||||
{
|
||||
|
|
@ -2936,7 +2936,7 @@ _mesa_format_matches_format_and_type(gl_format gl_format,
|
|||
* enums in formats.h.
|
||||
*/
|
||||
|
||||
switch (gl_format) {
|
||||
switch (mesa_format) {
|
||||
|
||||
case MESA_FORMAT_NONE:
|
||||
case MESA_FORMAT_COUNT:
|
||||
|
|
|
|||
|
|
@ -310,77 +310,77 @@ typedef enum
|
|||
MESA_FORMAT_SIGNED_RG1616,
|
||||
|
||||
MESA_FORMAT_COUNT
|
||||
} gl_format;
|
||||
} mesa_format;
|
||||
|
||||
|
||||
extern const char *
|
||||
_mesa_get_format_name(gl_format format);
|
||||
_mesa_get_format_name(mesa_format format);
|
||||
|
||||
extern GLint
|
||||
_mesa_get_format_bytes(gl_format format);
|
||||
_mesa_get_format_bytes(mesa_format format);
|
||||
|
||||
extern GLint
|
||||
_mesa_get_format_bits(gl_format format, GLenum pname);
|
||||
_mesa_get_format_bits(mesa_format format, GLenum pname);
|
||||
|
||||
extern GLuint
|
||||
_mesa_get_format_max_bits(gl_format format);
|
||||
_mesa_get_format_max_bits(mesa_format format);
|
||||
|
||||
extern GLenum
|
||||
_mesa_get_format_datatype(gl_format format);
|
||||
_mesa_get_format_datatype(mesa_format format);
|
||||
|
||||
extern GLenum
|
||||
_mesa_get_format_base_format(gl_format format);
|
||||
_mesa_get_format_base_format(mesa_format format);
|
||||
|
||||
extern void
|
||||
_mesa_get_format_block_size(gl_format format, GLuint *bw, GLuint *bh);
|
||||
_mesa_get_format_block_size(mesa_format format, GLuint *bw, GLuint *bh);
|
||||
|
||||
extern GLboolean
|
||||
_mesa_is_format_compressed(gl_format format);
|
||||
_mesa_is_format_compressed(mesa_format format);
|
||||
|
||||
extern GLboolean
|
||||
_mesa_is_format_packed_depth_stencil(gl_format format);
|
||||
_mesa_is_format_packed_depth_stencil(mesa_format format);
|
||||
|
||||
extern GLboolean
|
||||
_mesa_is_format_integer_color(gl_format format);
|
||||
_mesa_is_format_integer_color(mesa_format format);
|
||||
|
||||
extern GLboolean
|
||||
_mesa_is_format_unsigned(gl_format format);
|
||||
_mesa_is_format_unsigned(mesa_format format);
|
||||
|
||||
extern GLboolean
|
||||
_mesa_is_format_signed(gl_format format);
|
||||
_mesa_is_format_signed(mesa_format format);
|
||||
|
||||
extern GLenum
|
||||
_mesa_get_format_color_encoding(gl_format format);
|
||||
_mesa_get_format_color_encoding(mesa_format format);
|
||||
|
||||
extern GLuint
|
||||
_mesa_format_image_size(gl_format format, GLsizei width,
|
||||
_mesa_format_image_size(mesa_format format, GLsizei width,
|
||||
GLsizei height, GLsizei depth);
|
||||
|
||||
extern uint64_t
|
||||
_mesa_format_image_size64(gl_format format, GLsizei width,
|
||||
_mesa_format_image_size64(mesa_format format, GLsizei width,
|
||||
GLsizei height, GLsizei depth);
|
||||
|
||||
extern GLint
|
||||
_mesa_format_row_stride(gl_format format, GLsizei width);
|
||||
_mesa_format_row_stride(mesa_format format, GLsizei width);
|
||||
|
||||
extern void
|
||||
_mesa_format_to_type_and_comps(gl_format format,
|
||||
_mesa_format_to_type_and_comps(mesa_format format,
|
||||
GLenum *datatype, GLuint *comps);
|
||||
|
||||
extern void
|
||||
_mesa_test_formats(void);
|
||||
|
||||
extern gl_format
|
||||
_mesa_get_srgb_format_linear(gl_format format);
|
||||
extern mesa_format
|
||||
_mesa_get_srgb_format_linear(mesa_format format);
|
||||
|
||||
extern gl_format
|
||||
_mesa_get_uncompressed_format(gl_format format);
|
||||
extern mesa_format
|
||||
_mesa_get_uncompressed_format(mesa_format format);
|
||||
|
||||
extern GLuint
|
||||
_mesa_format_num_components(gl_format format);
|
||||
_mesa_format_num_components(mesa_format format);
|
||||
|
||||
GLboolean
|
||||
_mesa_format_matches_format_and_type(gl_format gl_format,
|
||||
_mesa_format_matches_format_and_type(mesa_format mesa_format,
|
||||
GLenum format, GLenum type,
|
||||
GLboolean swapBytes);
|
||||
|
||||
|
|
|
|||
|
|
@ -469,7 +469,7 @@ _mesa_update_framebuffer_visual(struct gl_context *ctx,
|
|||
if (fb->Attachment[i].Renderbuffer) {
|
||||
const struct gl_renderbuffer *rb = fb->Attachment[i].Renderbuffer;
|
||||
const GLenum baseFormat = _mesa_get_format_base_format(rb->Format);
|
||||
const gl_format fmt = rb->Format;
|
||||
const mesa_format fmt = rb->Format;
|
||||
|
||||
/* Grab samples and sampleBuffers from any attachment point (assuming
|
||||
* the framebuffer is complete, we'll get the same answer from all
|
||||
|
|
@ -496,7 +496,7 @@ _mesa_update_framebuffer_visual(struct gl_context *ctx,
|
|||
for (i = 0; i < BUFFER_COUNT; i++) {
|
||||
if (fb->Attachment[i].Renderbuffer) {
|
||||
const struct gl_renderbuffer *rb = fb->Attachment[i].Renderbuffer;
|
||||
const gl_format fmt = rb->Format;
|
||||
const mesa_format fmt = rb->Format;
|
||||
|
||||
if (_mesa_get_format_datatype(fmt) == GL_FLOAT) {
|
||||
fb->Visual.floatMode = GL_TRUE;
|
||||
|
|
@ -508,7 +508,7 @@ _mesa_update_framebuffer_visual(struct gl_context *ctx,
|
|||
if (fb->Attachment[BUFFER_DEPTH].Renderbuffer) {
|
||||
const struct gl_renderbuffer *rb =
|
||||
fb->Attachment[BUFFER_DEPTH].Renderbuffer;
|
||||
const gl_format fmt = rb->Format;
|
||||
const mesa_format fmt = rb->Format;
|
||||
fb->Visual.haveDepthBuffer = GL_TRUE;
|
||||
fb->Visual.depthBits = _mesa_get_format_bits(fmt, GL_DEPTH_BITS);
|
||||
}
|
||||
|
|
@ -516,7 +516,7 @@ _mesa_update_framebuffer_visual(struct gl_context *ctx,
|
|||
if (fb->Attachment[BUFFER_STENCIL].Renderbuffer) {
|
||||
const struct gl_renderbuffer *rb =
|
||||
fb->Attachment[BUFFER_STENCIL].Renderbuffer;
|
||||
const gl_format fmt = rb->Format;
|
||||
const mesa_format fmt = rb->Format;
|
||||
fb->Visual.haveStencilBuffer = GL_TRUE;
|
||||
fb->Visual.stencilBits = _mesa_get_format_bits(fmt, GL_STENCIL_BITS);
|
||||
}
|
||||
|
|
@ -524,7 +524,7 @@ _mesa_update_framebuffer_visual(struct gl_context *ctx,
|
|||
if (fb->Attachment[BUFFER_ACCUM].Renderbuffer) {
|
||||
const struct gl_renderbuffer *rb =
|
||||
fb->Attachment[BUFFER_ACCUM].Renderbuffer;
|
||||
const gl_format fmt = rb->Format;
|
||||
const mesa_format fmt = rb->Format;
|
||||
fb->Visual.haveAccumBuffer = GL_TRUE;
|
||||
fb->Visual.accumRedBits = _mesa_get_format_bits(fmt, GL_RED_BITS);
|
||||
fb->Visual.accumGreenBits = _mesa_get_format_bits(fmt, GL_GREEN_BITS);
|
||||
|
|
|
|||
|
|
@ -1816,7 +1816,7 @@ GLboolean
|
|||
_mesa_prepare_mipmap_level(struct gl_context *ctx,
|
||||
struct gl_texture_object *texObj, GLuint level,
|
||||
GLsizei width, GLsizei height, GLsizei depth,
|
||||
GLsizei border, GLenum intFormat, gl_format format)
|
||||
GLsizei border, GLenum intFormat, mesa_format format)
|
||||
{
|
||||
const GLuint numFaces = _mesa_num_tex_faces(texObj->Target);
|
||||
GLuint face;
|
||||
|
|
@ -2018,7 +2018,7 @@ generate_mipmap_compressed(struct gl_context *ctx, GLenum target,
|
|||
GLuint maxLevel)
|
||||
{
|
||||
GLuint level;
|
||||
gl_format temp_format;
|
||||
mesa_format temp_format;
|
||||
GLint components;
|
||||
GLuint temp_src_row_stride, temp_src_img_stride; /* in bytes */
|
||||
GLubyte *temp_src = NULL, *temp_dst = NULL;
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ extern GLboolean
|
|||
_mesa_prepare_mipmap_level(struct gl_context *ctx,
|
||||
struct gl_texture_object *texObj, GLuint level,
|
||||
GLsizei width, GLsizei height, GLsizei depth,
|
||||
GLsizei border, GLenum intFormat, gl_format format);
|
||||
GLsizei border, GLenum intFormat, mesa_format format);
|
||||
|
||||
extern void
|
||||
_mesa_generate_mipmap(struct gl_context *ctx, GLenum target,
|
||||
|
|
|
|||
|
|
@ -1115,7 +1115,7 @@ struct gl_texture_image
|
|||
* GL_DEPTH_STENCIL_EXT only. Used for
|
||||
* choosing TexEnv arithmetic.
|
||||
*/
|
||||
gl_format TexFormat; /**< The actual texture memory format */
|
||||
mesa_format TexFormat; /**< The actual texture memory format */
|
||||
|
||||
GLuint Border; /**< 0 or 1 */
|
||||
GLuint Width; /**< = 2^WidthLog2 + 2*Border */
|
||||
|
|
@ -1229,7 +1229,7 @@ struct gl_texture_object
|
|||
struct gl_buffer_object *BufferObject;
|
||||
GLenum BufferObjectFormat;
|
||||
/** Equivalent Mesa format for BufferObjectFormat. */
|
||||
gl_format _BufferObjectFormat;
|
||||
mesa_format _BufferObjectFormat;
|
||||
/** GL_ARB_texture_buffer_range */
|
||||
GLintptr BufferOffset;
|
||||
GLsizeiptr BufferSize; /**< if this is -1, use BufferObject->Size instead */
|
||||
|
|
@ -2928,7 +2928,7 @@ struct gl_renderbuffer
|
|||
GLenum InternalFormat; /**< The user-specified format */
|
||||
GLenum _BaseFormat; /**< Either GL_RGB, GL_RGBA, GL_DEPTH_COMPONENT or
|
||||
GL_STENCIL_INDEX. */
|
||||
gl_format Format; /**< The actual renderbuffer memory format */
|
||||
mesa_format Format; /**< The actual renderbuffer memory format */
|
||||
/**
|
||||
* Pointer to the texture image if this renderbuffer wraps a texture,
|
||||
* otherwise NULL.
|
||||
|
|
@ -3860,7 +3860,7 @@ struct gl_image_unit
|
|||
/**
|
||||
* Mesa format corresponding to \c Format.
|
||||
*/
|
||||
gl_format _ActualFormat;
|
||||
mesa_format _ActualFormat;
|
||||
|
||||
/**
|
||||
* GL_TRUE if the state of this image unit is valid and access from
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
* Return true if the conversion L=R+G+B is needed.
|
||||
*/
|
||||
static GLboolean
|
||||
need_rgb_to_luminance_conversion(gl_format texFormat, GLenum format)
|
||||
need_rgb_to_luminance_conversion(mesa_format texFormat, GLenum format)
|
||||
{
|
||||
GLenum baseTexFormat = _mesa_get_format_base_format(texFormat);
|
||||
|
||||
|
|
@ -60,7 +60,7 @@ need_rgb_to_luminance_conversion(gl_format texFormat, GLenum format)
|
|||
* Return transfer op flags for this ReadPixels operation.
|
||||
*/
|
||||
static GLbitfield
|
||||
get_readpixels_transfer_ops(const struct gl_context *ctx, gl_format texFormat,
|
||||
get_readpixels_transfer_ops(const struct gl_context *ctx, mesa_format texFormat,
|
||||
GLenum format, GLenum type, GLboolean uses_blit)
|
||||
{
|
||||
GLbitfield transferOps = ctx->_ImageTransferState;
|
||||
|
|
@ -493,7 +493,7 @@ slow_read_rgba_pixels( struct gl_context *ctx,
|
|||
GLbitfield transferOps )
|
||||
{
|
||||
struct gl_renderbuffer *rb = ctx->ReadBuffer->_ColorReadBuffer;
|
||||
const gl_format rbFormat = _mesa_get_srgb_format_linear(rb->Format);
|
||||
const mesa_format rbFormat = _mesa_get_srgb_format_linear(rb->Format);
|
||||
void *rgba;
|
||||
GLubyte *dst, *map;
|
||||
int dstStride, stride, j;
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@
|
|||
# define MESA_FORMAT_SIGNED_RG_8 MESA_FORMAT_SIGNED_RG88_REV
|
||||
#endif
|
||||
|
||||
static gl_format
|
||||
static mesa_format
|
||||
get_image_format(GLenum format)
|
||||
{
|
||||
switch (format) {
|
||||
|
|
@ -205,7 +205,7 @@ enum image_format_class
|
|||
};
|
||||
|
||||
static enum image_format_class
|
||||
get_image_format_class(gl_format format)
|
||||
get_image_format_class(mesa_format format)
|
||||
{
|
||||
switch (format) {
|
||||
case MESA_FORMAT_RGBA_FLOAT32:
|
||||
|
|
|
|||
|
|
@ -361,7 +361,7 @@ _mesa_get_compressed_formats(struct gl_context *ctx, GLint *formats)
|
|||
/**
|
||||
* Convert a compressed MESA_FORMAT_x to a GLenum.
|
||||
*/
|
||||
gl_format
|
||||
mesa_format
|
||||
_mesa_glenum_to_compressed_format(GLenum format)
|
||||
{
|
||||
switch (format) {
|
||||
|
|
@ -451,7 +451,7 @@ _mesa_glenum_to_compressed_format(GLenum format)
|
|||
* internal format unchanged.
|
||||
*/
|
||||
GLenum
|
||||
_mesa_compressed_format_to_glenum(struct gl_context *ctx, gl_format mesaFormat)
|
||||
_mesa_compressed_format_to_glenum(struct gl_context *ctx, mesa_format mesaFormat)
|
||||
{
|
||||
switch (mesaFormat) {
|
||||
case MESA_FORMAT_RGB_FXT1:
|
||||
|
|
@ -535,7 +535,7 @@ _mesa_compressed_format_to_glenum(struct gl_context *ctx, gl_format mesaFormat)
|
|||
*/
|
||||
GLubyte *
|
||||
_mesa_compressed_image_address(GLint col, GLint row, GLint img,
|
||||
gl_format mesaFormat,
|
||||
mesa_format mesaFormat,
|
||||
GLsizei width, const GLubyte *image)
|
||||
{
|
||||
/* XXX only 2D images implemented, not 3D */
|
||||
|
|
@ -560,7 +560,7 @@ _mesa_compressed_image_address(GLint col, GLint row, GLint img,
|
|||
* invalid format.
|
||||
*/
|
||||
compressed_fetch_func
|
||||
_mesa_get_compressed_fetch_func(gl_format format)
|
||||
_mesa_get_compressed_fetch_func(mesa_format format)
|
||||
{
|
||||
switch (format) {
|
||||
case MESA_FORMAT_RGB_DXT1:
|
||||
|
|
@ -598,7 +598,7 @@ _mesa_get_compressed_fetch_func(gl_format format)
|
|||
* compressed source image.
|
||||
*/
|
||||
void
|
||||
_mesa_decompress_image(gl_format format, GLuint width, GLuint height,
|
||||
_mesa_decompress_image(mesa_format format, GLuint width, GLuint height,
|
||||
const GLubyte *src, GLint srcRowStride,
|
||||
GLfloat *dest)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -36,15 +36,15 @@ _mesa_gl_compressed_format_base_format(GLenum format);
|
|||
extern GLuint
|
||||
_mesa_get_compressed_formats(struct gl_context *ctx, GLint *formats);
|
||||
|
||||
extern gl_format
|
||||
extern mesa_format
|
||||
_mesa_glenum_to_compressed_format(GLenum format);
|
||||
|
||||
extern GLenum
|
||||
_mesa_compressed_format_to_glenum(struct gl_context *ctx, gl_format mesaFormat);
|
||||
_mesa_compressed_format_to_glenum(struct gl_context *ctx, mesa_format mesaFormat);
|
||||
|
||||
extern GLubyte *
|
||||
_mesa_compressed_image_address(GLint col, GLint row, GLint img,
|
||||
gl_format mesaFormat,
|
||||
mesa_format mesaFormat,
|
||||
GLsizei width, const GLubyte *image);
|
||||
|
||||
|
||||
|
|
@ -55,11 +55,11 @@ typedef void (*compressed_fetch_func)(const GLubyte *map,
|
|||
GLfloat *texel);
|
||||
|
||||
extern compressed_fetch_func
|
||||
_mesa_get_compressed_fetch_func(gl_format format);
|
||||
_mesa_get_compressed_fetch_func(mesa_format format);
|
||||
|
||||
|
||||
extern void
|
||||
_mesa_decompress_image(gl_format format, GLuint width, GLuint height,
|
||||
_mesa_decompress_image(mesa_format format, GLuint width, GLuint height,
|
||||
const GLubyte *src, GLint srcRowStride,
|
||||
GLfloat *dest);
|
||||
|
||||
|
|
|
|||
|
|
@ -1175,7 +1175,7 @@ _mesa_unpack_etc2_format(uint8_t *dst_row,
|
|||
unsigned src_stride,
|
||||
unsigned src_width,
|
||||
unsigned src_height,
|
||||
gl_format format)
|
||||
mesa_format format)
|
||||
{
|
||||
if (format == MESA_FORMAT_ETC2_RGB8)
|
||||
etc2_unpack_rgb8(dst_row, dst_stride,
|
||||
|
|
@ -1452,7 +1452,7 @@ fetch_etc2_srgb8_punchthrough_alpha1(const GLubyte *map,
|
|||
|
||||
|
||||
compressed_fetch_func
|
||||
_mesa_get_etc_fetch_func(gl_format format)
|
||||
_mesa_get_etc_fetch_func(mesa_format format)
|
||||
{
|
||||
switch (format) {
|
||||
case MESA_FORMAT_ETC1_RGB8:
|
||||
|
|
|
|||
|
|
@ -77,9 +77,9 @@ _mesa_unpack_etc2_format(uint8_t *dst_row,
|
|||
unsigned src_stride,
|
||||
unsigned src_width,
|
||||
unsigned src_height,
|
||||
gl_format format);
|
||||
mesa_format format);
|
||||
|
||||
compressed_fetch_func
|
||||
_mesa_get_etc_fetch_func(gl_format format);
|
||||
_mesa_get_etc_fetch_func(mesa_format format);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1641,7 +1641,7 @@ fetch_rgba_fxt1(const GLubyte *map,
|
|||
|
||||
|
||||
compressed_fetch_func
|
||||
_mesa_get_fxt_fetch_func(gl_format format)
|
||||
_mesa_get_fxt_fetch_func(mesa_format format)
|
||||
{
|
||||
switch (format) {
|
||||
case MESA_FORMAT_RGB_FXT1:
|
||||
|
|
|
|||
|
|
@ -37,6 +37,6 @@ _mesa_texstore_rgba_fxt1(TEXSTORE_PARAMS);
|
|||
|
||||
|
||||
compressed_fetch_func
|
||||
_mesa_get_fxt_fetch_func(gl_format format);
|
||||
_mesa_get_fxt_fetch_func(mesa_format format);
|
||||
|
||||
#endif /* TEXCOMPRESS_FXT1_H */
|
||||
|
|
|
|||
|
|
@ -439,7 +439,7 @@ fetch_signed_la_latc2(const GLubyte *map,
|
|||
|
||||
|
||||
compressed_fetch_func
|
||||
_mesa_get_compressed_rgtc_func(gl_format format)
|
||||
_mesa_get_compressed_rgtc_func(mesa_format format)
|
||||
{
|
||||
switch (format) {
|
||||
case MESA_FORMAT_RED_RGTC1:
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ extern GLboolean
|
|||
_mesa_texstore_signed_rg_rgtc2(TEXSTORE_PARAMS);
|
||||
|
||||
extern compressed_fetch_func
|
||||
_mesa_get_compressed_rgtc_func(gl_format format);
|
||||
_mesa_get_compressed_rgtc_func(mesa_format format);
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -483,7 +483,7 @@ fetch_srgba_dxt5(const GLubyte *map,
|
|||
|
||||
|
||||
compressed_fetch_func
|
||||
_mesa_get_dxt_fetch_func(gl_format format)
|
||||
_mesa_get_dxt_fetch_func(mesa_format format)
|
||||
{
|
||||
switch (format) {
|
||||
case MESA_FORMAT_RGB_DXT1:
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ extern void
|
|||
_mesa_init_texture_s3tc(struct gl_context *ctx);
|
||||
|
||||
extern compressed_fetch_func
|
||||
_mesa_get_dxt_fetch_func(gl_format format);
|
||||
_mesa_get_dxt_fetch_func(mesa_format format);
|
||||
|
||||
|
||||
#endif /* TEXCOMPRESS_S3TC_H */
|
||||
|
|
|
|||
|
|
@ -54,12 +54,12 @@
|
|||
* \param format incoming image pixel format.
|
||||
* \param type incoming image data type.
|
||||
*
|
||||
* \return the closest gl_format for the given format/type arguments
|
||||
* \return the closest mesa_format for the given format/type arguments
|
||||
*
|
||||
* This is called via dd_function_table::ChooseTextureFormat. Hardware
|
||||
* drivers may override this function with a specialized version.
|
||||
*/
|
||||
gl_format
|
||||
mesa_format
|
||||
_mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
|
||||
GLint internalFormat, GLenum format, GLenum type)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
struct gl_context;
|
||||
|
||||
extern gl_format
|
||||
extern mesa_format
|
||||
_mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
|
||||
GLint internalFormat, GLenum format, GLenum type);
|
||||
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ get_tex_rgba_compressed(struct gl_context *ctx, GLuint dimensions,
|
|||
GLbitfield transferOps)
|
||||
{
|
||||
/* don't want to apply sRGB -> RGB conversion here so override the format */
|
||||
const gl_format texFormat =
|
||||
const mesa_format texFormat =
|
||||
_mesa_get_srgb_format_linear(texImage->TexFormat);
|
||||
const GLenum baseFormat = _mesa_get_format_base_format(texFormat);
|
||||
const GLenum destBaseFormat = _mesa_base_tex_format(ctx, format);
|
||||
|
|
@ -360,7 +360,7 @@ get_tex_rgba_uncompressed(struct gl_context *ctx, GLuint dimensions,
|
|||
GLbitfield transferOps)
|
||||
{
|
||||
/* don't want to apply sRGB -> RGB conversion here so override the format */
|
||||
const gl_format texFormat =
|
||||
const mesa_format texFormat =
|
||||
_mesa_get_srgb_format_linear(texImage->TexFormat);
|
||||
const GLuint width = texImage->Width;
|
||||
GLenum destBaseFormat = _mesa_base_pack_format(format);
|
||||
|
|
|
|||
|
|
@ -1325,7 +1325,7 @@ _mesa_init_teximage_fields(struct gl_context *ctx,
|
|||
struct gl_texture_image *img,
|
||||
GLsizei width, GLsizei height, GLsizei depth,
|
||||
GLint border, GLenum internalFormat,
|
||||
gl_format format)
|
||||
mesa_format format)
|
||||
{
|
||||
GLenum target;
|
||||
ASSERT(img);
|
||||
|
|
@ -1748,7 +1748,7 @@ error_check_subtexture_dimensions(struct gl_context *ctx,
|
|||
*/
|
||||
GLboolean
|
||||
_mesa_test_proxy_teximage(struct gl_context *ctx, GLenum target, GLint level,
|
||||
gl_format format,
|
||||
mesa_format format,
|
||||
GLint width, GLint height, GLint depth, GLint border)
|
||||
{
|
||||
/* We just check if the image size is less than MaxTextureMbytes.
|
||||
|
|
@ -1957,7 +1957,7 @@ static GLuint
|
|||
compressed_tex_size(GLsizei width, GLsizei height, GLsizei depth,
|
||||
GLenum glformat)
|
||||
{
|
||||
gl_format mesaFormat = _mesa_glenum_to_compressed_format(glformat);
|
||||
mesa_format mesaFormat = _mesa_glenum_to_compressed_format(glformat);
|
||||
return _mesa_format_image_size(mesaFormat, width, height, depth);
|
||||
}
|
||||
|
||||
|
|
@ -2964,13 +2964,13 @@ override_internal_format(GLenum internalFormat, GLint width, GLint height)
|
|||
* for efficient texture memory layout/allocation. In particular, this
|
||||
* comes up during automatic mipmap generation.
|
||||
*/
|
||||
gl_format
|
||||
mesa_format
|
||||
_mesa_choose_texture_format(struct gl_context *ctx,
|
||||
struct gl_texture_object *texObj,
|
||||
GLenum target, GLint level,
|
||||
GLenum internalFormat, GLenum format, GLenum type)
|
||||
{
|
||||
gl_format f;
|
||||
mesa_format f;
|
||||
|
||||
/* see if we've already chosen a format for the previous level */
|
||||
if (level > 0) {
|
||||
|
|
@ -3092,7 +3092,7 @@ teximage(struct gl_context *ctx, GLboolean compressed, GLuint dims,
|
|||
struct gl_pixelstore_attrib unpack_no_border;
|
||||
const struct gl_pixelstore_attrib *unpack = &ctx->Unpack;
|
||||
struct gl_texture_object *texObj;
|
||||
gl_format texFormat;
|
||||
mesa_format texFormat;
|
||||
GLboolean dimensionsOK, sizeOK;
|
||||
|
||||
FLUSH_VERTICES(ctx, 0);
|
||||
|
|
@ -3516,7 +3516,7 @@ _mesa_TexSubImage3D( GLenum target, GLint level,
|
|||
* from. This depends on whether the texture contains color or depth values.
|
||||
*/
|
||||
static struct gl_renderbuffer *
|
||||
get_copy_tex_image_source(struct gl_context *ctx, gl_format texFormat)
|
||||
get_copy_tex_image_source(struct gl_context *ctx, mesa_format texFormat)
|
||||
{
|
||||
if (_mesa_get_format_bits(texFormat, GL_DEPTH_BITS) > 0) {
|
||||
/* reading from depth/stencil buffer */
|
||||
|
|
@ -3570,7 +3570,7 @@ copyteximage(struct gl_context *ctx, GLuint dims,
|
|||
struct gl_texture_object *texObj;
|
||||
struct gl_texture_image *texImage;
|
||||
const GLuint face = _mesa_tex_target_to_face(target);
|
||||
gl_format texFormat;
|
||||
mesa_format texFormat;
|
||||
|
||||
FLUSH_VERTICES(ctx, 0);
|
||||
|
||||
|
|
@ -4008,7 +4008,7 @@ _mesa_CompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset,
|
|||
width, height, depth, format, imageSize, data);
|
||||
}
|
||||
|
||||
static gl_format
|
||||
static mesa_format
|
||||
get_texbuffer_format(const struct gl_context *ctx, GLenum internalFormat)
|
||||
{
|
||||
if (ctx->API != API_OPENGL_CORE) {
|
||||
|
|
@ -4182,11 +4182,11 @@ get_texbuffer_format(const struct gl_context *ctx, GLenum internalFormat)
|
|||
}
|
||||
|
||||
|
||||
gl_format
|
||||
mesa_format
|
||||
_mesa_validate_texbuffer_format(const struct gl_context *ctx,
|
||||
GLenum internalFormat)
|
||||
{
|
||||
gl_format format = get_texbuffer_format(ctx, internalFormat);
|
||||
mesa_format format = get_texbuffer_format(ctx, internalFormat);
|
||||
GLenum datatype;
|
||||
|
||||
if (format == MESA_FORMAT_NONE)
|
||||
|
|
@ -4220,7 +4220,7 @@ texbufferrange(struct gl_context *ctx, GLenum target, GLenum internalFormat,
|
|||
GLintptr offset, GLsizeiptr size)
|
||||
{
|
||||
struct gl_texture_object *texObj;
|
||||
gl_format format;
|
||||
mesa_format format;
|
||||
|
||||
FLUSH_VERTICES(ctx, 0);
|
||||
|
||||
|
|
@ -4357,7 +4357,7 @@ teximagemultisample(GLuint dims, GLenum target, GLsizei samples,
|
|||
struct gl_texture_object *texObj;
|
||||
struct gl_texture_image *texImage;
|
||||
GLboolean sizeOK, dimensionsOK;
|
||||
gl_format texFormat;
|
||||
mesa_format texFormat;
|
||||
GLenum sample_count_error;
|
||||
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
|
|
|||
|
|
@ -83,10 +83,10 @@ _mesa_init_teximage_fields(struct gl_context *ctx,
|
|||
struct gl_texture_image *img,
|
||||
GLsizei width, GLsizei height, GLsizei depth,
|
||||
GLint border, GLenum internalFormat,
|
||||
gl_format format);
|
||||
mesa_format format);
|
||||
|
||||
|
||||
extern gl_format
|
||||
extern mesa_format
|
||||
_mesa_choose_texture_format(struct gl_context *ctx,
|
||||
struct gl_texture_object *texObj,
|
||||
GLenum target, GLint level,
|
||||
|
|
@ -128,7 +128,7 @@ _mesa_max_texture_levels(struct gl_context *ctx, GLenum target);
|
|||
|
||||
extern GLboolean
|
||||
_mesa_test_proxy_teximage(struct gl_context *ctx, GLenum target, GLint level,
|
||||
gl_format format,
|
||||
mesa_format format,
|
||||
GLint width, GLint height, GLint depth, GLint border);
|
||||
|
||||
|
||||
|
|
@ -153,7 +153,7 @@ _mesa_legal_texture_dimensions(struct gl_context *ctx, GLenum target,
|
|||
GLint level, GLint width, GLint height,
|
||||
GLint depth, GLint border);
|
||||
|
||||
extern gl_format
|
||||
extern mesa_format
|
||||
_mesa_validate_texbuffer_format(const struct gl_context *ctx,
|
||||
GLenum internalFormat);
|
||||
|
||||
|
|
|
|||
|
|
@ -745,7 +745,7 @@ _mesa_get_fallback_texture(struct gl_context *ctx, gl_texture_index tex)
|
|||
GLubyte texel[4];
|
||||
struct gl_texture_object *texObj;
|
||||
struct gl_texture_image *texImage;
|
||||
gl_format texFormat;
|
||||
mesa_format texFormat;
|
||||
GLuint dims, face, numFaces = 1;
|
||||
GLenum target;
|
||||
|
||||
|
|
|
|||
|
|
@ -1081,7 +1081,7 @@ get_tex_level_parameter_image(struct gl_context *ctx,
|
|||
GLenum pname, GLint *params)
|
||||
{
|
||||
const struct gl_texture_image *img = NULL;
|
||||
gl_format texFormat;
|
||||
mesa_format texFormat;
|
||||
|
||||
img = _mesa_select_tex_image(ctx, texObj, target, level);
|
||||
if (!img || img->TexFormat == MESA_FORMAT_NONE) {
|
||||
|
|
@ -1237,7 +1237,7 @@ get_tex_level_parameter_buffer(struct gl_context *ctx,
|
|||
GLenum pname, GLint *params)
|
||||
{
|
||||
const struct gl_buffer_object *bo = texObj->BufferObject;
|
||||
gl_format texFormat = texObj->_BufferObjectFormat;
|
||||
mesa_format texFormat = texObj->_BufferObjectFormat;
|
||||
GLenum internalFormat = texObj->BufferObjectFormat;
|
||||
GLenum baseFormat = _mesa_get_format_base_format(texFormat);
|
||||
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ initialize_texture_fields(struct gl_context *ctx,
|
|||
struct gl_texture_object *texObj,
|
||||
GLint levels,
|
||||
GLsizei width, GLsizei height, GLsizei depth,
|
||||
GLenum internalFormat, gl_format texFormat)
|
||||
GLenum internalFormat, mesa_format texFormat)
|
||||
{
|
||||
const GLenum target = texObj->Target;
|
||||
const GLuint numFaces = _mesa_num_tex_faces(target);
|
||||
|
|
@ -350,7 +350,7 @@ texstorage(GLuint dims, GLenum target, GLsizei levels, GLenum internalformat,
|
|||
{
|
||||
struct gl_texture_object *texObj;
|
||||
GLboolean sizeOK, dimensionsOK;
|
||||
gl_format texFormat;
|
||||
mesa_format texFormat;
|
||||
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue