diff options
author | Eric Anholt <[email protected]> | 2014-07-18 14:18:23 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2014-08-11 14:40:45 -0700 |
commit | 11fbee320123b4bb423febe1d5841c24a28aad86 (patch) | |
tree | b083d3d6e99b417e416b598f715a1d91454c3c9f | |
parent | a3cd3c0d198374647df3db83198e8ce0cddcb6b7 (diff) |
vc4: Add load/store to the validator
-rw-r--r-- | src/gallium/drivers/vc4/vc4_simulator_validate.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/gallium/drivers/vc4/vc4_simulator_validate.c b/src/gallium/drivers/vc4/vc4_simulator_validate.c index 2839136bc42..14701b171c7 100644 --- a/src/gallium/drivers/vc4/vc4_simulator_validate.c +++ b/src/gallium/drivers/vc4/vc4_simulator_validate.c @@ -63,21 +63,17 @@ validate_branch_to_sublist(VALIDATE_ARGS) } static int -validate_store_tile_buffer_general(VALIDATE_ARGS) +validate_loadstore_tile_buffer_general(VALIDATE_ARGS) { -#if 0 - struct drm_gem_cma_object *fbo; + uint32_t packet_b0 = *(uint8_t *)(untrusted + 0); + struct drm_gem_cma_object *fbo = exec->bo[exec->bo_index[0]]; - /* XXX: Validate address offset */ + if ((packet_b0 & 0xf) == VC4_LOADSTORE_TILE_BUFFER_NONE) + return 0; - fbo = exec->bo[exec->bo_index[0]]; - - /* XXX */ - /* + /* XXX: Validate address offset */ *(uint32_t *)(validated + 2) = *(uint32_t *)(untrusted + 2) + fbo->paddr; - */ -#endif return 0; } @@ -228,7 +224,9 @@ static const struct cmd_info { [25] = { 0, 1, 1, "store MS resolved tile color buffer and EOF", NULL }, [28] = { 0, 1, 7, "Store Tile Buffer General", - validate_store_tile_buffer_general }, + validate_loadstore_tile_buffer_general }, + [29] = { 0, 1, 7, "Load Tile Buffer General", + validate_loadstore_tile_buffer_general }, [32] = { 1, 1, 14, "Indexed Primitive List", validate_indexed_prim_list }, |