Skip to content

Some information for bindless texture workaround on AMD drivers #1535

Closed
@VReaperV

Description

@VReaperV

I'm just putting this here so it's not forgotten, as I haven't been able to fully make it work.

Render targets (i. e. the textures bound to FBOs) - leave as non-bindless. When doing that on Adrenaline driver - a few surfaces are visible, but most are still black. Main menu works fine, including on release, since it does not use FBOs other than the default one, and doesn't sample from render targets.

For material system, processSurfaces_cp (irrelevant text omitted):

 156: #if defined(HAVE_KHR_shader_subgroup_basic) && defined(HAVE_KHR_shader_subgroup_arithmetic)\
 157: 	&& defined(HAVE_KHR_shader_subgroup_ballot) && defined(HAVE_ARB_shader_atomic_counter_ops)
 158: 	#define HAVE_processSurfaces_subgroup
 159: #endif
 160: 
 161: void AddDrawCommand( in uint commandID, in uvec2 materialID ) {
 162: 	SurfaceCommand command = surfaceCommands[commandID + u_SurfaceCommandsOffset];
 163: 
 164: 	#if defined(HAVE_processSurfaces_subgroup)
 165: 		const uint count = subgroupBallotBitCount( subgroupBallot( command.enabled ) );
 166: 		// Exclusive scan so we can determine the offset for each lane without any synchronization
 167: 		const uint subgroupOffset = subgroupExclusiveAdd( command.enabled ? 1u : 0u );
 168: 		
 169: 		uint atomicCmdID = 0u;
 170: 		// Once per subgroup
 171: 		if( subgroupElect() ) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: 0:171: 'assign' :  cannot convert from ' const float' to ' temp uint'

 172: 			atomicCmdID = atomicCounterAddARB( atomicCommandCounters[materialID.x
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: 0:172: 'atomicCounterAddARB' : no matching overloaded function found 

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: 0:172: '' : missing #endif 

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: 0:172: '' : compilation terminated 

 173: 		                                                 + MAX_COMMAND_COUNTERS * ( MAX_VIEWS * u_Frame + u_ViewID )], count );
 174: 		}
 175: 
 176: 		atomicCmdID = subgroupBroadcastFirst( atomicCmdID );
 177: 	#endif

The fucking AMD driver is trolling us again.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions