X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=docs%2Fsubmittingpatches.html;h=96aed289311572e74fb590d3699575652b089d07;hb=0fe2e04f2d8e95ac6163ffa9e78e82d83aeb02e9;hp=d3e86f5b4430464f257285616ed13f41a201117d;hpb=b571c075e9ab48ccbb71879861117171d2344c6b;p=mesa.git diff --git a/docs/submittingpatches.html b/docs/submittingpatches.html index d3e86f5b443..96aed289311 100644 --- a/docs/submittingpatches.html +++ b/docs/submittingpatches.html @@ -2,29 +2,31 @@ - Submitting patches + Submitting Patches
-

The Mesa 3D Graphics Library

+ The Mesa 3D Graphics Library
-

Submitting patches

+

Submitting Patches

Basic guidelines

@@ -34,14 +36,16 @@ perhaps, in very trivial cases.)
  • Code patches should follow Mesa coding conventions. -
  • Whenever possible, patches should only effect individual Mesa/Gallium +
  • Whenever possible, patches should only affect individual Mesa/Gallium components.
  • Patches should never introduce build breaks and should be bisectable (see git bisect.)
  • Patches should be properly formatted.
  • Patches should be sufficiently tested before submitting. -
  • Patches should be submitted to submitted to mesa-dev -for review using git send-email. +
  • Patches should be submitted +to mesa-dev or with +a merge request +for review. @@ -64,27 +68,39 @@ with a module name. Examples: if needed. For example:
         i965: Remove end-of-thread SEND alignment code.
    -    
    +
         This was present in Eric's initial implementation of the compaction code
         for Sandybridge (commit 077d01b6). There is no documentation saying this
         is necessary, and removing it causes no regressions in piglit on any
         platform.
     
  • A "Signed-off-by:" line is not required, but not discouraged either. -
  • If a patch address a bugzilla issue, that should be noted in the -patch comment. For example: +
  • If a patch addresses an issue in gitlab, use the Closes: tag +For example: +
    +    Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1
    +
    +

    Prefer the full url to just

    Closes: #1
    , since the url makes it +easier to get to the bug page from
    git log

    +Do not use the Fixes: tag for this! Mesa already uses Fixes for something else. + +
  • If a patch addresses a issue introduced with earlier commit, that should be +noted in the patch comment. For example:
    -   Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89689
    +   Fixes: d7b3707c612 "util/disk_cache: use stat() to check if entry is a directory"
     
    +
  • You can produce those fixes lines by running +
    git config --global alias.fixes "show -s --pretty='format:Fixes: %h (\"%s\")'"
    +once and then using
    git fixes <sha1>
  • If there have been several revisions to a patch during the review process, they should be noted such as in this example:
         st/mesa: add ARB_texture_stencil8 support (v4)
    -    
    +
         if we support stencil texturing, enable texture_stencil8
         there is no requirement to support native S8 for this,
         the texture can be converted to x24s8 fine.
    -    
    +
         v2: fold fixes from Marek in:
            a) put S8 last in the list
            b) fix renderable to always test for d/s renderable
    @@ -103,6 +119,22 @@ that should be documented with:
         Reviewed-by: Joe Hacker <jhacker@foo.com>
         Acked-by: Joe Hacker <jhacker@foo.com>
     
    +
  • If sending later revision of a patch, add all the tags - ack, r-b, +Cc: mesa-stable and/or other. This provides reviewers with quick feedback if the +patch has already been reviewed. +
  • In order for your patch to reach the prospective reviewer easier/faster, +use the script scripts/get_reviewer.pl to get a list of individuals and include +them in the CC list. +

    +Please use common sense and do not blindly add everyone. +

    +
    +    $ scripts/get_reviewer.pl --help # to get the help screen
    +    $ scripts/get_reviewer.pl -f src/egl/drivers/dri2/platform_android.c
    +    Rob Herring <robh@kernel.org> (reviewer:ANDROID EGL SUPPORT,added_lines:188/700=27%,removed_lines:58/283=20%)
    +    Tomasz Figa <tfiga@chromium.org> (reviewer:ANDROID EGL SUPPORT,authored:12/41=29%,added_lines:308/700=44%,removed_lines:115/283=41%)
    +    Emil Velikov <emil.l.velikov@gmail.com> (authored:13/41=32%,removed_lines:76/283=27%)
    +
    @@ -116,23 +148,46 @@ do whatever testing is prudent.

    You should always run the Mesa test suite before submitting patches. -The test suite can be run using the 'make check' command. All tests +The test suite can be run using the 'meson test' command. All tests must pass before patches will be accepted, this may mean you have to update the tests themselves.

    Whenever possible and applicable, test the patch with -Piglit and/or +Piglit and/or dEQP to check for regressions.

    +

    +As mentioned at the begining, patches should be bisectable. +A good way to test this is to make use of the `git rebase` command, +to run your tests on each commit. Assuming your branch is based off +origin/master, you can run: +

    +
    +$ git rebase --interactive --exec "meson test -C build/" origin/master
    +
    +

    +replacing "meson test" with whatever other test you want to +run. +

    + -

    Mailing Patches

    +

    Submitting Patches

    -Patches should be sent to the mesa-dev mailing list for review: +Patches may be submitted to the Mesa project by +email or with a +GitLab merge request. To prevent +duplicate code review, only use one method to submit your changes. +

    + +

    Mailing Patches

    + +

    +Patches may be sent to the mesa-dev mailing list for review: mesa-dev@lists.freedesktop.org. When submitting a patch make sure to use @@ -156,8 +211,85 @@ When submitting follow-up patches you should also login to state of your old patches to Superseded.

    +

    +Some companies' mail server automatically append a legal disclaimer, +usually containing something along the lines of "The information in this +email is confidential" and "distribution is strictly prohibited". +

    +

    +These legal notices prevent us from being able to accept your patch, +rendering the whole process pointless. Please make sure these are +disabled before sending your patches. (Note that you may need to contact +your email administrator for this.) +

    + +

    GitLab Merge Requests

    + +

    + GitLab Merge + Requests (MR) can also be used to submit patches for Mesa. +

    + +

    + If the MR may have interest for most of the Mesa community, you can + send an email to the mesa-dev email list including a link to the MR. + Don't send the patch to mesa-dev, just the MR link. +

    +

    + Add labels to your MR to help reviewers find it. For example: +

    + +

    + Tick the following when creating the MR. It allows developers to + rebase your work on top of master. +

    +
    Allow commits from members who can merge to the target branch
    +

    + If you revise your patches based on code review and push an update + to your branch, you should maintain a clean history + in your patches. There should not be "fixup" patches in the history. + The series should be buildable and functional after every commit + whenever you push the branch. +

    +

    + It is your responsibility to keep the MR alive and making progress, + as there are no guarantees that a Mesa dev will independently take + interest in it. +

    +

    + Some other notes: +

    + +

    Reviewing Patches

    +

    + To participate in code review, you should monitor the + + mesa-dev email list and the GitLab + Mesa Merge + Requests page. +

    +

    When you've reviewed a patch on the mailing list, please be unambiguous about your review. That is, state either @@ -184,11 +316,34 @@ which tells the patch author that the patch can be committed, as long as the issues are resolved first.

    +

    +These Reviewed-by, Acked-by, and Tested-by tags should also be amended +into commits in a MR before it is merged. +

    + +

    +When providing a Reviewed-by, Acked-by, or Tested-by tag in a gitlab MR, +enclose the tag in backticks: +

    +
    +  `Reviewed-by: Joe Hacker <jhacker@example.com>`
    +

    +This is the markdown format for literal, and will prevent gitlab from hiding +the < and > symbols. +

    + +

    +Review by non-experts is encouraged. Understanding how someone else +goes about solving a problem is a great way to learn your way around +the project. The submitter is expected to evaluate whether they have +an appropriate amount of review feedback from people who also +understand the code before merging their patches. +

    Nominating a commit for a stable branch

    -There are three ways to nominate patch for inclusion of the stable branch and +There are three ways to nominate a patch for inclusion in the stable branch and release.