mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-09 07:58:16 +02:00
vega: Rename pipe formats.
This commit is contained in:
parent
5706d7fcaf
commit
b306308757
5 changed files with 13 additions and 13 deletions
|
|
@ -67,7 +67,7 @@ static INLINE struct pipe_texture *create_texture_1d(struct vg_context *ctx,
|
|||
|
||||
memset(&templ, 0, sizeof(templ));
|
||||
templ.target = PIPE_TEXTURE_1D;
|
||||
templ.format = PIPE_FORMAT_A8R8G8B8_UNORM;
|
||||
templ.format = PIPE_FORMAT_B8G8R8A8_UNORM;
|
||||
templ.last_level = 0;
|
||||
templ.width0 = color_data_len;
|
||||
templ.height0 = 1;
|
||||
|
|
|
|||
|
|
@ -48,16 +48,16 @@ static enum pipe_format vg_format_to_pipe(VGImageFormat format)
|
|||
{
|
||||
switch(format) {
|
||||
case VG_sRGB_565:
|
||||
return PIPE_FORMAT_R5G6B5_UNORM;
|
||||
return PIPE_FORMAT_B5G6R5_UNORM;
|
||||
case VG_sRGBA_5551:
|
||||
return PIPE_FORMAT_A1R5G5B5_UNORM;
|
||||
return PIPE_FORMAT_B5G5R5A1_UNORM;
|
||||
case VG_sRGBA_4444:
|
||||
return PIPE_FORMAT_A4R4G4B4_UNORM;
|
||||
return PIPE_FORMAT_B4G4R4A4_UNORM;
|
||||
case VG_sL_8:
|
||||
case VG_lL_8:
|
||||
return PIPE_FORMAT_L8_UNORM;
|
||||
case VG_BW_1:
|
||||
return PIPE_FORMAT_A8R8G8B8_UNORM;
|
||||
return PIPE_FORMAT_B8G8R8A8_UNORM;
|
||||
case VG_A_8:
|
||||
return PIPE_FORMAT_A8_UNORM;
|
||||
#ifdef OPENVG_VERSION_1_1
|
||||
|
|
@ -66,7 +66,7 @@ static enum pipe_format vg_format_to_pipe(VGImageFormat format)
|
|||
return PIPE_FORMAT_A8_UNORM;
|
||||
#endif
|
||||
default:
|
||||
return PIPE_FORMAT_A8R8G8B8_UNORM;
|
||||
return PIPE_FORMAT_B8G8R8A8_UNORM;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -488,7 +488,7 @@ struct vg_mask_layer * mask_layer_create(VGint width, VGint height)
|
|||
|
||||
memset(&pt, 0, sizeof(pt));
|
||||
pt.target = PIPE_TEXTURE_2D;
|
||||
pt.format = PIPE_FORMAT_A8R8G8B8_UNORM;
|
||||
pt.format = PIPE_FORMAT_B8G8R8A8_UNORM;
|
||||
pt.last_level = 0;
|
||||
pt.width0 = width;
|
||||
pt.height0 = height;
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ static INLINE struct pipe_texture *create_gradient_texture(struct vg_paint *p)
|
|||
|
||||
memset(&templ, 0, sizeof(templ));
|
||||
templ.target = PIPE_TEXTURE_1D;
|
||||
templ.format = PIPE_FORMAT_A8R8G8B8_UNORM;
|
||||
templ.format = PIPE_FORMAT_B8G8R8A8_UNORM;
|
||||
templ.last_level = 0;
|
||||
templ.width0 = 1024;
|
||||
templ.height0 = 1;
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ create_texture(struct pipe_context *pipe, enum pipe_format format,
|
|||
templ.format = format;
|
||||
}
|
||||
else {
|
||||
templ.format = PIPE_FORMAT_A8R8G8B8_UNORM;
|
||||
templ.format = PIPE_FORMAT_B8G8R8A8_UNORM;
|
||||
}
|
||||
|
||||
templ.target = PIPE_TEXTURE_2D;
|
||||
|
|
@ -186,7 +186,7 @@ struct st_framebuffer * st_create_framebuffer(const void *visual,
|
|||
if (stencilFormat == depthFormat)
|
||||
stfb->dsrb = st_new_renderbuffer_fb(stencilFormat);
|
||||
else
|
||||
stfb->dsrb = st_new_renderbuffer_fb(PIPE_FORMAT_S8Z24_UNORM);
|
||||
stfb->dsrb = st_new_renderbuffer_fb(PIPE_FORMAT_Z24S8_UNORM);
|
||||
|
||||
/*### currently we always allocate it but it's possible it's
|
||||
not necessary if EGL_ALPHA_MASK_SIZE was 0
|
||||
|
|
@ -209,12 +209,12 @@ static void setup_new_alpha_mask(struct vg_context *ctx,
|
|||
struct pipe_texture *old_texture = stfb->alpha_mask;
|
||||
|
||||
/*
|
||||
we use PIPE_FORMAT_A8R8G8B8_UNORM because we want to render to
|
||||
we use PIPE_FORMAT_B8G8R8A8_UNORM because we want to render to
|
||||
this texture and use it as a sampler, so while this wastes some
|
||||
space it makes both of those a lot simpler
|
||||
*/
|
||||
stfb->alpha_mask =
|
||||
create_texture(pipe, PIPE_FORMAT_A8R8G8B8_UNORM, width, height);
|
||||
create_texture(pipe, PIPE_FORMAT_B8G8R8A8_UNORM, width, height);
|
||||
|
||||
if (!stfb->alpha_mask) {
|
||||
if (old_texture)
|
||||
|
|
@ -327,7 +327,7 @@ void st_resize_framebuffer(struct st_framebuffer *stfb,
|
|||
setup_new_alpha_mask(ctx, stfb, width, height);
|
||||
|
||||
pipe_texture_reference( &stfb->blend_texture, NULL );
|
||||
stfb->blend_texture = create_texture(ctx->pipe, PIPE_FORMAT_A8R8G8B8_UNORM,
|
||||
stfb->blend_texture = create_texture(ctx->pipe, PIPE_FORMAT_B8G8R8A8_UNORM,
|
||||
width, height);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue