Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add trace for vaExportSurfaceHandle #724

Merged
merged 1 commit into from
Jul 20, 2023
Merged

Conversation

MicroYY
Copy link
Contributor

@MicroYY MicroYY commented Jul 3, 2023

No description provided.

@MicroYY MicroYY force-pushed the trace_export branch 6 times, most recently from 5724592 to c87aa01 Compare July 3, 2023 06:41

VADRMPRIMESurfaceDescriptor *desc = (VADRMPRIMESurfaceDescriptor *)descriptor;

va_TraceMsg(trace_ctx, "\tfourcc = %u\n", desc->fourcc);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will crash if descriptor is NULL. Parent function (vaExportSurfaceHandle) does not check that (and it should not). Add check here, please.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in last version, see line 6343 above.

va/va_trace.c Outdated
}

DPY2TRACE_VIRCTX_EXIT(pva_trace);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add empty line in end of file

va_TraceMsg(trace_ctx, "\tmemType = 0x%08x\n", memType);
va_TraceMsg(trace_ctx, "\tflags = 0x%08x\n", flags);

VADRMPRIMESurfaceDescriptor *desc = (VADRMPRIMESurfaceDescriptor *)descriptor;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As noted at

libva/va/va.h

Lines 4054 to 4055 in 984dfee

* with the handle details. The type of this structure depends on
* the value of mem_type.

You can't assume it's VADRMPRIMESurfaceDescriptor without checking memType.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in last version, see line 6337 above.

Copy link
Contributor

@dvrogozh dvrogozh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

va_TraceMsg(trace_ctx, "\tmemType = 0x%08x\n", memType);
va_TraceMsg(trace_ctx, "\tflags = 0x%08x\n", flags);

VADRMPRIMESurfaceDescriptor *desc = (VADRMPRIMESurfaceDescriptor *)descriptor;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in last version, see line 6337 above.


VADRMPRIMESurfaceDescriptor *desc = (VADRMPRIMESurfaceDescriptor *)descriptor;

va_TraceMsg(trace_ctx, "\tfourcc = %u\n", desc->fourcc);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in last version, see line 6343 above.

Copy link
Contributor

@FurongZhang FurongZhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@XinfengZhang XinfengZhang merged commit c033948 into intel:master Jul 20, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants