drm/vmwgfx: Be more restrictive when dirtying resources
Currently we flag resources as dirty (GPU contents not yet read back to the backing MOB) whenever they have been part of a command stream. Obviously many resources can't be dirty and others can only be dirty when written to by the GPU. That is when they are either bound to the context as render-targets, depth-stencil, copy / clear destinations and stream-output targets, or similarly when there are corresponding views into them. So mark resources dirty only in these special cases. Context- and cotable resources are always marked dirty when referenced. This is important for upcoming emulated coherent memory, since we can avoid issuing automatic readbacks to non-dirty resources when the CPU tries to access part of the backing MOB. Testing: Unigine Heaven with max GPU memory set to 256MB resulting in heavy resource thrashing. --- v2: Addressed review comments by Deepak Rawat. v3: Added some documentation Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Deepak Rawat <drawat@vmware.com>
This commit is contained in:

committed by
Deepak Rawat

parent
14d2bd53a4
commit
a9f58c456e
@@ -205,5 +205,7 @@ extern void vmw_binding_state_free(struct vmw_ctx_binding_state *cbs);
|
||||
extern struct list_head *
|
||||
vmw_binding_state_list(struct vmw_ctx_binding_state *cbs);
|
||||
extern void vmw_binding_state_reset(struct vmw_ctx_binding_state *cbs);
|
||||
extern u32 vmw_binding_dirtying(enum vmw_ctx_binding_type binding_type);
|
||||
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user