This commit is contained in:
scribam 2018-04-29 08:41:51 +02:00 committed by Ivan
parent fc23243d01
commit 04ad49de4d
48 changed files with 117 additions and 118 deletions

View File

@ -134,7 +134,7 @@ s32 cellMouseGetData(u32 port_no, vm::ptr<CellMouseData> data)
s32 cellMouseGetDataList(u32 port_no, vm::ptr<CellMouseDataList> data)
{
sys_io.todo("cellMouseGetDataList(port_no=%d, data=0x%x", port_no, data);
sys_io.todo("cellMouseGetDataList(port_no=%d, data=0x%x)", port_no, data);
if (g_cfg.io.mouse == mouse_handler::null)
return CELL_MOUSE_ERROR_NO_DEVICE;
else

View File

@ -87,7 +87,6 @@ s32 cellRtcGetTick(vm::ptr<CellRtcDateTime> pTime, vm::ptr<CellRtcTick> pTick)
{
cellRtc.todo("cellRtcGetTick(pTime=*0x%x, pTick=*0x%x)", pTime, pTick);
return CELL_OK;
}

View File

@ -242,7 +242,7 @@ std::tuple<u16, u16> PadHandlerBase::ConvertToSquirclePoint(u16 inX, u16 inY, in
// https://thatsmaths.com/2016/07/14/squircles/
const f32 newLen = (1 + std::pow(std::sin(2 * angle), 2.f) / (float(squircle_factor) / 1000.f)) * r;
// we now have len and angle, convert to cartisian
// we now have len and angle, convert to cartesian
const int newX = Clamp0To255(((newLen * std::cos(angle)) + 1) * 127.5f);
const int newY = Clamp0To255(((newLen * std::sin(angle)) + 1) * 127.5f);
return std::tuple<u16, u16>(newX, newY);

View File

@ -62,10 +62,10 @@ public:
// Unmap address (please specify only starting point, no midway memory will be unmapped), returns the size of the unmapped area
bool UnmapAddress(u32 addr, u32& size);
// Reserve a certain amount so no one can use it, returns true on succces, false on failure
// Reserve a certain amount so no one can use it, returns true on success, false on failure
bool Reserve(u32 size);
// Unreserve a certain amount of bytes, returns true on succcess, false if size is bigger than the reserved amount
// Unreserve a certain amount of bytes, returns true on success, false if size is bigger than the reserved amount
bool Unreserve(u32 size);
// Return the total amount of reserved memory

View File

@ -363,7 +363,7 @@ namespace rsx
u32 dst_dma = 0;
rsx::blit_engine::transfer_destination_format dst_color_format;
u32 out_pitch = 0;
u32 out_aligment = 64;
u32 out_alignment = 64;
switch (method_registers.blit_engine_context_surface())
{
@ -372,7 +372,7 @@ namespace rsx
dst_offset = method_registers.blit_engine_output_offset_nv3062();
dst_color_format = method_registers.blit_engine_nv3062_color_format();
out_pitch = method_registers.blit_engine_output_pitch_nv3062();
out_aligment = method_registers.blit_engine_output_alignment_nv3062();
out_alignment = method_registers.blit_engine_output_alignment_nv3062();
break;
case blit_engine::context_surface::swizzle2d:

View File

@ -123,7 +123,7 @@ namespace rsx
{
if (count != 0)
{
// todo: support memory state in the middle of incrememented command
// todo: support memory state in the middle of incremented command
// This shouldn't ever happen as long as captures stay in 'strict' aka non-multidraw mode
fmt::throw_exception("capture replay: state change not supported between increment commands");
}

View File

@ -124,7 +124,7 @@ namespace rsx
}
};
// bleh, may need to break these out, might be unneccessary to do both always
// bleh, may need to break these out, might be unnecessary to do both always
struct tile_state
{
tile_info tiles[15];

View File

@ -469,7 +469,7 @@ void CgBinaryDisasm::TaskFP()
if (dst.end)
{
m_arb_shader.pop_back();
m_arb_shader += " # last inctruction\nEND\n";
m_arb_shader += " # last instruction\nEND\n";
break;
}

View File

@ -26,7 +26,7 @@ typedef struct CgBinaryProgram CgBinaryProgram;
// fragment programs have their constants embedded in the microcode
struct CgBinaryEmbeddedConstant
{
be_t<u32> ucodeCount; // occurances
be_t<u32> ucodeCount; // occurrences
be_t<u32> ucodeOffset[1]; // offsets that need to be patched follow
};
@ -76,7 +76,7 @@ struct CgBinaryFragmentProgram
be_t<u16> texCoordsCentroid; // tex coords that are centroid (tex<n> is bit n)
u8 registerCount; // R registers count
u8 outputFromH0; // final color from R0 or H0
u8 depthReplace; // fp generated z epth value
u8 depthReplace; // fp generated z depth value
u8 pixelKill; // fp uses kill operations
};

View File

@ -274,7 +274,7 @@ namespace
}
}
inline void stream_data_to_memory_u8_non_continous(void *dst, const void *src, u32 vertex_count, u8 attribute_size, u8 dst_stride, u8 src_stride)
inline void stream_data_to_memory_u8_non_continuous(void *dst, const void *src, u32 vertex_count, u8 attribute_size, u8 dst_stride, u8 src_stride)
{
char *src_ptr = (char *)src;
char *dst_ptr = (char *)dst;
@ -472,7 +472,7 @@ void write_vertex_array_data_to_buffer(gsl::span<gsl::byte> raw_dst_span, gsl::s
if (use_stream_no_stride)
memcpy(raw_dst_span.data(), src_ptr.data(), count * dst_stride);
else if (use_stream_with_stride)
stream_data_to_memory_u8_non_continous(raw_dst_span.data(), src_ptr.data(), count, vector_element_count, dst_stride, attribute_src_stride);
stream_data_to_memory_u8_non_continuous(raw_dst_span.data(), src_ptr.data(), count, vector_element_count, dst_stride, attribute_src_stride);
else
copy_whole_attribute_array<u8, u8>((void *)raw_dst_span.data(), (void *)src_ptr.data(), vector_element_count, dst_stride, attribute_src_stride, count, real_count);
@ -599,7 +599,7 @@ std::tuple<T, T, u32> expand_indexed_triangle_fan(gsl::span<to_be_t<const T>> sr
if (last_index == invalid_index)
{
//Need at least one anchor and one outer index to create a triange
//Need at least one anchor and one outer index to create a triangle
last_index = index;
continue;
}

View File

@ -225,7 +225,7 @@ std::string FragmentProgramDecompiler::AddX2d()
}
//Both of these were tested with a trace SoulCalibur IV title screen
//Failure to catch causes infinite values since theres alot of rcp(0)
//Failure to catch causes infinite values since there is a lot of rcp(0)
std::string FragmentProgramDecompiler::NotZero(const std::string& code)
{
return "(max(abs(" + code + "), 0.0000000001) * sign(" + code + "))";
@ -374,7 +374,7 @@ void FragmentProgramDecompiler::AddCodeCond(const std::string& dst, const std::s
std::string cond = GetRawCond();
ShaderVariable dst_var(dst);
dst_var.symplify();
dst_var.simplify();
//const char *c_mask = f;
@ -501,7 +501,7 @@ std::string FragmentProgramDecompiler::BuildCode()
OS << "\n";
insertConstants(OS);
OS << "\n";
insertIntputs(OS);
insertInputs(OS);
OS << "\n";
insertOutputs(OS);
OS << "\n";
@ -557,7 +557,7 @@ bool FragmentProgramDecompiler::handle_sct(u32 opcode)
case RSX_FP_OPCODE_MIN: SetDst("min($0, $1)"); return true;
case RSX_FP_OPCODE_MOV: SetDst("$0"); return true;
case RSX_FP_OPCODE_MUL: SetDst("($0 * $1)"); return true;
// Note: It's higly likely that RCP is not IEEE compliant but a game that uses rcp(0) has to be found
// Note: It's highly likely that RCP is not IEEE compliant but a game that uses rcp(0) has to be found
case RSX_FP_OPCODE_RCP: SetDst("(1. / " + NotZero("$0.x") + ").xxxx"); return true;
// Note: RSQ is not IEEE compliant. rsq(0) is some big number (Silent Hill 3 HD)
// It is not know what happens if 0 is negative.
@ -908,8 +908,8 @@ std::string FragmentProgramDecompiler::Decompile()
if (handle_tex_srb(opcode)) break;
//FENCT/FENCB do not actually reject instructions if they dont match the forced unit
//Tested with Dark Souls II where the repecting FENCX instruction will result in empty luminance averaging shaders
//TODO: More reasearch is needed to determine what real HW does
//Tested with Dark Souls II where the respecting FENCX instruction will result in empty luminance averaging shaders
//TODO: More research is needed to determine what real HW does
if (handle_sct(opcode)) break;
if (handle_scb(opcode)) break;
forced_unit = FORCE_NONE;

View File

@ -11,7 +11,7 @@
* - virtual std::string saturate(const std::string &code) = 0;
* - virtual std::string compareFunction(enum class COMPARE, const std::string &, const std::string &) = 0;
* - virtual void insertHeader(std::stringstream &OS) = 0;
* - virtual void insertIntputs(std::stringstream &OS) = 0;
* - virtual void insertInputs(std::stringstream &OS) = 0;
* - virtual void insertOutputs(std::stringstream &OS) = 0;
* - virtual void insertConstants(std::stringstream &OS) = 0;
* - virtual void insertMainStart(std::stringstream &OS) = 0;
@ -223,7 +223,7 @@ protected:
virtual void insertHeader(std::stringstream &OS) = 0;
/** Insert global declaration of fragments inputs.
*/
virtual void insertIntputs(std::stringstream &OS) = 0;
virtual void insertInputs(std::stringstream &OS) = 0;
/** insert global declaration of fragments outputs.
*/
virtual void insertOutputs(std::stringstream &OS) = 0;

View File

@ -198,7 +198,7 @@ public:
return swizzles[swizzles.size() - 1].length();
}
ShaderVariable& symplify()
ShaderVariable& simplify()
{
std::unordered_map<char, char> swizzle;

View File

@ -494,7 +494,7 @@ u8 get_format_block_size_in_bytes(rsx::surface_color_format format)
}
}
size_t get_placed_texture_storage_size(u16 width, u16 height, u32 depth, u8 format, u16 mipmap, bool cubemap, size_t row_pitch_alignement, size_t mipmap_alignment)
size_t get_placed_texture_storage_size(u16 width, u16 height, u32 depth, u8 format, u16 mipmap, bool cubemap, size_t row_pitch_alignment, size_t mipmap_alignment)
{
size_t w = width;
size_t h = std::max<u16>(height, 1);
@ -510,7 +510,7 @@ size_t get_placed_texture_storage_size(u16 width, u16 height, u32 depth, u8 form
size_t result = 0;
for (u16 i = 0; i < mipmap; ++i)
{
size_t rowPitch = align(block_size_in_byte * width_in_blocks, row_pitch_alignement);
size_t rowPitch = align(block_size_in_byte * width_in_blocks, row_pitch_alignment);
result += align(rowPitch * height_in_blocks * d, mipmap_alignment);
height_in_blocks = std::max<size_t>(height_in_blocks / 2, 1);
width_in_blocks = std::max<size_t>(width_in_blocks / 2, 1);
@ -519,16 +519,16 @@ size_t get_placed_texture_storage_size(u16 width, u16 height, u32 depth, u8 form
return result * (cubemap ? 6 : 1);
}
size_t get_placed_texture_storage_size(const rsx::fragment_texture &texture, size_t row_pitch_alignement, size_t mipmap_alignment)
size_t get_placed_texture_storage_size(const rsx::fragment_texture &texture, size_t row_pitch_alignment, size_t mipmap_alignment)
{
return get_placed_texture_storage_size(texture.width(), texture.height(), texture.depth(), texture.format(), texture.mipmap(), texture.cubemap(),
row_pitch_alignement, mipmap_alignment);
row_pitch_alignment, mipmap_alignment);
}
size_t get_placed_texture_storage_size(const rsx::vertex_texture &texture, size_t row_pitch_alignement, size_t mipmap_alignment)
size_t get_placed_texture_storage_size(const rsx::vertex_texture &texture, size_t row_pitch_alignment, size_t mipmap_alignment)
{
return get_placed_texture_storage_size(texture.width(), texture.height(), texture.depth(), texture.format(), texture.mipmap(), texture.cubemap(),
row_pitch_alignement, mipmap_alignment);
row_pitch_alignment, mipmap_alignment);
}

View File

@ -43,11 +43,11 @@ struct rsx_subresource_layout
/**
* Get size to store texture in a linear fashion.
* Storage is assumed to use a rowPitchAlignement boundary for every row of texture.
* Storage is assumed to use a rowPitchAlignment boundary for every row of texture.
*/
size_t get_placed_texture_storage_size(u16 width, u16 height, u32 depth, u8 format, u16 mipmap, bool cubemap, size_t row_pitch_alignement, size_t mipmap_alignment);
size_t get_placed_texture_storage_size(const rsx::fragment_texture &texture, size_t row_pitch_alignement, size_t mipmap_alignment = 0x200);
size_t get_placed_texture_storage_size(const rsx::vertex_texture &texture, size_t row_pitch_alignement, size_t mipmap_alignment = 0x200);
size_t get_placed_texture_storage_size(u16 width, u16 height, u32 depth, u8 format, u16 mipmap, bool cubemap, size_t row_pitch_alignment, size_t mipmap_alignment);
size_t get_placed_texture_storage_size(const rsx::fragment_texture &texture, size_t row_pitch_alignment, size_t mipmap_alignment = 0x200);
size_t get_placed_texture_storage_size(const rsx::vertex_texture &texture, size_t row_pitch_alignment, size_t mipmap_alignment = 0x200);
/**
* get all rsx_subresource_layout for texture.

View File

@ -296,7 +296,7 @@ void VertexProgramDecompiler::AddCodeCond(const std::string& dst, const std::str
std::string cond = compareFunction(cond_string_table[d0.cond], AddCondReg() + swizzle, getFloatTypeName(4) + "(0., 0., 0., 0.)");
ShaderVariable dst_var(dst);
dst_var.symplify();
dst_var.simplify();
//const char *c_mask = f;

View File

@ -13,7 +13,7 @@
* - virtual std::string getFunction(enum class FUNCTION) = 0;
* - virtual std::string compareFunction(enum class COMPARE, const std::string &, const std::string &) = 0;
* - virtual void insertHeader(std::stringstream &OS) = 0;
* - virtual void insertIntputs(std::stringstream &OS) = 0;
* - virtual void insertInputs(std::stringstream &OS) = 0;
* - virtual void insertOutputs(std::stringstream &OS) = 0;
* - virtual void insertConstants(std::stringstream &OS) = 0;
* - virtual void insertMainStart(std::stringstream &OS) = 0;

View File

@ -13,11 +13,11 @@ struct data_heap
/**
* Does alloc cross get position ?
*/
template<int Alignement>
template<int Alignment>
bool can_alloc(size_t size) const
{
size_t alloc_size = align(size, Alignement);
size_t aligned_put_pos = align(m_put_pos, Alignement);
size_t alloc_size = align(size, Alignment);
size_t aligned_put_pos = align(m_put_pos, Alignment);
if (aligned_put_pos + alloc_size < m_size)
{
// range before get
@ -70,17 +70,17 @@ public:
m_largest_allocated_pool = 0;
}
template<int Alignement>
template<int Alignment>
size_t alloc(size_t size)
{
if (!can_alloc<Alignement>(size))
if (!can_alloc<Alignment>(size))
{
fmt::throw_exception("[%s] Working buffer not big enough, buffer_length=%d allocated=%d requested=%d guard=%d largest_pool=%d" HERE,
m_name, m_size, m_current_allocated_size, size, m_min_guard_size, m_largest_allocated_pool);
}
size_t alloc_size = align(size, Alignement);
size_t aligned_put_pos = align(m_put_pos, Alignement);
size_t alloc_size = align(size, Alignment);
size_t aligned_put_pos = align(m_put_pos, Alignment);
const size_t block_length = (aligned_put_pos - m_put_pos) + alloc_size;
m_current_allocated_size += block_length;

View File

@ -624,10 +624,10 @@ namespace rsx
}
/**
* Clipping and fitting lookup funcrions
* Clipping and fitting lookup functions
* surface_overlaps - returns true if surface overlaps a given surface address and returns the relative x and y position of the surface address within the surface
* address_is_bound - returns true if the surface at a given address is actively bound
* get_surface_subresource_if_available - returns a sectiion descriptor that allows to crop surfaces stored in memory
* get_surface_subresource_if_available - returns a section descriptor that allows to crop surfaces stored in memory
*/
bool surface_overlaps_address(surface_type surface, u32 surface_address, u32 texaddr, u16 *x, u16 *y)
{

View File

@ -272,7 +272,7 @@ namespace rsx
bool violation_handled = false;
std::vector<section_storage_type*> sections_to_flush; //Sections to be flushed
std::vector<section_storage_type*> sections_to_reprotect; //Sections to be protected after flushing
std::vector<section_storage_type*> sections_to_unprotect; //These sections are to be unpotected and discarded by caller
std::vector<section_storage_type*> sections_to_unprotect; //These sections are to be unprotected and discarded by caller
int num_flushable = 0;
u64 cache_tag = 0;
u32 address_base = 0;

View File

@ -94,12 +94,12 @@ DXGI_FORMAT get_depth_samplable_surface_format(rsx::surface_depth_format format)
UCHAR get_dxgi_texel_size(DXGI_FORMAT format);
/**
* Convert front face value to bool value telling wheter front face is counterclockwise or not
* Convert front face value to bool value telling whether front face is counterclockwise or not
*/
BOOL get_front_face_ccw(rsx::front_face set_front_face_value);
/**
* Convert cull face value to a D3D12_CULL_MODE telling wheter cull face is front or back
* Convert cull face value to a D3D12_CULL_MODE telling whether cull face is front or back
*/
D3D12_CULL_MODE get_cull_face(rsx::cull_face set_cull_face_value);

View File

@ -55,7 +55,7 @@ void D3D12FragmentDecompiler::insertHeader(std::stringstream & OS)
OS << "};\n";
}
void D3D12FragmentDecompiler::insertIntputs(std::stringstream & OS)
void D3D12FragmentDecompiler::insertInputs(std::stringstream & OS)
{
OS << "struct PixelInput\n";
OS << "{\n";

View File

@ -14,7 +14,7 @@ protected:
virtual std::string compareFunction(enum class COMPARE, const std::string &, const std::string &) override;
virtual void insertHeader(std::stringstream &OS) override;
virtual void insertIntputs(std::stringstream &OS) override;
virtual void insertInputs(std::stringstream &OS) override;
virtual void insertOutputs(std::stringstream &OS) override;
virtual void insertConstants(std::stringstream &OS) override;
virtual void insertGlobalFunctions(std::stringstream &OS) override;

View File

@ -33,7 +33,7 @@ inline std::string get_hresult_message(HRESULT hr)
/**
* Send data to dst pointer without polluting cache.
* Usefull to write to mapped memory from upload heap.
* Useful to write to mapped memory from upload heap.
*/
inline
void streamToBuffer(void* dst, void* src, size_t sizeInBytes)
@ -47,7 +47,7 @@ void streamToBuffer(void* dst, void* src, size_t sizeInBytes)
/**
* copy src to dst pointer without polluting cache.
* Usefull to write to mapped memory from upload heap.
* Useful to write to mapped memory from upload heap.
*/
inline
void streamBuffer(void* dst, void* src, size_t sizeInBytes)

View File

@ -33,7 +33,7 @@ void GLFragmentDecompilerThread::insertHeader(std::stringstream & OS)
OS << "#version 430\n";
}
void GLFragmentDecompilerThread::insertIntputs(std::stringstream & OS)
void GLFragmentDecompilerThread::insertInputs(std::stringstream & OS)
{
bool two_sided_enabled = m_prog.front_back_color_enabled && (m_prog.back_color_diffuse_output || m_prog.back_color_specular_output);
std::vector<std::string> inputs_to_declare;

View File

@ -25,7 +25,7 @@ protected:
virtual std::string compareFunction(COMPARE, const std::string&, const std::string&) override;
virtual void insertHeader(std::stringstream &OS) override;
virtual void insertIntputs(std::stringstream &OS) override;
virtual void insertInputs(std::stringstream &OS) override;
virtual void insertOutputs(std::stringstream &OS) override;
virtual void insertConstants(std::stringstream &OS) override;
virtual void insertGlobalFunctions(std::stringstream &OS) override;

View File

@ -193,7 +193,7 @@ void GLGSRender::end()
if (manually_flush_ring_buffers)
{
//Use approximations to reseve space. This path is mostly for debug purposes anyway
//Use approximations to reserve space. This path is mostly for debug purposes anyway
u32 approx_vertex_count = rsx::method_registers.current_draw_clause.get_elements_count();
u32 approx_working_buffer_size = approx_vertex_count * 256;
@ -212,7 +212,7 @@ void GLGSRender::end()
if (surface->get_internal_format() == surface->old_contents->get_internal_format())
{
//Copy data from old contents onto this one
//1. Clip a rectangular region defning the data
//1. Clip a rectangular region defining the data
//2. Perform a GPU blit
u16 parent_w = surface->old_contents->width();
u16 parent_h = surface->old_contents->height();
@ -272,7 +272,7 @@ void GLGSRender::end()
if (buffers_to_clear.size() > 0 && !clear_all_color)
{
GLfloat colors[] = { 0.f, 0.f, 0.f, 0.f };
//It is impossible for the render target to be typa A or B here (clear all would have been flagged)
//It is impossible for the render target to be type A or B here (clear all would have been flagged)
for (auto &i : buffers_to_clear)
glClearBufferfv(draw_fbo.id(), i, colors);
}
@ -1308,7 +1308,7 @@ void GLGSRender::update_draw_state()
gl_state.enable(rsx::method_registers.poly_offset_fill_enabled(), GL_POLYGON_OFFSET_FILL);
//offset_bias is the constant factor, multiplied by the implementation factor R
//offst_scale is the slope factor, multiplied by the triangle slope factor M
//offset_scale is the slope factor, multiplied by the triangle slope factor M
gl_state.polygon_offset(rsx::method_registers.poly_offset_scale(), rsx::method_registers.poly_offset_bias());
if (gl_state.enable(rsx::method_registers.cull_face_enabled(), GL_CULL_FACE))
@ -1414,7 +1414,7 @@ void GLGSRender::flip(int buffer)
if (!buffer_pitch) buffer_pitch = buffer_width * 4;
gl::pixel_unpack_settings unpack_settings;
unpack_settings.aligment(1).row_length(buffer_pitch / 4);
unpack_settings.alignment(1).row_length(buffer_pitch / 4);
if (!m_flip_tex_color || m_flip_tex_color->size2D() != sizei{ (int)buffer_width, (int)buffer_height })
{

View File

@ -400,7 +400,7 @@ namespace gl
int m_skip_rows = 0;
int m_skip_pixels = 0;
int m_skip_images = 0;
int m_aligment = 4;
int m_alignment = 4;
public:
void apply() const
@ -412,7 +412,7 @@ namespace gl
glPixelStorei(GL_PACK_SKIP_ROWS, m_skip_rows);
glPixelStorei(GL_PACK_SKIP_PIXELS, m_skip_pixels);
glPixelStorei(GL_PACK_SKIP_IMAGES, m_skip_images);
glPixelStorei(GL_PACK_ALIGNMENT, m_aligment);
glPixelStorei(GL_PACK_ALIGNMENT, m_alignment);
}
pixel_pack_settings& swap_bytes(bool value = true)
@ -450,9 +450,9 @@ namespace gl
m_skip_images = value;
return *this;
}
pixel_pack_settings& aligment(int value)
pixel_pack_settings& alignment(int value)
{
m_aligment = value;
m_alignment = value;
return *this;
}
};
@ -466,7 +466,7 @@ namespace gl
int m_skip_rows = 0;
int m_skip_pixels = 0;
int m_skip_images = 0;
int m_aligment = 4;
int m_alignment = 4;
public:
void apply() const
@ -478,7 +478,7 @@ namespace gl
glPixelStorei(GL_UNPACK_SKIP_ROWS, m_skip_rows);
glPixelStorei(GL_UNPACK_SKIP_PIXELS, m_skip_pixels);
glPixelStorei(GL_UNPACK_SKIP_IMAGES, m_skip_images);
glPixelStorei(GL_UNPACK_ALIGNMENT, m_aligment);
glPixelStorei(GL_UNPACK_ALIGNMENT, m_alignment);
}
pixel_unpack_settings& swap_bytes(bool value = true)
@ -516,9 +516,9 @@ namespace gl
m_skip_images = value;
return *this;
}
pixel_unpack_settings& aligment(int value)
pixel_unpack_settings& alignment(int value)
{
m_aligment = value;
m_alignment = value;
return *this;
}
};

View File

@ -148,7 +148,7 @@ namespace gl
bool matches_dimensions(u16 _width, u16 _height) const
{
//Use foward scaling to account for rounding and clamping errors
//Use forward scaling to account for rounding and clamping errors
return (rsx::apply_resolution_scale(_width, true) == internal_width) && (rsx::apply_resolution_scale(_height, true) == internal_height);
}
};

View File

@ -136,7 +136,7 @@ namespace gl
case GL_RGBA8:
return GL_SRGB8_ALPHA8;
default:
//LOG_ERROR(RSX, "No gamma coversion for format 0x%X", in_format);
//LOG_ERROR(RSX, "No gamma conversion for format 0x%X", in_format);
return in_format;
}
}
@ -189,7 +189,7 @@ namespace gl
case rsx::texture_minify_filter::linear_linear: return GL_LINEAR_MIPMAP_LINEAR;
case rsx::texture_minify_filter::convolution_min: return GL_LINEAR_MIPMAP_LINEAR;
}
fmt::throw_exception("Unknow min filter" HERE);
fmt::throw_exception("Unknown min filter" HERE);
}
int tex_mag_filter(rsx::texture_magnify_filter mag_filter)
@ -200,7 +200,7 @@ namespace gl
case rsx::texture_magnify_filter::linear: return GL_LINEAR;
case rsx::texture_magnify_filter::convolution_mag: return GL_LINEAR;
}
fmt::throw_exception("Unknow mag filter" HERE);
fmt::throw_exception("Unknown mag filter" HERE);
}
//Apply sampler state settings

