[Mesa-dev] [PATCH 16/41] intel: Replace intel_texture_image::stencil_irb with intel_mipmap_tree::stencil_mt

Chad Versace chad.versace at linux.intel.com
Fri Nov 18 15:22:48 PST 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/18/2011 03:19 PM, Eric Anholt wrote:
> On Thu, 17 Nov 2011 19:58:43 -0800, Chad Versace <chad.versace at linux.intel.com> wrote:
>> For depthstencil textures using separate stencil, we embedded a stencil
>> buffer in intel_texture_image. The intention was that the embedded stencil
>> buffer would be the golden copy of the texture's stencil bits. When
>> necessary, we scattered/gathered the stencil bits between the texture
>> miptree and the embedded stencil buffer.
>>
>> This approach had a serious deficiency for mipmapped or multi-layer
>> textures. Any given moment the embedded stencil buffer was consistent with
>> exactly one miptree slice, the most recent one to be scattered. This
>> permitted tests of type A to pass, but broke tests of type B.
>>
>> Test A:
>>     1. Create a depthstencil texture.
>>     2. Upload data into (level=x1,layer=y1).
>>     3. Read and test stencil data at (level=x1, layer=y1).
>>     4. Upload data into (level=x2,layer=y2).
>>     5. Read and test stencil data at (level=x2, layer=y2).
>>
>> Test B:
>>     1. Create a depthstencil texture.
>>     2. Upload data into (level=x1,layer=y1).
>>     3. Upload data into (level=x2,layer=y2).
>>     4. Read and test stencil data at (level=x1, layer=y1).
>>     5. Read and test stencil data at (level=x2, layer=y2).
>>
>> Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
>> ---
>>  src/mesa/drivers/dri/intel/intel_fbo.c         |  116 +++++++++++----------
>>  src/mesa/drivers/dri/intel/intel_mipmap_tree.c |  134 +++++++++++++++++++++++-
>>  src/mesa/drivers/dri/intel/intel_mipmap_tree.h |   37 +++++++
>>  src/mesa/drivers/dri/intel/intel_tex.c         |   41 +++-----
>>  src/mesa/drivers/dri/intel/intel_tex_image.c   |  128 ----------------------
>>  src/mesa/drivers/dri/intel/intel_tex_obj.h     |   30 ------
>>  6 files changed, 248 insertions(+), 238 deletions(-)
>>
>> diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
>> index a61c74c..7dc0c53 100644
>> --- a/src/mesa/drivers/dri/intel/intel_fbo.c
>> +++ b/src/mesa/drivers/dri/intel/intel_fbo.c
>>  #ifdef I915
>>     (void) intel;
>>     if (intel->is_945)
>> @@ -103,6 +116,23 @@ intel_miptree_create_internal(struct intel_context *intel,
>>     brw_miptree_layout(intel, mt);
>>  #endif
>>  
>> +   if (intel->has_separate_stencil &&
>> +       _mesa_is_depthstencil_format(_mesa_get_format_base_format(format))) {
> 
> Shouldn't this be must_have_separate_stencil until patch 39/41?

You're correct. Thanks for the sharp eye. I'll fix that in the final patch.

- ----
Chad Versace
chad.versace at linux.intel.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJOxujHAAoJEAIvNt057x8iIM4P/jaFtwetRiv3r/sqpUPGq160
icpf3giCXwhFG3BpUgt8jU3neIftXsbC8eBS1TErrwtqtcu58otEGkqUDkQ1QiEz
9keLHmfbf/r9raJ8hvqbI/1WggSaiTEkYExkjX/USCr+WBzr8A/C90GarDWX/Up5
0mXuJrbcnITDwY4vh2iuh12JI+BOwBv+0RyYSfRM15N1fRwEvlsovasH3iEQzkWl
FOmqdg3qm4kWYVmhYZnu50dOpVgyT7J531gcbi3lBlVkKs5Wfzmrz8D130X6hlBV
+4s/r2Rou/KYzP8aqLfaygak34027lqyMF/aDC5MZnRDr9dfZ52zz0v2gXnJLrFQ
+Q+oLNBDLog82lLRo/yVxU0beaz9ywNdFhiqEATC2lQ3BLGJCW59j7Ygdd916reM
/TKj1AyXMcIKFHuCzmP18pFrHf7lOH7lE0HB/VWRl9LPpFmXzfnSC0Q0GD4+bP4P
043v67c7ZloJS8atBMvG7Gs24IeJDllwbh0lZrpAgWNjZiWq/f+x1Oxv9LcKmysL
x9i1G3DVHHj3rgw3jDU+L44n1B18CEaZ59e7W+JK+Fmnieih6u/FtrEva0/fiMNC
2jJ9e4buhj24yyz4O0L7XXjOFS2a0tfuvhXez26aIHBcVbemVbOFxldUeLs2xXwZ
2kipPUQrqvEc42TM7/6p
=tZBm
-----END PGP SIGNATURE-----


More information about the mesa-dev mailing list