[Mesa-stable] [Mesa-dev] [PATCH 05/15] mesa: Fix error condition for valid texture targets in glTexStorage* functions

Ian Romanick idr at freedesktop.org
Fri Jun 6 21:30:11 PDT 2014


On 06/06/2014 09:13 PM, Matt Turner wrote:
> On Fri, Jun 6, 2014 at 4:57 PM, Anuj Phogat <anuj.phogat at gmail.com> wrote:
>> Fixes gles3 Khronos CTS test: texture_storage_texture_targets
>>
>> Cc: <mesa-stable at lists.freedesktop.org>
>> Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
>> ---
>>  src/mesa/main/texstorage.c | 7 +++++++
>>  1 file changed, 7 insertions(+)
>>
>> diff --git a/src/mesa/main/texstorage.c b/src/mesa/main/texstorage.c
>> index 86c8f3c..44b5374 100644
>> --- a/src/mesa/main/texstorage.c
>> +++ b/src/mesa/main/texstorage.c
>> @@ -53,6 +53,13 @@
>>  static GLboolean
>>  legal_texobj_target(struct gl_context *ctx, GLuint dims, GLenum target)
>>  {
>> +   if (_mesa_is_gles3(ctx)
>> +       && target != GL_TEXTURE_2D
>> +       && target != GL_TEXTURE_CUBE_MAP
>> +       && target != GL_TEXTURE_3D
>> +       && target != GL_TEXTURE_2D_ARRAY)
> 
> Let's put && on the end of the previous line.

I usually like it better this way in Mesa.  The problem is the 3-space
indent puts the body of the if-statement at nearly the same indentation
as the line-wrapped if-condition.  That makes it really annoying to tell
which witch is which.  It's one of the few things I like better about
the kernel indentation of hard tab per level.

> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev



More information about the mesa-stable mailing list