OSDN Git Service

radeonsi: Reinitialize all descriptors in CE preamble.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Mon, 6 Jun 2016 20:49:57 +0000 (22:49 +0200)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 15 Jun 2016 08:29:13 +0000 (09:29 +0100)
commit28294573c737ff762b1c3f8d58bc78ddd010feca
treea004b24ca386e07681a97d692163f406909140e6
parent7bed792ebb765d791c605313e6277b5a59402773
radeonsi: Reinitialize all descriptors in CE preamble.

This fixes a problem with the CE preamble and restoring only stuff in the
preamble when needed.

To illustrate suppose we have two graphics IB's 1 and 2, which  are submitted in
that order. Furthermore suppose IB 1 does not use CE ram, but IB 2 does, and we
have a context switch at the start of IB 1, but not between IB 1 and IB 2.

The old code put the CE RAM loads in the preamble of IB 2. As the preamble of
IB 1 does not have the loads and the preamble of IB 2 does not get executed, the
old values are not load into CE RAM.

Fix this by always restoring the entire CE RAM.

v2: - Just load all descriptor set buffers instead of load and store the entire
      CE RAM.
    - Leave the ce_ram_dirty tracking in place for the non-preamble case.

Signed-off-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Note: This commit differs from the one in master - 54f755fa0fd
("radeonsi: Reinitialize all descriptors in CE preamble.")
src/gallium/drivers/radeonsi/si_descriptors.c
src/gallium/drivers/radeonsi/si_hw_context.c
src/gallium/drivers/radeonsi/si_state.h