[Mesa-dev] [PATCH v2 2/4] mesa: wire up EmitStringMarker for KHR_debug
Rob Clark
robdclark at gmail.com
Wed Jan 20 13:59:27 PST 2016
On Wed, Jan 20, 2016 at 3:40 PM, Ian Romanick <idr at freedesktop.org> wrote:
> On 01/20/2016 12:34 PM, Matt Turner wrote:
>> On Wed, Jan 20, 2016 at 11:32 AM, Rob Clark <robdclark at gmail.com> wrote:
>>> From: Rob Clark <robclark at freedesktop.org>
>>>
>>> The extension spec[1] describes DEBUG_TYPE_MARKER as "Annotation of the
>>> command stream". So for DEBUG_TYPE_MARKER, also pass the buf to the
>>> driver's EmitStringMarker() to be inserted in the command stream.
>>>
>>> [1] https://www.opengl.org/registry/specs/KHR/debug.txt
>>>
>>> Signed-off-by: Rob Clark <robclark at freedesktop.org>
>>> ---
>>> src/mesa/main/errors.c | 7 +++++++
>>> 1 file changed, 7 insertions(+)
>>>
>>> diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c
>>> index fc3c6d0..bb66141 100644
>>> --- a/src/mesa/main/errors.c
>>> +++ b/src/mesa/main/errors.c
>>> @@ -1018,6 +1018,13 @@ _mesa_DebugMessageInsert(GLenum source, GLenum type, GLuint id,
>>> gl_enum_to_debug_type(type), id,
>>> gl_enum_to_debug_severity(severity),
>>> length, buf);
>>> +
>>> + if ((type == GL_DEBUG_TYPE_MARKER) && ctx->Driver.EmitStringMarker) {
>>
>> No need for parentheses around the == expression.
>
> I was just going to say, "If krh reviewed this, he would say...".
I guess I'm in the minority, but I never understood the whole
stinginess with paren's.. I mean, it's not like we have to transmit
the mesa codebase by satellite to mars or anything..
otoh, especially in more complex conditional statements, if you are
looking at some other leg of the parse-tree, some extra paren's are
nice since you don't have to read the unrelated side of the expression
but just match paren's.. I guess it's just me, but it helps me read
the code faster when breaking down the structure of the conditional
;-)
BR,
-R
> With that change, this patch is
>
> Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
More information about the mesa-dev
mailing list