Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • mesa mesa
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,064
    • Issues 3,064
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1,011
    • Merge requests 1,011
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Due to an influx of spam, we have had to impose restrictions on new accounts. Please see this wiki page for instructions on how to get full permissions. Sorry for the inconvenience.

Update #1:

Due to abusive users subverting our CI facilities to mine cryptocurrency, breaking out of the container sandbox in the process, we have been forced to take actions to limit the usage of the public runners to official projects only.

The policy will be enforced on 2023-03-23 (or before if we detect abuses).

Please see this issue for more context and to see if and how you are impacted.

  • MesaMesa
  • mesamesa
  • Merge requests
  • !13834

lavapipe: fix trivial strict aliasing warning

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Filip Gawin requested to merge gawin/mesa:lavapipe/aliasing into main Nov 17, 2021
  • Overview 4
  • Commits 1
  • Pipelines 4
  • Changes 2
struct pipe_query_data_pipeline_statistics pipeline_statistics;

which has body:

struct pipe_query_data_pipeline_statistics
{
   uint64_t ia_vertices;    /**< Num vertices read by the vertex fetcher. */
   uint64_t ia_primitives;  /**< Num primitives read by the vertex fetcher. */
   uint64_t vs_invocations; /**< Num vertex shader invocations. */
   uint64_t gs_invocations; /**< Num geometry shader invocations. */
   uint64_t gs_primitives;  /**< Num primitives output by a geometry shader. */
   uint64_t c_invocations;  /**< Num primitives sent to the rasterizer. */
   uint64_t c_primitives;   /**< Num primitives that were rendered. */
   uint64_t ps_invocations; /**< Num pixel shader invocations. */
   uint64_t hs_invocations; /**< Num hull shader invocations. */
   uint64_t ds_invocations; /**< Num domain shader invocations. */
   uint64_t cs_invocations; /**< Num compute shader invocations. */
};

warning:

../gawin/src/gallium/frontends/lavapipe/lvp_query.c: In function ‘lvp_GetQueryPoolResults’:
../gawin/src/gallium/frontends/lavapipe/lvp_query.c:125:47: warning: dereferencing type-punned pointer might break strict-aliasing rules [-Wstrict-aliasing]
  125 |                uint64_t *pstats = (uint64_t *)&result.pipeline_statistics;
      |                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../gawin/src/gallium/frontends/lavapipe/lvp_query.c:152:47: warning: dereferencing type-punned pointer might break strict-aliasing rules [-Wstrict-aliasing]
  152 |                uint64_t *pstats = (uint64_t *)&result.pipeline_statistics;
      |                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
[3/4] Linking static target src/gallium/frontends/lavapipe/liblavapipe_st.a

(If you want I can wrap it with union to be able easily access it as an array. )

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: lavapipe/aliasing