projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
82846fe
)
mesa: remove gl_renderbuffer:RowStride field
author
Brian Paul
<brianp@vmware.com>
Mon, 16 Jan 2012 18:48:18 +0000
(11:48 -0700)
committer
Brian Paul
<brianp@vmware.com>
Tue, 24 Jan 2012 21:12:24 +0000
(14:12 -0700)
src/mesa/drivers/dri/intel/intel_fbo.c
patch
|
blob
|
history
src/mesa/drivers/dri/intel/intel_span.c
patch
|
blob
|
history
src/mesa/drivers/dri/radeon/radeon_span.c
patch
|
blob
|
history
src/mesa/drivers/dri/swrast/swrast.c
patch
|
blob
|
history
src/mesa/main/mtypes.h
patch
|
blob
|
history
src/mesa/swrast/s_drawpix.c
patch
|
blob
|
history
src/mesa/swrast/s_renderbuffer.c
patch
|
blob
|
history
src/mesa/swrast/s_texrender.c
patch
|
blob
|
history
src/mesa/swrast/s_texture.c
patch
|
blob
|
history
diff --git
a/src/mesa/drivers/dri/intel/intel_fbo.c
b/src/mesa/drivers/dri/intel/intel_fbo.c
index d3c29244ddfc9328d3f1895d9dc12b7cbce00636..bd4fc7f589dfe0a59d22c5b365ebc5b9da356d07 100644
(file)
--- a/
src/mesa/drivers/dri/intel/intel_fbo.c
+++ b/
src/mesa/drivers/dri/intel/intel_fbo.c
@@
-135,7
+135,7
@@
intel_map_renderbuffer(struct gl_context *ctx,
if (!irb && rb->Data) {
/* this is a malloc'd renderbuffer (accum buffer) */
GLint bpp = _mesa_get_format_bytes(rb->Format);
if (!irb && rb->Data) {
/* this is a malloc'd renderbuffer (accum buffer) */
GLint bpp = _mesa_get_format_bytes(rb->Format);
- GLint rowStride = rb->RowStride
* bpp
;
+ GLint rowStride = rb->RowStride
Bytes
;
*out_map = (GLubyte *) rb->Data + y * rowStride + x * bpp;
*out_stride = rowStride;
return;
*out_map = (GLubyte *) rb->Data + y * rowStride + x * bpp;
*out_stride = rowStride;
return;
diff --git
a/src/mesa/drivers/dri/intel/intel_span.c
b/src/mesa/drivers/dri/intel/intel_span.c
index d6b4d0f1c85dd50ff4776738afd1eb7e30ed38b4..34bcd28f9a25b96f69c3c8b0eac2839cd2d50ba6 100644
(file)
--- a/
src/mesa/drivers/dri/intel/intel_span.c
+++ b/
src/mesa/drivers/dri/intel/intel_span.c
@@
-133,7
+133,6
@@
intel_renderbuffer_map(struct intel_context *intel, struct gl_renderbuffer *rb)
GL_MAP_READ_BIT | GL_MAP_WRITE_BIT,
&map, &stride);
rb->Map = map;
GL_MAP_READ_BIT | GL_MAP_WRITE_BIT,
&map, &stride);
rb->Map = map;
- rb->RowStride = stride / _mesa_get_format_bytes(rb->Format);
rb->RowStrideBytes = stride;
}
rb->RowStrideBytes = stride;
}
@@
-158,7
+157,6
@@
intel_renderbuffer_unmap(struct intel_context *intel,
ctx->Driver.UnmapRenderbuffer(ctx, rb);
rb->Map = NULL;
ctx->Driver.UnmapRenderbuffer(ctx, rb);
rb->Map = NULL;
- rb->RowStride = 0;
rb->RowStrideBytes = 0;
}
rb->RowStrideBytes = 0;
}
diff --git
a/src/mesa/drivers/dri/radeon/radeon_span.c
b/src/mesa/drivers/dri/radeon/radeon_span.c
index be5a91340faa8dfaed67af95424b8c319b4f4cd4..6588ae82494e983f5675e82afe84b74a552866ee 100644
(file)
--- a/
src/mesa/drivers/dri/radeon/radeon_span.c
+++ b/
src/mesa/drivers/dri/radeon/radeon_span.c
@@
-65,7
+65,6
@@
radeon_renderbuffer_map(struct gl_context *ctx, struct gl_renderbuffer *rb)
&map, &stride);
rb->Map = map;
&map, &stride);
rb->Map = map;
- rb->RowStride = stride / _mesa_get_format_bytes(rb->Format);
rb->RowStrideBytes = stride;
}
rb->RowStrideBytes = stride;
}
@@
-79,7
+78,6
@@
radeon_renderbuffer_unmap(struct gl_context *ctx, struct gl_renderbuffer *rb)
ctx->Driver.UnmapRenderbuffer(ctx, rb);
rb->Map = NULL;
ctx->Driver.UnmapRenderbuffer(ctx, rb);
rb->Map = NULL;
- rb->RowStride = 0;
rb->RowStrideBytes = 0;
}
rb->RowStrideBytes = 0;
}
diff --git
a/src/mesa/drivers/dri/swrast/swrast.c
b/src/mesa/drivers/dri/swrast/swrast.c
index e7f121ecf7c30fca5de06e6830d30ed1debbef6c..efc552725081790e88345b586ee2136a47b2dca9 100644
(file)
--- a/
src/mesa/drivers/dri/swrast/swrast.c
+++ b/
src/mesa/drivers/dri/swrast/swrast.c
@@
-292,7
+292,6
@@
swrast_alloc_front_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
rb->Data = NULL;
rb->Width = width;
rb->Height = height;
rb->Data = NULL;
rb->Width = width;
rb->Height = height;
- rb->RowStride = width;
xrb->pitch = bytes_per_line(width * xrb->bpp, 32);
return GL_TRUE;
xrb->pitch = bytes_per_line(width * xrb->bpp, 32);
return GL_TRUE;
@@
-387,7
+386,7
@@
swrast_map_renderbuffer(struct gl_context *ctx,
struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb);
GLubyte *map = rb->Data;
int cpp = _mesa_get_format_bytes(rb->Format);
struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb);
GLubyte *map = rb->Data;
int cpp = _mesa_get_format_bytes(rb->Format);
- int stride = rb->
RowStride
* cpp;
+ int stride = rb->
Width
* cpp;
if (rb->AllocStorage == swrast_alloc_front_storage) {
__DRIdrawable *dPriv = xrb->dPriv;
if (rb->AllocStorage == swrast_alloc_front_storage) {
__DRIdrawable *dPriv = xrb->dPriv;
diff --git
a/src/mesa/main/mtypes.h
b/src/mesa/main/mtypes.h
index 093b0e4d4670c8e4270478f865c41e585545bd68..22bcfa30e2d319b0c662603c7bc2285e6d3f5916 100644
(file)
--- a/
src/mesa/main/mtypes.h
+++ b/
src/mesa/main/mtypes.h
@@
-2558,10
+2558,9
@@
struct gl_renderbuffer
GL_STENCIL_INDEX. */
gl_format Format; /**< The actual renderbuffer memory format */
GL_STENCIL_INDEX. */
gl_format Format; /**< The actual renderbuffer memory format */
- /* XXX the following 3 fields are obsolete and wil go away */
- GLint RowStride; /**< Padded width in units of pixels */
- GLenum DataType; /**< Type of values passed to the Get/Put functions */
+ /* XXX the following fields are obsolete and wil go away */
GLvoid *Data; /**< This may not be used by some kinds of RBs */
GLvoid *Data; /**< This may not be used by some kinds of RBs */
+ GLenum DataType; /**< Type of values passed to the Get/Put functions */
/** The following fields are only valid while the buffer is mapped */
GLubyte *Map;
/** The following fields are only valid while the buffer is mapped */
GLubyte *Map;
diff --git
a/src/mesa/swrast/s_drawpix.c
b/src/mesa/swrast/s_drawpix.c
index 5828a789ab9e597609c00f4f7a85c1d73fba1138..5050ad92c23970f04d62fa5c813809de56df6cd8 100644
(file)
--- a/
src/mesa/swrast/s_drawpix.c
+++ b/
src/mesa/swrast/s_drawpix.c
@@
-522,7
+522,7
@@
fast_draw_depth_stencil(struct gl_context *ctx, GLint x, GLint y,
srcRowStride = _mesa_image_row_stride(unpack, width, format, type);
dst = _swrast_pixel_address(rb, x, y);
srcRowStride = _mesa_image_row_stride(unpack, width, format, type);
dst = _swrast_pixel_address(rb, x, y);
- dstRowStride = rb->RowStride
* 4
;
+ dstRowStride = rb->RowStride
Bytes
;
for (i = 0; i < height; i++) {
_mesa_pack_uint_24_8_depth_stencil_row(rb->Format, width,
for (i = 0; i < height; i++) {
_mesa_pack_uint_24_8_depth_stencil_row(rb->Format, width,
diff --git
a/src/mesa/swrast/s_renderbuffer.c
b/src/mesa/swrast/s_renderbuffer.c
index 267ec3b15013c2f7175f9817b59a5f250d59f83b..2ef3e030cc293dd46dbe13b3798b9630560a515f 100644
(file)
--- a/
src/mesa/swrast/s_renderbuffer.c
+++ b/
src/mesa/swrast/s_renderbuffer.c
@@
-214,7
+214,7
@@
soft_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
rb->Data = NULL;
}
rb->Data = NULL;
}
- rb->RowStride
= width
;
+ rb->RowStride
Bytes = width * _mesa_get_format_bytes(rb->Format)
;
if (width > 0 && height > 0) {
/* allocate new buffer storage */
if (width > 0 && height > 0) {
/* allocate new buffer storage */
@@
-223,7
+223,6
@@
soft_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
if (rb->Data == NULL) {
rb->Width = 0;
rb->Height = 0;
if (rb->Data == NULL) {
rb->Width = 0;
rb->Height = 0;
- rb->RowStride = 0;
_mesa_error(ctx, GL_OUT_OF_MEMORY,
"software renderbuffer allocation (%d x %d x %d)",
width, height, _mesa_get_format_bytes(rb->Format));
_mesa_error(ctx, GL_OUT_OF_MEMORY,
"software renderbuffer allocation (%d x %d x %d)",
width, height, _mesa_get_format_bytes(rb->Format));
@@
-263,7
+262,7
@@
_swrast_map_soft_renderbuffer(struct gl_context *ctx,
{
GLubyte *map = rb->Data;
int cpp = _mesa_get_format_bytes(rb->Format);
{
GLubyte *map = rb->Data;
int cpp = _mesa_get_format_bytes(rb->Format);
- int stride = rb->
RowStride
* cpp;
+ int stride = rb->
Width
* cpp;
ASSERT(rb->Data);
ASSERT(rb->Data);
diff --git
a/src/mesa/swrast/s_texrender.c
b/src/mesa/swrast/s_texrender.c
index 1adf281fbd5ce28f9df527831751c1e1c4c5b8c6..4a9443103765e627707b4b68e4ef09cef1fa8f26 100644
(file)
--- a/
src/mesa/swrast/s_texrender.c
+++ b/
src/mesa/swrast/s_texrender.c
@@
-127,7
+127,6
@@
update_wrapper(struct gl_context *ctx, struct gl_renderbuffer_attachment *att)
trb->Base.Width = trb->TexImage->Base.Width;
trb->Base.Height = trb->TexImage->Base.Height;
trb->Base.Width = trb->TexImage->Base.Width;
trb->Base.Height = trb->TexImage->Base.Height;
- trb->Base.RowStride = trb->TexImage->RowStride;
trb->Base.InternalFormat = trb->TexImage->Base.InternalFormat;
trb->Base.Format = trb->TexImage->Base.TexFormat;
trb->Base.InternalFormat = trb->TexImage->Base.InternalFormat;
trb->Base.Format = trb->TexImage->Base.TexFormat;
diff --git
a/src/mesa/swrast/s_texture.c
b/src/mesa/swrast/s_texture.c
index b98195e7489cef6cd96ef6aff2a9296f1afb9e21..0453640c0df6fdd6c3a6383531c19f8d2a802565 100644
(file)
--- a/
src/mesa/swrast/s_texture.c
+++ b/
src/mesa/swrast/s_texture.c
@@
-374,7
+374,6
@@
unmap_attachment(struct gl_context *ctx,
}
rb->Map = NULL;
}
rb->Map = NULL;
- rb->RowStrideBytes = 0;
}
}