mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 10:42:36 +01:00
Small fixes
This commit is contained in:
parent
4b8d6b6919
commit
d93ce95a36
@ -6,7 +6,7 @@ void GLFragmentDecompilerThread::AddCode(std::string code, bool append_mask)
|
||||
if(!src0.exec_if_eq && !src0.exec_if_gr && !src0.exec_if_lt) return;
|
||||
|
||||
const std::string mask = GetMask().c_str();
|
||||
std::string cond = "";
|
||||
std::string cond;
|
||||
|
||||
if(!src0.exec_if_gr || !src0.exec_if_lt || !src0.exec_if_eq)
|
||||
{
|
||||
@ -70,26 +70,22 @@ void GLFragmentDecompilerThread::AddCode(std::string code, bool append_mask)
|
||||
code = "clamp(" + code + ", 0.0, 1.0)";
|
||||
}
|
||||
|
||||
if(!dst.no_dest)
|
||||
{
|
||||
std::string dest;
|
||||
std::string dest;
|
||||
|
||||
if(dst.no_dest)
|
||||
{
|
||||
if(dst.set_cond)
|
||||
{
|
||||
dest = m_parr.AddParam(PARAM_NONE , "vec4", std::string(dst.fp16 ? "hc" : "rc") + std::to_string(src0.cond_reg_index));
|
||||
}
|
||||
else
|
||||
{
|
||||
dest = AddReg(dst.dest_reg, dst.fp16);
|
||||
}
|
||||
|
||||
code = cond + dest + mask + " = " + code + (append_mask ? mask : "");
|
||||
}
|
||||
else
|
||||
{
|
||||
code = cond + code + (append_mask ? mask : "");
|
||||
dest = AddReg(dst.dest_reg, dst.fp16);
|
||||
}
|
||||
|
||||
code = cond + (dest.length() ? dest + mask + " = " : "") + code + (append_mask ? mask : "");
|
||||
|
||||
main += "\t" + code + ";\n";
|
||||
}
|
||||
|
||||
|
@ -214,7 +214,7 @@ void GLVertexDecompilerThread::AddCode(bool is_sca, wxString code, bool src_mask
|
||||
{
|
||||
if(d3.vec_writemask_x)
|
||||
{
|
||||
dest = "gl_FogFragCoord";
|
||||
dest = m_parr.AddParam(PARAM_OUT, "vec4", "fogc") + mask;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -338,6 +338,8 @@ wxString GLVertexDecompilerThread::BuildCode()
|
||||
|
||||
void GLVertexDecompilerThread::Task()
|
||||
{
|
||||
m_parr.params.Clear();
|
||||
|
||||
for(u32 i=0;;)
|
||||
{
|
||||
d0.HEX = m_data[i++];
|
||||
|
@ -691,12 +691,17 @@ struct _func_arg
|
||||
template<typename T>
|
||||
struct _func_arg<mem_base_t<T>>
|
||||
{
|
||||
__forceinline static u64 get_value(const mem_base_t<T>& arg)
|
||||
__forceinline static u64 get_value(const mem_base_t<T> arg)
|
||||
{
|
||||
return arg.GetAddr();
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T> struct _func_arg<mem_ptr_t<T>> : public _func_arg<mem_base_t<T>> {};
|
||||
template<> struct _func_arg<mem_ptr_t<void>> : public _func_arg<mem_base_t<u8>> {};
|
||||
template<typename T> struct _func_arg<mem_list_ptr_t<T>> : public _func_arg<mem_base_t<T>> {};
|
||||
template<typename T> struct _func_arg<mem_t<T>> : public _func_arg<mem_base_t<T>> {};
|
||||
|
||||
template<typename T>
|
||||
struct _func_arg<be_t<T>>
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user