View File

@ -407,9 +407,9 @@ namespace gl
glBindBuffer(GL_PIXEL_PACK_BUFFER, pbo_id);
pixel_pack_settings pack_settings;
pack_settings.aligment(1);
pack_settings.alignment(1);
//NOTE: AMD properietary driver bug - disable swap bytes
//NOTE: AMD proprietary driver bug - disable swap bytes
if (!::gl::get_driver_caps().vendor_AMD)
pack_settings.swap_bytes(pack_unpack_swap_bytes);

View File

@ -140,7 +140,7 @@ namespace
return{ 0, 0, 0, 0, std::make_tuple(get_index_type(type), offset_in_index_buffer) };
}
//check for vertex arrays with frquency modifiers
//check for vertex arrays with frequency modifiers
for (auto &block : m_vertex_layout.interleaved_blocks)
{
if (block.min_divisor > 1)

View File

@ -301,7 +301,7 @@ void GLVertexDecompilerThread::insertMainEnd(std::stringstream & OS)
OS << " gl_Position = gl_Position * scale_offset_mat;\n";
OS << " gl_Position = apply_zclip_xform(gl_Position, z_near, z_far);\n";
//Since our clip_space is symetrical [-1, 1] we map it to linear space using the eqn:
//Since our clip_space is symmetrical [-1, 1] we map it to linear space using the eqn:
//ln = (clip * 2) - 1 to fully utilize the 0-1 range of the depth buffer
//RSX matrices passed already map to the [0, 1] range but mapping to classic OGL requires that we undo this step
//This can be made unnecessary using the call glClipControl(GL_LOWER_LEFT, GL_ZERO_TO_ONE).

View File

@ -747,7 +747,7 @@ namespace rsx
{
if (first_count[n].first != next)
{
LOG_ERROR(RSX, "Non-continous first-count range passed as one draw; will be split.");
LOG_ERROR(RSX, "Non-continuous first-count range passed as one draw; will be split.");
first_count[deferred_call_size - 1].second = count;
deferred_call_size++;
@ -1057,7 +1057,7 @@ namespace rsx
}
}
// Generate wpos coeffecients
// Generate wpos coefficients
// wpos equation is now as follows:
// wpos.y = (frag_coord / resolution_scale) * ((window_origin!=top)?-1.: 1.) + ((window_origin!=top)? window_height : 0)
// wpos.x = (frag_coord / resolution_scale)

View File

@ -85,7 +85,7 @@ namespace rsx
{
running = 0,
empty = 1, //PUT == GET
spinning = 2, //Puller continously jumps to self addr (synchronization technique)
spinning = 2, //Puller continuously jumps to self addr (synchronization technique)
nop = 3, //Puller is processing a NOP command
};

View File

@ -56,7 +56,7 @@ enum vec_opcode
RSX_VEC_OPCODE_SLE = 0x13, // Set-If-LessEqual
RSX_VEC_OPCODE_SNE = 0x14, // Set-If-NotEqual
RSX_VEC_OPCODE_STR = 0x15, // Set-If-True
RSX_VEC_OPCODE_SSG = 0x16, // Convert postive values to 1 and negative values to -1
RSX_VEC_OPCODE_SSG = 0x16, // Convert positive values to 1 and negative values to -1
RSX_VEC_OPCODE_TXL = 0x19, // Texture fetch
};

