Hash :
8ee1b89f
Author :
Date :
2022-11-04T13:10:37
Refactor pixel local storage options The various different PLS options were getting scattered and unruly. We are also in need of more backend-specific PLS options that would be difficult to add as-is. This CL refactors them into a single "ShPixelLocalStorageOptions" struct that gets initialized all in one place, and shared between the compiler and the backends. Bug: angleproject:7279 Change-Id: Ic58dccb8d1ba350a0b6cc5848ce15bd687e30fad Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4006715 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
//
// Copyright 2016 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.
//
// ShaderNULL.cpp:
// Implements the class methods for ShaderNULL.
//
#include "libANGLE/renderer/null/ShaderNULL.h"
#include "common/debug.h"
#include "libANGLE/Context.h"
#include "libANGLE/renderer/ContextImpl.h"
namespace rx
{
ShaderNULL::ShaderNULL(const gl::ShaderState &data) : ShaderImpl(data) {}
ShaderNULL::~ShaderNULL() {}
std::shared_ptr<WaitableCompileEvent> ShaderNULL::compile(const gl::Context *context,
gl::ShCompilerInstance *compilerInstance,
ShCompileOptions *options)
{
const gl::Extensions &extensions = context->getImplementation()->getExtensions();
if (extensions.shaderPixelLocalStorageANGLE)
{
options->pls = context->getImplementation()->getNativePixelLocalStorageOptions();
}
return compileImpl(context, compilerInstance, mState.getSource(), options);
}
std::string ShaderNULL::getDebugInfo() const
{
return "";
}
} // namespace rx