Bug 1801095 - Don't expose webgl_-prefixed uniforms to webgl. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D164007
This commit is contained in:
@@ -705,11 +705,6 @@ static bool IsWebglOutOfProcessEnabled() {
|
|||||||
return StaticPrefs::webgl_out_of_process();
|
return StaticPrefs::webgl_out_of_process();
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool StartsWith(const std::string& haystack,
|
|
||||||
const std::string& needle) {
|
|
||||||
return haystack.find(needle) == 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ClientWebGLContext::CreateHostContext(const uvec2& requestedSize) {
|
bool ClientWebGLContext::CreateHostContext(const uvec2& requestedSize) {
|
||||||
const auto pNotLost = std::make_shared<webgl::NotLostData>(*this);
|
const auto pNotLost = std::make_shared<webgl::NotLostData>(*this);
|
||||||
auto& notLost = *pNotLost;
|
auto& notLost = *pNotLost;
|
||||||
|
|||||||
@@ -2159,6 +2159,7 @@ webgl::LinkActiveInfo GetLinkActiveInfo(
|
|||||||
}();
|
}();
|
||||||
|
|
||||||
const auto userName = fnUnmapName(mappedName);
|
const auto userName = fnUnmapName(mappedName);
|
||||||
|
if (StartsWith(userName, "webgl_")) continue;
|
||||||
|
|
||||||
// -
|
// -
|
||||||
|
|
||||||
|
|||||||
@@ -318,11 +318,6 @@ ShaderValidator::ValidateAndTranslate(const char* const source) const {
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <size_t N>
|
|
||||||
static bool StartsWith(const std::string& haystack, const char (&needle)[N]) {
|
|
||||||
return haystack.compare(0, N - 1, needle) == 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ShaderValidatorResults::CanLinkTo(const ShaderValidatorResults& vert,
|
bool ShaderValidatorResults::CanLinkTo(const ShaderValidatorResults& vert,
|
||||||
nsCString* const out_log) const {
|
nsCString* const out_log) const {
|
||||||
MOZ_ASSERT(mValid);
|
MOZ_ASSERT(mValid);
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <string_view>
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
@@ -1184,6 +1185,13 @@ inline void Memcpy(const RangedPtr<T>* const destBegin,
|
|||||||
|
|
||||||
// -
|
// -
|
||||||
|
|
||||||
|
inline bool StartsWith(const std::string_view str,
|
||||||
|
const std::string_view part) {
|
||||||
|
return str.find(part) == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// -
|
||||||
|
|
||||||
namespace webgl {
|
namespace webgl {
|
||||||
|
|
||||||
// In theory, this number can be unbounded based on the driver. However, no
|
// In theory, this number can be unbounded based on the driver. However, no
|
||||||
|
|||||||
Reference in New Issue
Block a user