-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rework GPU #58
base: master
Are you sure you want to change the base?
Rework GPU #58
Conversation
reducing repetative code and some more whitespace changes
TODO: check formname JIC
to reduce repetative code
This comment was marked as spam.
This comment was marked as spam.
Output from observer mooncontroller:
in observer mooncontroller I have this code: local sET = event.type
if 'digiline' == sET then
local sO
mem.sBM = mem.sBM .. '\n'
for y, t in ipairs(event.msg) do
mem.sBM = mem.sBM .. '\n'
for x, s in ipairs(t) do
sO = 'f' == s:sub(1, 1) and '0' or '1'
mem.sBM = mem.sBM .. sO
end
end
elseif 'terminal' == sET then
print(mem.sBM)
elseif 'program' == sET then
mem.sBM = ''
end In master lua/moon-controller I have: if 'program' == event.type then
local d = digiline_send
local tDB = {
{ 1, 1, 5, 5 },
{ 1, 1, 1, 5 },
{ 1, 1, 7, 9 },
{ 1, 1, 1, 11 },
{ 1, 1, 4, 5 },
}
local sI, iB
for i, t in ipairs(tDB) do
sI = tostring(i)
iB = i - 1
d('g', {
{
command = 'createbuffer',
buffer = iB,
xsize = t[3],
ysize = t[4],
fill = 'ffffff',
},
{
command = 'drawline', --rect',
buffer = iB,
x2 = t[3],
y2 = t[4],
x1 = t[1],
y1 = t[2],
color = 'aa00aa'
--edge = "332211",
--fill = "010101",
--antialias = true
},
{
command = 'sendregion',
buffer = iB,
x2 = t[3],
y2 = t[4],
x1 = t[1],
y1 = t[2],
channel = sI,
},
})
end
end ---- Original message ---- |
From issue #44: The original case that started the issue was fixed, so has the So the line bug is most likely patched |
Thanks for testing. It has been three weeks and nobody has asked for any other fixes, so I've marked this PR as ready for review/merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code changes look good but i haven't tested anything (i haven't used that part of the mod that much anyway :D)
I tested this with a few of my more demanding programs and it seems to be working fine, but I didn't explicitly try to break it so I can't comment on the validation parts... not that the validation was much good in my original. I think it might also be a little faster, although I've updated MT since the last time I did much performance testing - I was able to hit 56 FPS in my donut ad (32x32, copies about three 16x16 areas per frame) and 25 FPS in my wireframe 3D cube (64x64, 12 lines drawn per frame) when outputting to digiscreen, of course with Luacontroller overheating disabled. |
Refactor of GPU code to avoid code duplications and generaly cleaner code.
Removes some bugs and only changes behaviour slightly.
Fixes #45
Hopefully also fixes #44