mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- core shader override block, backported from GZDoom.
This commit is contained in:
parent
61bc90949b
commit
585f841f96
3 changed files with 12 additions and 10 deletions
|
@ -175,7 +175,7 @@ public:
|
|||
TObjPtr() = default;
|
||||
TObjPtr(const TObjPtr<T> &q) = default;
|
||||
|
||||
TObjPtr(T q) throw()
|
||||
TObjPtr(T q) noexcept
|
||||
: pp(q)
|
||||
{
|
||||
}
|
||||
|
@ -207,35 +207,35 @@ public:
|
|||
return *this;
|
||||
}
|
||||
|
||||
T Get() throw()
|
||||
T Get() noexcept
|
||||
{
|
||||
return GC::ReadBarrier(pp);
|
||||
}
|
||||
|
||||
T ForceGet() throw() //for situations where the read barrier needs to be skipped.
|
||||
T ForceGet() noexcept //for situations where the read barrier needs to be skipped.
|
||||
{
|
||||
return pp;
|
||||
}
|
||||
|
||||
operator T() throw()
|
||||
operator T() noexcept
|
||||
{
|
||||
return GC::ReadBarrier(pp);
|
||||
}
|
||||
T &operator*()
|
||||
T &operator*() noexcept
|
||||
{
|
||||
T q = GC::ReadBarrier(pp);
|
||||
assert(q != NULL);
|
||||
return *q;
|
||||
}
|
||||
T operator->() throw()
|
||||
T operator->() noexcept
|
||||
{
|
||||
return GC::ReadBarrier(pp);
|
||||
}
|
||||
bool operator!=(T u) throw()
|
||||
bool operator!=(T u) noexcept
|
||||
{
|
||||
return GC::ReadBarrier(o) != u;
|
||||
}
|
||||
bool operator==(T u) throw()
|
||||
bool operator==(T u) noexcept
|
||||
{
|
||||
return GC::ReadBarrier(o) == u;
|
||||
}
|
||||
|
|
|
@ -404,7 +404,8 @@ bool FShader::Load(const char * name, const char * vert_prog_lump, const char *
|
|||
|
||||
if (*proc_prog_lump != '#')
|
||||
{
|
||||
int pp_lump = fileSystem.CheckNumForFullName(proc_prog_lump);
|
||||
int pp_lump = fileSystem.CheckNumForFullName(proc_prog_lump, 0); // if it's a core shader, ignore overrides by user mods.
|
||||
if (pp_lump == -1) pp_lump = fileSystem.CheckNumForFullName(proc_prog_lump);
|
||||
if (pp_lump == -1) I_Error("Unable to load '%s'", proc_prog_lump);
|
||||
FileData pp_data = fileSystem.ReadFile(pp_lump);
|
||||
|
||||
|
|
|
@ -386,7 +386,8 @@ FString VkShaderManager::GetTargetGlslVersion()
|
|||
|
||||
FString VkShaderManager::LoadPublicShaderLump(const char *lumpname)
|
||||
{
|
||||
int lump = fileSystem.CheckNumForFullName(lumpname);
|
||||
int lump = fileSystem.CheckNumForFullName(lumpname, 0);
|
||||
if (lump == -1) lump = fileSystem.CheckNumForFullName(lumpname);
|
||||
if (lump == -1) I_Error("Unable to load '%s'", lumpname);
|
||||
FileData data = fileSystem.ReadFile(lump);
|
||||
return data.GetString();
|
||||
|
|
Loading…
Reference in a new issue