Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
S
swiftshader
  • Project
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Chen Yisong
  • swiftshader
  • Repository

Switch branch/tag
  • swiftshader
  • src
  • Device
  • PixelProcessor.cpp
Find file
BlameHistoryPermalink
  • Nicolas Capens's avatar
    Fix handling Memset<> assignment and comparison · 1885f694
    Nicolas Capens authored Mar 23, 2020
    Previously the compiler would implicitly declare a copy constructor and
    assignment operator for classes derived from Memset<>, if they didn't
    have user-defined ones. This can cause them to have uninitialized
    padding bytes. By defining them ourselves using memcpy() we can ensure
    they're zero-initialized.
    
    Also define equality and less-than operators. The latter makes classes
    derived from Memset<> suitable as std::map<> keys.
    
    is_memcmparable<> now no longer works on classed derived from Memset<>,
    because it uses std::is_trivially_copyable<> which isn't true when a
    user-defined copy constructor or assignment operator is provided.
    Instead just rely on Memset<>'s new equality operators.
    
    Bug: b/131246679
    Change-Id: I6e4963db8186955d8d3d3ef356fa42ef6a024c64
    Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/42728
    Presubmit-Ready: Nicolas Capens <nicolascapens@google.com>
    Reviewed-by: 's avatarAntonio Maiorano <amaiorano@google.com>
    Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
    Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
    1885f694
PixelProcessor.cpp 5.22 KB
EditWeb IDE
×

Replace PixelProcessor.cpp

Attach a file by drag & drop or click to upload


Cancel
A new branch will be created in your fork and a new merge request will be started.