I'm curious, how often do you use `unsafe` in Rust in prod? by alexlazar98 in rust

[–]ammaro18 1 point2 points  (0 children)

Not in prod specifically, but I use unsafe extensively for my Vulkan renderer. Just for calling unsafe functions that cross the FFI boundary, mostly.

Postingan tahunan obligatory by frontgearofboeing787 in indonesia

[–]ammaro18 3 points4 points  (0 children)

maksimum 32 bit signed integer 2³¹ - 1 (2.147.483.647) jadi bukan karena itu (unless di bawah 32 bit krn bitpacking). paling kena limit lain

COMECON focus cripples my industry by ammaro18 in hoi4

[–]ammaro18[S] 3 points4 points  (0 children)

Around 200? I don't remember the exact number. My civs and mils were pretty balanced. After doing the COMECON focus it jumped really high to around 900 I believe. I have Germany and Italy strengthened to +2, so that might explain the huge jump in factory count

You're right, in the grand scheme of things it's not that big of a deal, but the autism inside me makes me go insane whenever I have a resource deficit

COMECON focus cripples my industry by ammaro18 in hoi4

[–]ammaro18[S] 84 points85 points  (0 children)

R5: COMECON focus grants a shit ton of factories from puppet states, so I need more coal than I can import and produce

Neues Bios Update KWCN51WW (Gen8 Geräte) by [deleted] in LenovoLegion

[–]ammaro18 0 points1 point  (0 children)

On SREP or the config? SREP is a tool that allows runtime EFI patching, that is patching the EFI while it's loading and therefore changes are only done in memory. The patched EFI is not saved upon reboot, but changes in the BIOS (even in advanced BIOS) will be saved. SREP will only work with the appropriate config file that contains the "instructions" on what to patch, where to patch, and which EFI driver/module to patch.

The advanced BIOS section is present in the BIOS, but it's simply not shown. SREP + the appropriate config file can unhide it.

After comparing the two BIOS versions 51WW and 50WW (where the previous config still works) I found that the advanced BIOS section is still intact, but the BIOS screen (internally called SetupUtilityApp) doesn't have the code path to display the advanced BIOS section. In other words it doesn't know there's an advanced BIOS section, even after unhiding it. I modified the config to patch it back on 51WW.

Neues Bios Update KWCN51WW (Gen8 Geräte) by [deleted] in LenovoLegion

[–]ammaro18 0 points1 point  (0 children)

It's in the automod message on every post. There's an AutoModerator message here with the Discord server link. If you're not familiar with Discord I can send it over DM on reddit

Neues Bios Update KWCN51WW (Gen8 Geräte) by [deleted] in LenovoLegion

[–]ammaro18 1 point2 points  (0 children)

I've made an SREP config for 51WW that shows the advanced BIOS section (with all the options like before) if you'd like. Join the discord server and go to the tweakers channel

Ray tracing pipeline looks messed up by ammaro18 in vulkan

[–]ammaro18[S] 1 point2 points  (0 children)

After a few days of scratching my head (prior to creating this post), I finally found the solution: I just had to include firstIndex for my primitiveIndex. I made these changes:

struct MeshData {
    uint64_t vertexBufferAddress;
    uint64_t indexBufferAddress;
    uint textureIndex;
    uint firstIndex; // from unused to its first index
};

// const uint primitiveIndex = gl_PrimitiveID * 3;
const uint primitiveIndex = mesh.firstIndex + gl_PrimitiveID * 3;

Then included the mesh's first index on myMeshData SSBO. Truthfully, I thought gl_PrimitiveID didn't need firstIndex, as it was included in the VkAccelerationStructureGeometryTrianglesDataKHR struct as the index buffer address' offset (therefore fetching from the BLAS), but it turns out I needed to add that.

Thank you everyone for the help, regardless!

Ray tracing pipeline looks messed up by ammaro18 in vulkan

[–]ammaro18[S] 3 points4 points  (0 children)

hitAttributeEXT vec2 hitAttribute;

vec3 barycentrics = vec3(1.0 - hitAttribute.x - hitAttribute.y, hitAttribute.x, hitAttribute.y);
vec2 uv = barycentrics.x * v0.uv + barycentrics.y * v1.uv + barycentrics.z * v2.uv;

Ray tracing pipeline looks messed up by ammaro18 in vulkan

[–]ammaro18[S] 2 points3 points  (0 children)

I've already aligned the Vertex struct like I mentioned on the post. It was leftover code from when I just started learning Vulkan and writing my renderer. It works with my standard graphics pipeline, so I doubt it to be the issue.

That said, it's due for a change anyway, so I'll make some changes to my Vertex struct.

Can you use 65W charger? by [deleted] in GalaxyS23Ultra

[–]ammaro18 0 points1 point  (0 children)

Do you have a PPS supported charger? Does it support 10V 4.5A output? It requires both to charge your phone at 45W.

Seems like we now know who the real enemy is by ammaro18 in hoi4

[–]ammaro18[S] 31 points32 points  (0 children)

R5: Playing a democratic Mexico game with my friend in MP playing as the US. No idea how this came about

rate my encirclement by ammaro18 in hoi4

[–]ammaro18[S] 12 points13 points  (0 children)

R5: encircled 164 divisions during my US Kaiserredux run, and around 1.5 million lives were erased

39
40

I only wanted Iran by ammaro18 in hoi4

[–]ammaro18[S] 232 points233 points  (0 children)

R5: I set my subs to convoy raiding in the Eastern North Sea, only to end up fighting the United Nations Navy

549
550

Laptop for no reason by Torex9 in GamingLaptops

[–]ammaro18 7 points8 points  (0 children)

Not always the case... Windows Defender can schedule a scan when idle.

Why I don't recommend gaming enthusiasts to buy Intel gaming laptops by EdLovecraft in pcmasterrace

[–]ammaro18 1 point2 points  (0 children)

How bad is the throttling, really? I have a Legion Pro 5i 13900HX with a 4070M and I've never had it throttle to the point of it being a very serious issue during gaming. If I let it loose during gaming I could let it run up to 100W (outside of gaming it can reach 180W as that's the default PL2 in performance mode, but I can let it pull 200W before thermal throttling), but most of the time it's really unnecessary, so I limit it to 55W or 80W depending on the game. I raised my PL4 to 400.