search for: texformat

Displaying 8 results from an estimated 8 matches for "texformat".

Did you mean: textformat
2014 Sep 13
2
[PATCH] nouveau: fix glCompressedTexImage
...+nouveau_compressed_copy(struct gl_context *ctx, GLint dims, + struct gl_texture_image *ti, + GLsizei width, GLsizei height, GLsizei depth, + const GLvoid *src, GLvoid *dst, int row_stride) +{ + struct compressed_pixelstore store; + int i; + + _mesa_compute_compressed_pixelstore(dims, ti->TexFormat, + width, height, depth, + &ctx->Unpack, &store); + + src += store.SkipBytes; + + assert(store.CopySlices == 1); + + /* copy rows of blocks */ + for (i = 0; i < store.CopyRowsPerSlice; i++) { + memcpy(dst, src, store.CopyBytesPerRow); + dst += row_stride; + src += s...
2014 Sep 14
1
[PATCH] nouveau: fix glCompressedTexImage
...GLsizei width, GLsizei height, GLsizei depth, >> + const GLvoid *src, GLvoid *dst, int row_stride) >> +{ >> + struct compressed_pixelstore store; >> + int i; >> + >> + _mesa_compute_compressed_pixelstore(dims, ti->TexFormat, >> + width, height, depth, >> + &ctx->Unpack, &store); >> + >> + src += store.SkipBytes; >> + >> + assert(store.CopySlices == 1); >> + >> + /* copy...
2012 Jul 06
0
[PATCH] dri/nouveau: Add AllocTextureImageBuffer() implementation
...static struct gl_texture_object * nouveau_texture_new(struct gl_context *ctx, GLuint name, GLenum target) @@ -71,12 +72,64 @@ nouveau_teximage_new(struct gl_context *ctx) return &nti->base.Base; } +static unsigned +get_teximage_placement(struct gl_texture_image *ti) +{ + if (ti->TexFormat == MESA_FORMAT_A8 || + ti->TexFormat == MESA_FORMAT_L8 || + ti->TexFormat == MESA_FORMAT_I8) + /* 1 cpp formats will have to be swizzled by the CPU, + * so leave them in system RAM for now. */ + return NOUVEAU_BO_MAP; + else + return NOUVEAU_BO_GART | NOUVEAU_BO_MAP; +} + +static...
2014 Sep 14
0
[PATCH] nouveau: fix glCompressedTexImage
...ext *ctx, GLint dims, > + struct gl_texture_image *ti, > + GLsizei width, GLsizei height, GLsizei depth, > + const GLvoid *src, GLvoid *dst, int row_stride) > +{ > + struct compressed_pixelstore store; > + int i; > + > + _mesa_compute_compressed_pixelstore(dims, ti->TexFormat, > + width, height, depth, > + &ctx->Unpack, &store); > + > + src += store.SkipBytes; > + > + assert(store.CopySlices == 1); > + > + /* copy rows of blocks */ > + for (i = 0; i < store.CopyRowsPerSlice; i++) { > + memcpy(dst, src, store.C...
2014 Jan 15
1
[PATCH v2] nouveau: add framebuffer validation callback
...attachment *color = + &fb->Attachment[BUFFER_COLOR0]; + struct gl_renderbuffer_attachment *depth = + &fb->Attachment[BUFFER_DEPTH]; + int color_bpp = 0, zeta_bpp; + + if (color->Type == GL_TEXTURE) { + color_bpp = validate_format_bpp( + color->Renderbuffer->TexImage->TexFormat); + if (!color_bpp) + goto err; + } + + if (depth->Type == GL_TEXTURE) { + zeta_bpp = validate_format_bpp( + depth->Renderbuffer->TexImage->TexFormat); + if (!zeta_bpp) + goto err; + /* NV04/NV05 requires same bpp-ness for color/zeta */ + if (context_chipset(ctx) < 0x10 &...
2014 Jan 10
2
[PATCH] nouveau: add framebuffer validation callback
...ts; i++) { + struct gl_renderbuffer_attachment *rba = + &fb->Attachment[BUFFER_COLOR0 + i]; + if (rba->Type == GL_NONE) + continue; + + count++; + if (rba->Type != GL_TEXTURE) + continue; + + if (!drv->is_rt_format_supported( + rba->Renderbuffer->TexImage->TexFormat)) + goto err; + } + if (count > 1) + goto err; + + if (fb->Attachment[BUFFER_DEPTH].Type == GL_TEXTURE) { + struct gl_texture_image *ti = + fb->Attachment[BUFFER_DEPTH].Renderbuffer->TexImage; + if (!drv->is_rt_format_supported(ti->TexFormat)) + goto err; + } + + return;...
2012 Apr 06
1
[WIP PATCH] dri/nouveau: Add S3TC support for nv20.
...const struct gl_pixelstore_attrib *packing) + const struct gl_pixelstore_attrib *packing, + GLboolean compressed) { struct gl_texture_object *t = ti->TexObject; const GLuint level = ti->Level; @@ -472,9 +510,16 @@ nouveau_teximage(struct gl_context *ctx, GLint dims, ti->TexFormat, width, height); nti->base.RowStride = s->pitch / s->cpp; - pixels = _mesa_validate_pbo_teximage(ctx, dims, width, height, depth, - format, type, pixels, packing, - "glTexImage"); + if (compressed) { + pixels = _mesa_validate_pbo_compressed_teximage(ctx, +...
2014 Jan 14
0
[PATCH] nouveau: add framebuffer validation callback
...ba = > + &fb->Attachment[BUFFER_COLOR0 + i]; > + if (rba->Type == GL_NONE) > + continue; > + > + count++; > + if (rba->Type != GL_TEXTURE) > + continue; > + > + if (!drv->is_rt_format_supported( > + rba->Renderbuffer->TexImage->TexFormat)) > + goto err; > + } > + if (count > 1) > + goto err; > + > + if (fb->Attachment[BUFFER_DEPTH].Type == GL_TEXTURE) { > + struct gl_texture_image *ti = > + fb->Attachment[BUFFER_DEPTH].Renderbuffer->TexImage; > + if (!drv->is_rt_format_supported(ti-&...