New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 675709 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Task



Sign in to add a comment

gpu shader cache should not depend on //net

Project Member Reported by sadrul@chromium.org, Dec 19 2016

Issue description

The gpu shader cache code [1] currently has a dependency on //net. This is because the shader cache uses disk_cache, which lives in net. It'd be nice to not have this dependency. For example, the shader cache could use some interface for storing/retrieving the cache. The implementation that sits behind the interface could directly access the filesystem, or store the cache in an indexeddb, or talk to a filesystem service etc.

[1] https://cs.chromium.org/chromium/src/gpu/ipc/host/shader_disk_cache.h?l=18
 
Just to double check:
From a dependency inversion side, "the shader cache could use some interface" is something I interpret as meaning:
  - //gpu code defines some interface for shader caching
  - somewhere 'above' //gpu there exists a //net-dependent implementation (such as //content or //chrome) that implements that //gpu interface
  - somewhere 'above' //gpu (such as //content or //chrome), the //net-dependent implementation is injected into the //gpu code (such as by passing that interface to //gpu initialization code)

That doesn't address the //net->//gpu dependency that exists (indirectly), due to //net knowing that //gpu (or the future //content interface) is a consumer of the disk cache for disk-cache related stats, but that's more an issue for //net needing a 'stats' interface for the disk cache (so that such a //content or //chrome interface could know about different disk cache consumers)

Is that reasonably accurate?

What's not clear to me is where the "Something above //gpu and above //net but knows about both //gpu and //net" is. My understanding is the code originally lived in //chrome, then //content (both of which know about this), but was moved into //gpu due to non-//content consumers. Putting it in //components seems wrong (given the goal of //components), but is instinctively appealing.

Comment 2 by sadrul@chromium.org, Dec 19 2016

That is a correct explanation of what I tried to describe, yes.

One of the motivations for avoiding the direct dependence/use of disk_cache is that using a mojom service like indexeddb/filesystem would possibly allow the gpu-host to be sandboxed more than it currently is.

The //net dependency currently is in //gpu/ipc/host, which is a standalone target (in the sense that no other code in gpu depends on this code). So it could have lived elsewhere too (e.g. in //components/gpu_host). But I couldn't come up with a better location.
Project Member

Comment 3 by sheriffbot@chromium.org, Feb 16 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 4 by piman@chromium.org, Feb 16 2018

Components: -Internals>GPU Internals>GPU>Internals
Labels: -Type-Bug Type-Task
Status: Available (was: Untriaged)

Sign in to add a comment