|
100 | 100 | #check if the group property was hardcoded |
101 | 101 | command_queues = state.find_objects(ctx, 'command_queue') |
102 | 102 | command_queue = command_queues[defi['hCommandQueue']] |
103 | | - check_group_property_queued(state,ctx,defi,command_queue.device) |
| 103 | + if command_queue |
| 104 | + check_group_property_queued(state,ctx,defi,command_queue.device) |
| 105 | + end |
104 | 106 | } |
105 | 107 |
|
106 | 108 | #When a fence signals the host, set the fence's status to signaled |
|
242 | 244 | } |
243 | 245 |
|
244 | 246 | $on_successful_exit['zeCommandQueueCreate'] = lambda { |state, ctx, defi| |
| 247 | + #puts "create" |
245 | 248 | command_queues = state.find_objects(ctx, 'command_queue') |
246 | 249 | context = state.find_object(ctx, 'context', 'hContext') |
247 | 250 | device = state.find_object(ctx, 'device', 'hDevice') |
248 | 251 | desc_val = state.find_param(ctx, 'desc_val') |
249 | 252 | desc = state.to_struct(desc_val, ZE::ZECommandQueueDesc) |
250 | 253 | handle = defi['phCommandQueue_val'] |
251 | | - #puts "ordinal = #{desc[:ordinal]}" |
252 | 254 | command_queues[handle] = ZEModel::CommandQueue.new(handle, context, device, desc) |
253 | 255 | context.command_queues[handle] = command_queues[handle] |
| 256 | + #check_valid_index_for_ordinal(state,ctx,handle,desc[:ordinal],desc[:index]) |
| 257 | +} |
| 258 | + |
| 259 | +$on_erroneous_exit['zeCommandQueueCreate'] = lambda { |state, ctx, defi| |
| 260 | + desc_val = state.find_param(ctx, 'desc_val') |
| 261 | + desc = state.to_struct(desc_val, ZE::ZECommandQueueDesc) |
| 262 | + handle = state.find_param(ctx, 'phCommandQueue') |
| 263 | + check_valid_index_for_ordinal(state,ctx,handle,desc[:ordinal],desc[:index]) |
254 | 264 | } |
255 | 265 |
|
256 | 266 | $on_successful_exit['zeCommandQueueDestroy'] = lambda { |state, ctx, defi| |
|
0 commit comments