View File

@ -33,7 +33,7 @@ void VKFragmentDecompilerThread::insertHeader(std::stringstream & OS)
OS << "#extension GL_ARB_separate_shader_objects: enable\n\n";
}
void VKFragmentDecompilerThread::insertIntputs(std::stringstream & OS)
void VKFragmentDecompilerThread::insertInputs(std::stringstream & OS)
{
//It is possible for the two_sided_enabled flag to be set without actual 2-sided outputs
bool two_sided_enabled = m_prog.front_back_color_enabled && (m_prog.back_color_diffuse_output || m_prog.back_color_specular_output);

View File

@ -29,7 +29,7 @@ protected:
virtual std::string compareFunction(COMPARE, const std::string&, const std::string&) override;
virtual void insertHeader(std::stringstream &OS) override;
virtual void insertIntputs(std::stringstream &OS) override;
virtual void insertInputs(std::stringstream &OS) override;
virtual void insertOutputs(std::stringstream &OS) override;
virtual void insertConstants(std::stringstream &OS) override;
virtual void insertGlobalFunctions(std::stringstream &OS) override;

View File

@ -338,34 +338,34 @@ namespace
std::vector<VkAttachmentDescription> attachments = {};
std::vector<VkAttachmentReference> attachment_references;
VkAttachmentDescription color_attachement_description = {};
color_attachement_description.format = color_format;
color_attachement_description.samples = VK_SAMPLE_COUNT_1_BIT;
color_attachement_description.loadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
color_attachement_description.storeOp = VK_ATTACHMENT_STORE_OP_STORE;
color_attachement_description.stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
color_attachement_description.stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
color_attachement_description.initialLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
color_attachement_description.finalLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
VkAttachmentDescription color_attachment_description = {};
color_attachment_description.format = color_format;
color_attachment_description.samples = VK_SAMPLE_COUNT_1_BIT;
color_attachment_description.loadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
color_attachment_description.storeOp = VK_ATTACHMENT_STORE_OP_STORE;
color_attachment_description.stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
color_attachment_description.stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
color_attachment_description.initialLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
color_attachment_description.finalLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
for (u32 i = 0; i < number_of_color_surface; ++i)
{
attachments.push_back(color_attachement_description);
attachments.push_back(color_attachment_description);
attachment_references.push_back({ i, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL });
}
if (depth_format != VK_FORMAT_UNDEFINED)
{
VkAttachmentDescription depth_attachement_description = {};
depth_attachement_description.format = depth_format;
depth_attachement_description.samples = VK_SAMPLE_COUNT_1_BIT;
depth_attachement_description.loadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
depth_attachement_description.storeOp = VK_ATTACHMENT_STORE_OP_STORE;
depth_attachement_description.stencilLoadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
depth_attachement_description.stencilStoreOp = VK_ATTACHMENT_STORE_OP_STORE;
depth_attachement_description.initialLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
depth_attachement_description.finalLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
attachments.push_back(depth_attachement_description);
VkAttachmentDescription depth_attachment_description = {};
depth_attachment_description.format = depth_format;
depth_attachment_description.samples = VK_SAMPLE_COUNT_1_BIT;
depth_attachment_description.loadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
depth_attachment_description.storeOp = VK_ATTACHMENT_STORE_OP_STORE;
depth_attachment_description.stencilLoadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
depth_attachment_description.stencilStoreOp = VK_ATTACHMENT_STORE_OP_STORE;
depth_attachment_description.initialLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
depth_attachment_description.finalLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
attachments.push_back(depth_attachment_description);
attachment_references.push_back({ number_of_color_surface, VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL });
}
@ -1764,7 +1764,7 @@ void VKGSRender::clear_surface(u32 mask)
fmt::throw_exception("Unreachable" HERE);
}
//Fush unconditinally - parameters might not persist
//Fush unconditionally - parameters might not persist
//TODO: Better parameter management for overlay passes
flush_command_queue();
}
@ -1857,7 +1857,7 @@ void VKGSRender::flush_command_queue(bool hard_sync)
//swap handler checks the pending flag, so call it here
process_swap_request(m_current_frame);
//wait for the latest intruction to execute
//wait for the latest instruction to execute
m_current_command_buffer->pending = true;
m_current_command_buffer->reset();
@ -2472,7 +2472,7 @@ void VKGSRender::init_buffers(rsx::framebuffer_creation_context context, bool sk
if (&ctx == m_current_frame && ctx.swap_command_buffer->pending)
{
//Instead of stoppiing to wait, use the aux storage to ease pressure
//Instead of stopping to wait, use the aux storage to ease pressure
m_aux_frame_context.grab_resources(*m_current_frame);
m_current_frame = &m_aux_frame_context;
}

View File

@ -211,7 +211,7 @@ namespace vk
//Radeon fails to properly handle degenerate primitives if primitive restart is enabled
//One has to choose between using degenerate primitives or primitive restart to break up lists but not both
//Polaris and newer will crash with ERROR_DEVICE_LOST
//Older GCN will work okay most of the time but also occasionally draws garbage without reason (properietary driver only)
//Older GCN will work okay most of the time but also occasionally draws garbage without reason (proprietary driver only)
if (gpu_name.find("Radeon") != std::string::npos || //Proprietary driver
gpu_name.find("POLARIS") != std::string::npos || //RADV POLARIS
gpu_name.find("VEGA") != std::string::npos) //RADV VEGA

View File

@ -853,7 +853,7 @@ namespace vk
enum access_type_hint
{
flush_only, //Only to be submitted/opened/closed via command flush
all //Auxilliary, can be sumitted/opened/closed at any time
all //Auxiliary, can be submitted/opened/closed at any time
}
access_hint = flush_only;
@ -1644,7 +1644,7 @@ public:
{
m_instance = nullptr;
//Check that some critical entry-points have been loaded into memory indicating prescence of a loader
//Check that some critical entry-points have been loaded into memory indicating presence of a loader
loader_exists = (vkCreateInstance != nullptr);
}

View File

@ -91,7 +91,7 @@ namespace vk
bool matches_dimensions(u16 _width, u16 _height) const
{
//Use foward scaling to account for rounding and clamping errors
//Use forward scaling to account for rounding and clamping errors
return (rsx::apply_resolution_scale(_width, true) == width()) && (rsx::apply_resolution_scale(_height, true) == height());
}
};

