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
  • Vulkan
  • VkShaderModule.hpp
Find file
BlameHistoryPermalink
  • Nicolas Capens's avatar
    Avoid recompiling identical SPIR-V code · 4aa4fcd6
    Nicolas Capens authored Jun 19, 2019
    We were creating SpirvShader objects for every shader stage of the
    pipeline, each with their own unique serial ID. This caused us to
    compile the same SPIR-V code over an over again when multiple pipelines
    are created from the same shader module(s).
    
    This change essentially moves the serial ID to the shader module. Things
    that still require us to recompile code from the same shader module are
    the entry point specification, and specialization constants. The former
    is taken into account by using a 64-bit ID consisting of the module ID
    and entry point ID. For the latter we assume any use of specialization
    constants will result in a unique SPIR-V binary. This is conservative
    and may still lead to unnecessary recompiles.
    
    This change also minimizes the state passed to SpirvShader, to prevent
    specialization on state not taken into account by the routine caches.
    
    Bug: b/135609394
    Tests: dEQP-VK.pipeline.render_to_image.core.*.huge.*
    Change-Id: I204e812265067462f8019af9f6b7b3067ef5dc7f
    Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33109
    Presubmit-Ready: Nicolas Capens <nicolascapens@google.com>
    Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
    Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
    Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com>
    4aa4fcd6
VkShaderModule.hpp 1.66 KB
EditWeb IDE
×

Replace VkShaderModule.hpp

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.