[Piglit] [PATCH] fbo-3d: test both POT and NPOT depths

apinheiro apinheiro at igalia.com
Wed Jan 2 16:35:33 UTC 2019


On 2/1/19 16:09, Ilia Mirkin wrote:
> On Wed, Jan 2, 2019 at 5:21 AM apinheiro <apinheiro at igalia.com> wrote:
>> I have a nitpick comment below. You can ignore it in any case:
>>
>> Reviewed-by: Alejandro PiƱeiro <apinheiro at igalia.com>
>>
>> On 2/1/19 1:02, Ilia Mirkin wrote:
>>> This demonstrates issues on nv4x, which will use a different layout for
>>> POT vs NPOT sizes.
>>>
>>> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
>>> ---
>>>  tests/fbo/fbo-3d.c | 31 ++++++++++++++++++++++---------
>>>  1 file changed, 22 insertions(+), 9 deletions(-)
>>>
>>> diff --git a/tests/fbo/fbo-3d.c b/tests/fbo/fbo-3d.c
>>> index e622c1df8..36dbed4e0 100644
>>> --- a/tests/fbo/fbo-3d.c
>>> +++ b/tests/fbo/fbo-3d.c
>>> @@ -58,16 +58,12 @@ float depth_color[NUM_DEPTHS][4] = {
>>>       {0.0, 1.0, 1.0, 0.0},
>>>  };
>>>
>>> -int pot_depth;
>>> -
>>>  static int
>>> -create_3d_fbo(void)
>>> +create_3d_fbo(int pot_depth)
>>>  {
>>>       GLuint tex, fb;
>>>       GLenum status;
>>>       int depth;
>>> -     pot_depth = piglit_is_extension_supported("GL_ARB_texture_non_power_of_two") ?
>>> -             NUM_DEPTHS: POT_DEPTHS;
>>>
>>>       glGenTextures(1, &tex);
>>>       glBindTexture(GL_TEXTURE_3D, tex);
>>> @@ -109,7 +105,6 @@ create_3d_fbo(void)
>>>               piglit_draw_rect(-2, -2, BUF_WIDTH + 2, BUF_HEIGHT + 2);
>>>       }
>>>
>>> -
>> Is this new line removal really needed?
> Not _really_, but the two blank lines were jarring to me. Figured I'd
> fix it up while I was at it. Do you feel like 2 newlines is the
> appropriate quantity in this situation?


Ah ok, I didn't realize there was 2 newlines. Yes, I think that it is ok
to remove one.

>
>>
>>>  done:
>>>       glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, piglit_winsys_fbo);
>>>       glDeleteFramebuffersEXT(1, &fb);
>>> @@ -121,7 +116,7 @@ done:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pEpkey.asc
Type: application/pgp-keys
Size: 1546 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20190102/e2fbc86b/attachment.key>


More information about the Piglit mailing list