View File

@ -559,7 +559,7 @@ namespace vk
{
//This is a data cast operation
//Use native mapping for the new type
//TODO: Also simlulate the readback+reupload step (very tricky)
//TODO: Also simulate the readback+reupload step (very tricky)
const auto remap = get_component_mapping(gcm_format);
view_swizzle = { remap[1], remap[2], remap[3], remap[0] };
}

View File

@ -192,7 +192,7 @@ namespace
std::optional<std::tuple<VkDeviceSize, VkIndexType>> index_info =
std::make_tuple(offset_in_index_buffer, vk::get_index_type(index_type));
//check for vertex arrays with frquency modifiers
//check for vertex arrays with frequency modifiers
for (auto &block : m_vertex_layout.interleaved_blocks)
{
if (block.min_divisor > 1)

View File

@ -11,7 +11,7 @@ namespace rsx
{
enum protection_policy
{
protect_policy_one_page, //Only guard one page, preferrably one where this section 'wholly' fits
protect_policy_one_page, //Only guard one page, preferably one where this section 'wholly' fits
protect_policy_conservative, //Guards as much memory as possible that is guaranteed to only be covered by the defined range without sharing
protect_policy_full_range //Guard the full memory range. Shared pages may be invalidated by access outside the object we're guarding
};

View File

@ -2326,7 +2326,7 @@ struct registers_decoder<NV0039_LINE_LENGTH_IN>
static std::string dump(decoded_type &&decoded_values)
{
return "NV0039: line lenght input = " + std::to_string(decoded_values.input_line_length());
return "NV0039: line length input = " + std::to_string(decoded_values.input_line_length());
}
};

View File

@ -664,7 +664,7 @@ namespace rsx
u32 dst_dma = 0;
rsx::blit_engine::transfer_destination_format dst_color_format;
u32 out_pitch = 0;
u32 out_aligment = 64;
u32 out_alignment = 64;
switch (method_registers.blit_engine_context_surface())
{
@ -673,7 +673,7 @@ namespace rsx
dst_offset = method_registers.blit_engine_output_offset_nv3062();
dst_color_format = method_registers.blit_engine_nv3062_color_format();
out_pitch = method_registers.blit_engine_output_pitch_nv3062();
out_aligment = method_registers.blit_engine_output_alignment_nv3062();
out_alignment = method_registers.blit_engine_output_alignment_nv3062();
break;
case blit_engine::context_surface::swizzle2d:
@ -1136,7 +1136,7 @@ namespace rsx
namespace gcm
{
// not entirely sure which one should actually do the flip, or if these should be handled seperately,
// not entirely sure which one should actually do the flip, or if these should be handled separately,
// so for now lets flip in queue and just let the driver deal with it
template<u32 index>
struct driver_flip