mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-09 16:35:13 +00:00
split rpcs3 and hle libraries
merge rpcs3 utilities
This commit is contained in:
parent
b33e2662b6
commit
62ad27d1e2
1233 changed files with 7004 additions and 3819 deletions
38
rpcs3/Emu/RSX/GL/glutils/common.cpp
Normal file
38
rpcs3/Emu/RSX/GL/glutils/common.cpp
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
#include "state_tracker.hpp"
|
||||
#include "vao.hpp"
|
||||
|
||||
namespace gl
|
||||
{
|
||||
static thread_local bool s_tls_primary_context_thread = false;
|
||||
static gl::driver_state* s_current_state = nullptr;
|
||||
|
||||
void set_primary_context_thread(bool value)
|
||||
{
|
||||
s_tls_primary_context_thread = value;
|
||||
}
|
||||
|
||||
bool is_primary_context_thread()
|
||||
{
|
||||
return s_tls_primary_context_thread;
|
||||
}
|
||||
|
||||
void set_command_context(gl::command_context& ctx)
|
||||
{
|
||||
s_current_state = ctx.operator->();
|
||||
}
|
||||
|
||||
void set_command_context(gl::driver_state& ctx)
|
||||
{
|
||||
s_current_state = &ctx;
|
||||
}
|
||||
|
||||
gl::command_context get_command_context()
|
||||
{
|
||||
return {*s_current_state};
|
||||
}
|
||||
|
||||
attrib_t vao::operator[](u32 index) const noexcept
|
||||
{
|
||||
return attrib_t(index);
|
||||
}
|
||||
} // namespace gl
|
||||
Loading…
Add table
Add a link
Reference in a new issue