gallium/radeon: require both WRITE and FLUSH_EXPLICIT in buffer_flush_region

spotted randomly.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
This commit is contained in:
Marek Olšák 2017-05-03 01:23:54 +02:00
parent b8e552424e
commit 42fe45b451

View file

@ -482,8 +482,10 @@ static void r600_buffer_flush_region(struct pipe_context *ctx,
struct pipe_transfer *transfer,
const struct pipe_box *rel_box)
{
if (transfer->usage & (PIPE_TRANSFER_WRITE |
PIPE_TRANSFER_FLUSH_EXPLICIT)) {
unsigned required_usage = PIPE_TRANSFER_WRITE |
PIPE_TRANSFER_FLUSH_EXPLICIT;
if ((transfer->usage & required_usage) == required_usage) {
struct pipe_box box;
u_box_1d(transfer->box.x + rel_box->x, rel_box->width, &box);