mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-14 01:27:00 +00:00
rsx: Use unsigned variables to avoid sign problems when calculating stipple bits
This commit is contained in:
parent
241989c5fa
commit
b6b9085773
@ -436,13 +436,13 @@ namespace glsl
|
||||
" if (_test_bit(rop_control, 9))\n"
|
||||
" {\n"
|
||||
" // Convert x,y to linear address\n"
|
||||
" const ivec2 stipple_coord = ivec2(gl_FragCoord.xy) % ivec2(32, 32);\n"
|
||||
" const int address = stipple_coord.y * 32 + stipple_coord.x;\n"
|
||||
" const int bit_offset = (address & 31);\n"
|
||||
" const int word_index = _get_bits(address, 7, 3);\n"
|
||||
" const int sub_index = _get_bits(address, 5, 2);\n\n"
|
||||
" const uvec2 stipple_coord = uvec2(gl_FragCoord.xy) % uvec2(32, 32);\n"
|
||||
" const uint address = stipple_coord.y * 32u + stipple_coord.x;\n"
|
||||
" const uint bit_offset = (address & 31u);\n"
|
||||
" const uint word_index = _get_bits(address, 7, 3);\n"
|
||||
" const uint sub_index = _get_bits(address, 5, 2);\n\n"
|
||||
|
||||
" if (_test_bit(stipple_pattern[word_index][sub_index], bit_offset))\n"
|
||||
" if (!_test_bit(stipple_pattern[word_index][sub_index], int(bit_offset)))\n"
|
||||
" {\n"
|
||||
" _kill();\n"
|
||||
" }\n"
|
||||
|
Loading…
x
Reference in New Issue
Block a user