Hash :
9f693aa3
Author :
Date :
2022-10-22T14:45:59
Implement an allow list for PLS In order to guarantee no data is lost while using the EXT_shader_pixel_local_storage extension, we need to restrict applications to a small subset of commands while pixel local storage is active. This CL implements the allow list for GL entrypoints using wildcard matching inside the code generator, and adds custom validation for the more specific restrictions that go into effect when PLS is active. Bug: angleproject:7279 Change-Id: I5dd48bd93c10e8775f32be32a4fcf17855eb2f0e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3932552 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
//
// Copyright 2022 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// entry_point_utils:
// These helpers are used in GL/GLES entry point routines.
#include "libANGLE/entry_points_utils.h"
#include "libANGLE/ErrorStrings.h"
namespace gl
{
bool GeneratePixelLocalStorageActiveError(const Context *context, angle::EntryPoint entryPoint)
{
ASSERT(context->getState().getPixelLocalStorageActivePlanes() != 0);
context->validationError(entryPoint, GL_INVALID_OPERATION, err::kPLSActive);
return false;
}
} // namespace gl